MCP Retrieval Spec

v1.0.0Developer Toolsstable

jMRI v1.0 — open specification for token-efficient context retrieval in MCP servers. SDKs, reference server, benchmark.

mcp-retrieval-specmcpai-integration
Share:
34
Stars
0
Downloads
0
Weekly
0/5

What is MCP Retrieval Spec?

MCP Retrieval Spec is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to jmri v1.0 — open specification for token-efficient context retrieval in mcp servers. sdks, reference server, benchmark.

jMRI v1.0 — open specification for token-efficient context retrieval in MCP servers. SDKs, reference server, benchmark.

This server falls under the Developer Tools and Knowledge & Memory categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • jMRI v1.0 — open specification for token-efficient context r

Use Cases

Implement token-efficient context retrieval for MCP.
Use standardized jMRI v1.0 specification.
Optimize context usage in MCP servers.
jgravelle

Maintainer

LicenseNOASSERTION
Languagepython
Versionv1.0.0
UpdatedMay 10, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-retrieval-spec

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use MCP Retrieval Spec

The jMRI (jMunch Retrieval Interface) specification is an open standard that defines a minimal four-operation interface for token-efficient context retrieval in MCP servers. Instead of loading entire files into context, jMRI-compliant servers let agents discover knowledge sources, search by intent, retrieve only the relevant symbol or section, and inspect token savings per call. Reference implementations like jCodeMunch and jDocMunch can save over 98% of tokens compared to naive file reading, making large codebases and document sets practical for AI-assisted workflows.

Prerequisites

  • Python 3.8 or higher (for Python SDK and reference server)
  • Node.js (for TypeScript SDK and Claude Code integration)
  • uv package manager (recommended: `curl -LsSf https://astral.sh/uv/install.sh | sh`)
  • A jMRI-compliant implementation such as jcodemunch-mcp or jdocmunch-mcp
  • An MCP-compatible client such as Claude Desktop or Claude Code
1

Clone the spec repository

Clone the mcp-retrieval-spec repository to access the SDK, reference server, and examples.

git clone https://github.com/jgravelle/mcp-retrieval-spec.git
cd mcp-retrieval-spec
2

Install a jMRI-compliant server

Install one of the reference implementations using uvx. jCodeMunch handles code in 70+ languages; jDocMunch handles markdown, HTML, and notebooks.

# For code repositories:
uvx jcodemunch-mcp

# For documentation:
uvx jdocmunch-mcp
3

Install the Python SDK (optional)

Install the jmri-sdk package to use the MRIClient helper in your own scripts.

pip install jmri-sdk
4

Configure your MCP client

Add the jMRI server(s) to your Claude Code or Claude Desktop configuration file so they are automatically started.

5

Run the conformance suite (optional)

Validate that a custom jMRI implementation passes all Core and Full compliance tests.

python -m jmri.conformance --repo owner/repo --server-cmd "your-jmri-server"

MCP Retrieval Spec Examples

Client configuration

Claude Code configuration adding both jCodeMunch and jDocMunch jMRI-compliant servers.

{
  "mcpServers": {
    "jcodemunch-mcp": {
      "command": "uvx",
      "args": ["jcodemunch-mcp"]
    },
    "jdocmunch-mcp": {
      "command": "uvx",
      "args": ["jdocmunch-mcp"]
    }
  }
}

Prompts to try

Example prompts that use jMRI's discover/search/retrieve pattern to answer questions efficiently.

- "What knowledge sources are available for the fastapi repo?"
- "Search for how database sessions are managed in the fastapi codebase."
- "Retrieve the source for the session dependency symbol."
- "How many tokens did the last retrieval save compared to reading the full file?"

Troubleshooting MCP Retrieval Spec

uvx command not found when installing jcodemunch-mcp

Install uv first with `curl -LsSf https://astral.sh/uv/install.sh | sh`, then restart your shell so uvx is on your PATH.

Conformance suite reports failures for a custom server

Review SPEC.md for the exact invariants each named test case checks. Core tier tests use MUST language and all must pass; Full tier tests use SHOULD and are optional.

Agent still reads whole files instead of using jMRI tools

Explicitly instruct the agent to use the discover and search tools before reading files. The jMRI _meta.tokens_saved field helps the agent understand the cost difference.

Frequently Asked Questions about MCP Retrieval Spec

What is MCP Retrieval Spec?

MCP Retrieval Spec is a Model Context Protocol (MCP) server that jmri v1.0 — open specification for token-efficient context retrieval in mcp servers. sdks, reference server, benchmark. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCP Retrieval Spec?

Follow the installation instructions on the MCP Retrieval Spec GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with MCP Retrieval Spec?

MCP Retrieval Spec works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is MCP Retrieval Spec free to use?

Yes, MCP Retrieval Spec is open source and available under the NOASSERTION license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-retrieval-spec": { "command": "npx", "args": ["-y", "mcp-retrieval-spec"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use MCP Retrieval Spec?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides