repo-map-mcp
repo-map-mcp
リポジトリのファイル単位のJSONインデックスを自動更新で維持するMCPサーバー (ディレクトリ、ファイル名、説明、関数名、タイムスタンプ)を管理し、 エージェントがツリー全体を読む代わりに「何が関連しそうか」を クエリできるようにします。
ファイル探索とパス注釈はローカルで計算されます。説明とファイルの目的は エージェントが記入するため、より良いコンテキストが得られます。
インストール
uv syncRelated MCP server: Moxie Docs MCP
ツール
index_repository(root_path, force=False)—root_pathを走査し (.gitignoreとハードコードされた除外リストを尊重)、各ファイルを ハッシュ化し、変更されたファイルの関数名を再解析して、<root_path>/.repo-index/index.jsonのディスク上のインデックスを更新します。 概要文字列を返します。get_repo_map(root_path, dir_prefix=None)— JSONインデックスを返します。 必要に応じてサブディレクトリにスコープを絞れます。search_files(root_path, query)— ファイル名、説明、関数名に対する 部分一致検索を行います。get_stale_files(root_path)—descriptionStaleフラグが設定された ファイルを、その関数名とともに返します。エージェントがファイルを開かずに 説明を記入できるようにするためです。set_description(root_path, path, description)— 説明を書き込み、 staleフラグをクリアします。
関数抽出に対応している言語(tree-sitter経由):
Python、JavaScript、TypeScript、TSX、Java、Rust。その他のファイル形式も
funcs: [] としてインデックス化されます。
要件
Python
uv
実行
uv run repo-map-mcpstdioで動作します — MCPクライアント設定(例: Claude Code)で
command を uv run repo-map-mcp に指定し(cwd をこのディレクトリに設定)、
または絶対パスを使用してください。
テスト
uv run pytest -q
uv run python3 scripts/smoke_client.py # end-to-end tool call smoke testAvailable Tools
5 toolsget_repo_mapA
Return the JSON repo index for root_path, optionally scoped to dir_prefix. Call this before exploring.
Inputs: root_path (required), dir_prefix. Returns: result
get_stale_filesB
Return files in root_path's index whose description is stale (funcs changed), with their funcs.
Inputs: root_path (required). Returns: result
index_repositoryB
Walk root_path, hash/parse changed files, update the .repo-index/index.json map. Returns a summary.
Inputs: root_path (required), force. Returns: result
search_filesA
Substring search over fileName/description/funcs in the repo index for root_path.
Inputs: query (required), root_path (required). Returns: result
set_descriptionB
Write a one-line description for path in root_path's index and clear its stale flag.
Inputs: path (required), root_path (required), description (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a distinct responsibility: setting descriptions, indexing, fetching the map, searching, and retrieving stale files. No overlap or ambiguity exists between them.
All tools follow a consistent snake_case verb_noun pattern (set_description, index_repository, get_repo_map, search_files, get_stale_files). Predictable and uniform.
5 tools is a well-scoped size for a focused repository indexing server. Each tool earns its place with a clear role, no redundancy.
The tool surface covers the core workflow: indexing, description management, retrieval, search, and staleness detection. No obvious gaps; the lifecycle is fully addressed.
Maintenance
Related MCP Connectors
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Codebase memory for AI coding agents: files, lines, callers and tests for any public GitHub repo.
Code-map tools for AI agents: see a repo's structure first, then edit only what matters.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to intelligently navigate and understand codebases by providing instant file descriptions, semantic search, and context-aware recommendations, eliminating the need to repeatedly scan files.135 PyPI23MIT
- AlicenseNot gradedqualityCmaintenanceIndexes GitHub repositories and provides living documentation context to coding agents, enabling them to ground work in actual repository conventions and propose doc updates.233 npm2MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLM agents to efficiently understand and navigate a codebase by providing semantic search over symbols and a reference graph, replacing expensive grep/glob calls with structured tools like definition lookup, caller/callee queries, and change-impact analysis.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables agentic coding tools to maintain a living, in-repo model of intent, architecture, and code, with deterministic indexing, bidirectional linking, and continuous drift detection for task-scoped context and reconciliation.MIT