GitDiagram
Architecture diagrams, explanations and Mermaid source for public GitHub repositories.
On-demand, local code-context MCP server for AI coding agents with Tree-sitter AST.
使っているAIアプリを選んで、設定をコピーしてください。
チェック 3/3 合格 · あなたのパソコンで動きます · ✓ コマンド確認済み 2026年11月14日
まず:どの AI を使っていますか?
使っているアプリを選ぶと、下に手順が表示されます。
Claude につなげますが、先に準備が必要です
先にパソコンへ Python (uv) を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
このメッセージを Claude のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。
このパソコンの Claude に MCP server Token Context MCP を入れてください。順番に:1) uv --version で uv があるか確認。なければ https://docs.astral.sh/uv/getting-started/installation/ から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "token-context": { "command": "uvx", "args": [ "token-context-mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Token Context MCP のツールが本当に表示されるか確認する。このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。
もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter
uv --versionMac:⌘ + Space を押し、Terminal と入力して Enter
Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」
まだ入っていない場合: uv にはクリック式のインストーラーがありません。uv 公式ページからお使いの OS(macOS か Windows)用の 1 行コマンドをコピーしてターミナルに貼り付けます · Python を別に入れる必要はなく、必要なときに uv が自動で取得します
入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: uv --version
一度入れれば、uv を使うすべてのツールで使えます
SettingsDeveloperEdit Config
{
"mcpServers": {
"token-context": {
"command": "uvx",
"args": [
"token-context-mcp"
]
}
}
}Token Context MCP を使って、私に何ができるか教えて、1 つやってみせて✓ Claude が Token Context MCP を使っていると言うか、回答に Token Context MCP のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
ChatGPT はまだ Token Context MCP につなげません
Token Context MCP はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません
A · Token Context MCP につなげるアプリを使う
B · 開発者ツール の中で ChatGPT につなげる別のサーバー
同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました
Claude Code につなげますが、先に準備が必要です
先にパソコンへ Python (uv) を入れてください(1 回だけ)
このメッセージを Claude Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。
このパソコンの Claude Code に MCP server Token Context MCP を入れてください。順番に:1) uv --version で uv があるか確認。なければ https://docs.astral.sh/uv/getting-started/installation/ から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):claude mcp add --scope user token-context -- uvx token-context-mcp 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Token Context MCP のツールが本当に表示されるか確認する。このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。
もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter
uv --versionMac:⌘ + Space を押し、Terminal と入力して Enter
Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」
まだ入っていない場合: uv にはクリック式のインストーラーがありません。uv 公式ページからお使いの OS(macOS か Windows)用の 1 行コマンドをコピーしてターミナルに貼り付けます · Python を別に入れる必要はなく、必要なときに uv が自動で取得します
入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: uv --version
一度入れれば、uv を使うすべてのツールで使えます
Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く
claude mcp add --scope user token-context -- uvx token-context-mcpToken Context MCP が一覧にあり、接続済みと表示されれば OK です
Token Context MCP を使って、私に何ができるか教えて、1 つやってみせて✓ Claude Code が Token Context MCP を使っていると言うか、回答に Token Context MCP のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
Cursor につなげますが、先に準備が必要です
先にパソコンへ Python (uv) を入れてください(1 回だけ)
このメッセージを Cursor のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。
このパソコンの Cursor に MCP server Token Context MCP を入れてください。順番に:1) uv --version で uv があるか確認。なければ https://docs.astral.sh/uv/getting-started/installation/ から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "token-context": { "command": "uvx", "args": [ "token-context-mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Token Context MCP のツールが本当に表示されるか確認する。このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。
もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter
uv --versionMac:⌘ + Space を押し、Terminal と入力して Enter
Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」
まだ入っていない場合: uv にはクリック式のインストーラーがありません。uv 公式ページからお使いの OS(macOS か Windows)用の 1 行コマンドをコピーしてターミナルに貼り付けます · Python を別に入れる必要はなく、必要なときに uv が自動で取得します
入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: uv --version
一度入れれば、uv を使うすべてのツールで使えます
Token Context MCP を使って、私に何ができるか教えて、1 つやってみせて✓ Cursor が Token Context MCP を使っていると言うか、回答に Token Context MCP のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
VS Code につなげますが、先に準備が必要です
先にパソコンへ Python (uv) を入れてください(1 回だけ)
このメッセージを VS Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。
このパソコンの VS Code に MCP server Token Context MCP を入れてください。順番に:1) uv --version で uv があるか確認。なければ https://docs.astral.sh/uv/getting-started/installation/ から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "servers": { "token-context": { "type": "stdio", "command": "uvx", "args": [ "token-context-mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Token Context MCP のツールが本当に表示されるか確認する。このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。
もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter
uv --versionMac:⌘ + Space を押し、Terminal と入力して Enter
Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」
まだ入っていない場合: uv にはクリック式のインストーラーがありません。uv 公式ページからお使いの OS(macOS か Windows)用の 1 行コマンドをコピーしてターミナルに貼り付けます · Python を別に入れる必要はなく、必要なときに uv が自動で取得します
入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: uv --version
一度入れれば、uv を使うすべてのツールで使えます
Token Context MCP を使って、私に何ができるか教えて、1 つやってみせて✓ VS Code が Token Context MCP を使っていると言うか、回答に Token Context MCP のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください
JSON 設定は下の「開発者向け」にあります
Claude Code
claude mcp add --scope user token-context -- uvx token-context-mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"token-context": {
"command": "uvx",
"args": [
"token-context-mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"token-context": {
"command": "uvx",
"args": [
"token-context-mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"token-context": {
"type": "stdio",
"command": "uvx",
"args": [
"token-context-mcp"
]
}
}
}この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。
パソコン上で動かせるアプリ
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月15日にチェック
レジストリ名は、リポジトリを所有するGitHubアカウント MCK564 で確認済みです
コードの最終更新:一昨日
MITを使用
これはパソコンで動くため、インターネット上のエンドポイントはありません
パソコンで動き、代わりにローカルの設定を使います
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
まだ確認していません
質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。
まだレビューはありません
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
当てはまる基本チェック3項目のうち3項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
GitHubリポジトリの最終更新は一昨日、最新バージョン(0.3.6)がレジストリに届いたのは一昨日です。
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにPython (uv)も必要です。
同じカテゴリには:GitDiagram, Appllama, Cloudflare MCP, Omnara, Repowise
同じカテゴリでほかの作者のもの。コマンドは確認済み。公式を先に、次にスター順。
カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
Architecture diagrams, explanations and Mermaid source for public GitHub repositories.
Study screens, flows and paywalls from top-earning iOS apps, then build from what wins.
Deploy durable AI agents with Omnara, an open-source managed-agent platform.
Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
🌐 English:
README.md| 🇻🇳 Tiếng Việt:README.vi.md| 🇨🇳 简体中文:README.cn.md| 📝 Prompt Protocol:sample_prompt.md| 📋 Changelog:CHANGELOG.md
[!NOTE]
Architecture Notice: The governance microkernel design is inspired by the Cordis paper (*A Programming Paradigm for Spatiotemporal Composability*, arXiv:2608.25512). This is an independent open-source implementation not affiliated with or endorsed by DeepSeek.
token-context-mcp is an on-demand, budget-governed Model Context Protocol (MCP) server for autonomous AI coding agents (Claude Code, Cursor, Codex, Google Antigravity). Instead of blindly dumping an entire repository or compressing it into a static snapshot that strips function bodies down to signatures, it provides an interactive AST-level pull pipeline that delivers exact code symbols and downstream impact graphs with verified file:line + SHA-256 evidence.
🔍 View detailed technical architecture & comparison diagrams (Click to expand)
TOKEN_CONTEXT_AGENT_ID when configured and prevents reserved admin impersonation.max_result_tokens at syntactic boundaries without cutting functions in half.tools/list payload exposes only 10 core read-only retrieval tools (keeping 11 extension tools—including trajectory_record—and 2 admin tools off the wire until requested). Server-side JSON schemas are slimmed to reduce initial prompt tax.mtime_ns + SHA-256 change detection across Python, JavaScript/TypeScript, Go, Rust, Java, C/C++, and C# with symlink-escape and path traversal guards."query -> answer" citation cards (path:line + AST body SHA-256) in ledger.sqlite outside your repository. Every read re-verifies citations against disk, emits prior_evidence hints (or recheck_from on VERIFY_FAILED), and never prunes unverified code. Zero-hash fast-path adds 0ms overhead on empty ledgers.tiktoken o200k_base Audited)All numbers are measured using OpenAI's o200k_base tokenizer across two real-world open-source repositories: rich (Python, 213 files, 507k tokens) and fastify (JS/TS, 291 files, 538k tokens):
| Benchmark Suite | Metric | token-context-mcp | Baseline / Alternative | Empirical Takeaway |
|---|---|---|---|---|
| 59-Task Head-to-Head (Equal budget: ~7.6k tokens) | Target function in context with Full Body ($\ge 90\%$ lines) | 33 / 59 (55.9%) | 2 / 59 (3.4%) *(ContextCraft 8k --focus)* | 16.5× more full function bodies at equal token budget |
| 59-Task H2H (Sensitivity) (vs. 4× static budget: 32k tokens) | Full Body vs. Signature Only | 33 / 59 Full Body (at 7.6k) | 6 / 59 Full Body, 40 / 59 (67.8%) Signature Only *(ContextCraft 32k)* | Static packing prunes bodies to signatures to fit whole-repo maps; interactive MCP pull focuses 100% of budget on the target symbol |
| M10 Equal-Budget Suite (rich, n=30, ~1.9k tokens) | File Recall & Symbol Recall (95% Bootstrap CI) | 0.90 File Recall 0.54 Symbol Recall | 0.57 File Recall 0.10 Symbol Recall *(Truncated Grep)* | +58% file recall, 5.4× symbol recall over truncated grep at identical token cost | | C1 Single-Call Cost (fastify 538k source baseline) | Orientation map get_repo_map@512 | 682 tokens | 538,799 tokens (raw source files) | Compact repo map occupies 0.13% of the repository (~790× smaller) |
uvx (Recommended)# Register, index, and print agent config for the current directory
uvx token-context-mcp quickstart .
pippip install token-context-mcp
token-context register --repo-id my-project --root /path/to/project token-context index --repo-id my-project token-context serve
7-tab dark desktop controller (Dashboard, Repositories, Tasks & Graph, Cache & DB with stale snapshot cleanup & ledger.sqlite vacuuming, Ledger & Memory, Agents & Security, and Settings):
uvx --from "token-context-mcp[gui]" token-context-gui
[eval] extra with tiktoken o200k_base)pip install -e ".[eval]"
python evals/chain_eval.py --output evals/reports/chain_l0_l5.json python evals/mcp_chain_eval.py --limit-chains 6 --output evals/reports/mcp_chain_eval.json
token-context-mcp communicates over local stdio. Add the configuration below to your agent:
claude mcp add --transport stdio --scope user token-context -- uvx token-context-mcp serve
In Cursor Settings > Features > MCP Servers:
token-contextcommanduvx token-context-mcp serveAdd to %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/.config/Claude/claude_desktop_config.json (macOS/Linux):
{
"mcpServers": { "token-context": { "command": "uvx", "args": ["token-context-mcp", "serve"] } } }
Add to mcp_config.json:
{
"mcpServers": { "token-context": { "command": "uvx", "args": [ "token-context-mcp", "serve", "--output-mode", "text", "--schema-profile", "gemini_safe" ] } } }
By default, the server exposes 10 read-only retrieval tools to preserve agent context:
| Tool | Primary Purpose | Mode |
|---|---|---|
list_repositories | Lists registered repo_ids (filesystem root paths are never leaked). | Read-only |
get_index_status | Returns snapshot metadata, indexed file count, commit SHA, and freshness. | Read-only |
get_repo_map | PageRank-based symbol hierarchy within a token budget (@512). | Read-only |
find_symbols | Pattern-based symbol matching (*, ? wildcards) with file coordinates. | Read-only |
search_source | FTS5 code search returning matched lines and enclosing symbol spans. | Read-only |
get_file_skeleton | File outline (imports, class/function signatures with elided bodies). | Read-only |
get_symbol_context | Full function/class body, docstrings, and callers/callees (@1024). | Read-only |
get_impact_slice | Traverses downstream call graph dependencies before making changes (depth=2). | Read-only |
get_module_dependents | Tree-sitter import dependency graph between modules. | Read-only |
inspect_symbol | Composite lookup: symbol resolution + full context + 1-hop impact graph. | Read-only |
*(11 extension tools including SQLite multi-agent memory memory_*, Evidence Ledger trajectory_record, lazy tool discovery *_tools, hardware-adaptive compressor sample_summarize, and 2 admin tools agent_control, audit_logs can be enabled via configuration).*
[REDACTED: potential secret]) plus hard denial of sensitive files (.env*, .ssh, *.pem, id_rsa).sample_prompt.md: Standard two-phase prompt templates (EN / VI / CN).CHANGELOG.md: Release history and upgrade notes.launch/00_fact_sheet.md: Verified empirical benchmarks and measurement methodologies.docs/CLIENT_MATRIX.md: Step-by-step MCP client verification matrix.*Maintained by the Token Context MCP community. Licensed under MIT.*