MCP server for static repository structure mapping and entry-point detection.
Project description
mcp-repo-mapper
mcp-repo-mapper is a FastMCP server for deterministic repository structure mapping. It scans a local codebase and exposes file structure, language counts, Python import dependencies, circular dependency detection, framework detection, entry point candidates, and a cached repo structure resource.
The server does not call an LLM and does not execute user code. It is intended as a grounded structure tool for codebase onboarding agents such as wayfinder.
Codebase Onboarding Stack
mcp-repo-mapper is the structure layer in a three-server MCP tool stack for Project 6 wayfinder, a codebase onboarding agent.
mcp-repo-mappermaps repository structure, languages, entry points, framework evidence, and Python dependency edges.mcp-ast-explorerprovides symbol-grounded Python definition, signature, reference, call-chain, and class-hierarchy lookups.mcp-test-runnerruns local pytest/Jest checks and coverage summaries so agent claims can be verified against execution.
In wayfinder, this server feeds the architecture-mapping step before semantic explanation or test verification begins.
Features
scan_repo(path)returns a typed repo scan with files, language breakdown, entry points, Python dependency graph, and detected frameworks.find_circular_deps(path)returns circular dependencies from the static dependency graph.language_breakdown(path)returns language counts by file count and bytes.detect_framework(path)detects FastAPI, Flask, Django, Express, and Spring using registry-based markers.find_entry_points(path)returns ranked entry point candidates such as Python mains, FastAPI apps, package start scripts, Dockerfiles, and Node indexes.repo-structure://{url_hash}returns a cached JSON scan result after a tool call has populated the cache.
Install
uv sync --extra dev
Run the server locally:
uv run mcp-repo-mapper
Development
uv run ruff check .
uv run mypy
uv run pytest
Resource Flow
Resource reads use a cache populated by tool calls:
- Call
scan_repo(path)or another scan-backed tool. - Compute the repo hash with the same path.
- Read
repo-structure://{url_hash}.
The public resource uses repo-structure://... because URL schemes cannot contain underscores.
Scope And Limitations
- Dependency graph support is currently Python-only and based on static
astparsing. - Import graph resolution only records modules that exist inside the scanned repo.
- Framework detection is heuristic marker matching, not a full build-system analysis.
- The resource cache is in-memory and process-local.
- The server scans local filesystem paths only.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_repo_mapper-0.1.0.tar.gz.
File metadata
- Download URL: mcp_repo_mapper-0.1.0.tar.gz
- Upload date:
- Size: 95.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9112cf8a7567c459153d5260c079eb5e672cc8312d758bbbf8f06b63bff64d27
|
|
| MD5 |
d188001822b8ffa21e24518d0fd7d39b
|
|
| BLAKE2b-256 |
6712433ffdb03b8ee443932480bcac8c8eb80cea7bb96deb0e03d133ed2277f4
|
File details
Details for the file mcp_repo_mapper-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_repo_mapper-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d49403095cb50b3e5d8049949ac45da0935173831d65ae2079546d0b8033d6ac
|
|
| MD5 |
1d86e7b7227becc461a38b6401d21eaa
|
|
| BLAKE2b-256 |
1c7205a73868862e5f149454814d507037dfd0a1660802bdae2517734bb4b013
|