r/modelcontextprotocol • u/TamojitD • 1d ago
new-release Built project-context-map-mcp: A stdio MCP server that indexes repo import topology & git hotspots so coding agents read fewer files (MIT, on Official MCP Registry)
I built project-context-map-mcp (MIT, Node.js >=20, pure ESM on u/modelcontextprotocol/sdk) to solve a common MCP coding-agent bottleneck: clients burning tokens opening 15–25 files just to map out a repo before editing.
Design & Protocol Choices
Instead of letting the agent scan everything blindly, the server indexes the repository into .project.md (with a Mermaid topology diagram + change log), .project-map.json, and .project-map.md, and exposes 10 focused tools over StdioServerTransport:
- Discovery & Ranking:
get_project_summary,read_project_context,query_topology(returns matched paths +dependencies&usedByedges),find_relevant_files(withconfidenceandavoidReadingmodules),get_module_context,explain_file_role,get_recent_git_changes - Scoped File Access & Writes:
read_files_sparse(restricts reads to indexed, in-root paths) andwrite_and_log(writes in-root files and appends to.project.md's Change Log) - Safety & Testing: Enforces lexical +
realpathSyncsymlink-traversal checks on file reads/writes, validates tool arguments with structuredisErrorresponses, and tests handlers end-to-end usingInMemoryTransport.
Try it (npx or Official MCP Registry)
{
"mcpServers": {
"project-context-map": {
"command": "npx",
"args": ["-y", "project-context-map-mcp", "serve", "--project-root", "."]
}
}
}- GitHub (MIT): https://github.com/tamojit-123/project-context-map-mcp
- Official MCP Registry:
io.github.tamojit-123/project-context-map-mcp - npm: https://www.npmjs.com/package/project-context-map-mcp
If it's useful in your MCP workflow, a ⭐ on GitHub helps others find it. Curious what other MCP builders think: do you prefer servers that only expose read/query tools (query_topology), or do you also use scoped read/write helpers (read_files_sparse, write_and_log) alongside your client's built-in file tools?