JM

jgravelle/mcp-retrieval-spec

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

34 stars 10 forks 品質 64 トレンド 16NOASSERTION

jgravelle/mcp-retrieval-spec は [https://github.com/jgravelle/mcp-retrieval-spec.] からインポートされた MCP サーバーの候補です

概要

jgravelle/mcp-retrieval-spec は [https://github.com/jgravelle/mcp-retrieval-spec.] からインポートされた MCP サーバーの候補です

概要(AI 翻訳)

JMRI (jMunch Retrieval Interface) 仕様 — MCP サーバーでトークン効率の高いコンテクスト検索のためのオープンインターフェイス規格。

お問い合わせ

jMRIとは?

トークンの予算の特定の質問の無駄99%に答えるために全ファイルを読むエージェント。 jMRI は、MCP サーバーの最小インターフェースで、検索結果を一度に検索し、必要なものを正確に取得します。

4つの操作。 1つの応答封筒。 2つのコンプライアンスレベル。

数字の問題: 典型的なFastAPIのコードベースコスト〜42,000トークンで、Nivelyを読みます。 jMRI は、同じ回答コストの検索 ~480 トークンです。 $3/1M トークンで, つまり $0.126 対. $0.0014 クエリあたり. 数百万ものクエリで、節約は材料です。

jMunch ツールは、ユーザーのセッション間でトークンの数十億を保存しました。 この仕様は、彼らが何をするかの正式な定義です。

お問い合わせ

使い方

_meta] ブロックと tokens_saved と [total_tokens_saved を含むすべての応答。 エージェントは、すべての呼び出しに保存されているものを正確に見ることができます。

お問い合わせ

仕様

→ 仕様

完全なjMRI v1.0の指定。 Apache 2.0 の しかし、必要に応じて実装します。

お問い合わせ

参照実装

仕様が開きます。 最高の実装は商用です.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

mcp-retrieval-spec

The jMRI (jMunch Retrieval Interface) specification — an open interface standard for token-efficient context retrieval in MCP servers.


What Is jMRI?

Agents that read whole files to answer specific questions waste 99% of their token budget. jMRI is a minimal interface for MCP servers that do retrieval right: index once, search by intent, retrieve exactly what you need.

Four operations. One response envelope. Two compliance levels.

The problem in numbers: A typical FastAPI codebase costs ~42,000 tokens to read naively. jMRI retrieval of the same answer costs ~480 tokens. At $3/1M tokens, that’s $0.126 vs. $0.0014 per query. Across millions of queries, the savings are material.

The jMunch tools have saved billions of tokens across user sessions. This spec is the formal definition of what they do.


How It Works

Agent
  │
  ├─ discover()    → What knowledge sources are available?
  ├─ search(query) → Which symbols/sections are relevant? (IDs + summaries only)
  ├─ retrieve(id)  → Give me the exact source for this ID.
  └─ metadata(id?) → What would naive reading have cost?

Every response includes a _meta block with tokens_saved and total_tokens_saved. Agents can see exactly what they’re saving on every call.


Spec

→ SPEC.md

The full jMRI v1.0 specification. Apache 2.0. Implement it however you want.


Reference Implementations

The spec is open. The best implementations are commercial.

Implementation Domain Stars Install
jCodeMunch Code (70+ languages) 1,500+ uvx jcodemunch-mcp
jDocMunch Docs (MD, RST, HTML, notebooks) 135+ uvx jdocmunch-mcp
jDataMunch Tabular data (CSV, Excel, Parquet, JSONL) new uvx jdatamunch-mcp

Both implement jMRI-Full. Licenses available at https://j.gravelle.us/jCodeMunch/


Quick Start

Using the Python SDK

from sdk.python.mri_client import MRIClient

client = MRIClient()  # connects to local jcodemunch-mcp

# List available repos
sources = client.discover()

# Search
results = client.search("database session dependency", repo="fastapi/fastapi")
for r in results:
    print(r["id"], r["summary"])

# Retrieve
symbol = client.retrieve(results[0]["id"], repo="fastapi/fastapi")
print(symbol["source"])
print(f"Tokens saved: {symbol['_meta']['tokens_saved']:,}")

Claude Code Integration

Add to your ~/.claude.json:

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

See examples/claude-code/ for full setup.

Cursor Integration

See examples/cursor/.


GitHub で README 全文を見る

インストール

uvx jcodemunch-mcp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

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