Codebase Archaeology MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Codebase Archaeology MCPWhy is line 42 in src/utils/retry.py here?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Codebase Archaeology MCP
An MCP server that answers "why is this line here?" for a local git repo by tracing a line back to the commit that actually introduced it, then to the PR and review discussion behind that commit.
The problem
git blame attributes a line to whoever last touched it. In real repos
that is usually a formatter run, an import reorder, or a rename. The naive
pipeline — blame → commit → PR — returns "Bob, prettier migration, 2024"
and tells you nothing about intent.
This server defeats that:
blame runs with
-w -C -C(whitespace ignored, moved/copied code followed) and honours.git-blame-ignore-revs.line history follows a range backwards through edits and renames (
git log -L), detects cosmetic commits (git show -wproduces no output → the change was whitespace-only), and compensates for-Lrange drift, solikely_originis the commit that genuinely introduced the content — not the formatter, and not the neighboring lines' history.PR lookup uses GitHub's
commits/{sha}/pullsendpoint, which works for squash and rebase merges where commit-message parsing silently fails.When the trace bottoms out at the commit that created the file, the answer says so —
git log -Lcannot see across a file split, and pretending otherwise would be lying.
Related MCP server: review-dojo-mcp
Tools
Tool | Question it answers |
| Start here. The whole story: last touch, true origin, evolution, origin PR + review discussion, and an interpretation when blame's answer is misleading. |
| Who last touched these lines (formatters already discounted)? |
| Every commit that changed this range, with |
| "There used to be a retry here — where did it go?" Pickaxe ( |
| Full message, author, files, stat for one commit. |
| The PR that introduced a commit, with inline review comments and discussion. |
repo may be any path inside the work tree; file paths are resolved against
the repo root and anything escaping it is rejected.
Setup
Python 3.11+ and git on PATH.
pip install -r requirements.txtRun over stdio:
python server.pyor explore interactively:
fastmcp dev server.pyClient configuration (stdio)
{
"mcpServers": {
"codebase-archaeology": {
"command": "python",
"args": ["C:/path/to/code-arch/server.py"],
"env": {
"ARCHAEOLOGY_REPOS": "C:/Users/you/src/repo-a;C:/Users/you/src/repo-b",
"GITHUB_TOKEN": "ghp_...",
"ARCHAEOLOGY_CACHE": "C:/Users/you/.cache/archaeology.sqlite"
}
}
}
}Environment variables
Variable | Meaning |
| Allowlist of repositories the server may read, separated by the platform path separator ( |
| GitHub token for PR lookups. Optional, but unauthenticated calls are capped at 60 req/hr; one |
| Path of the SQLite HTTP cache (default |
Honest limits
git log -Lcannot trace across a file split (content extracted into a new file). The origin will be the splitting commit, flagged withorigin_is_file_creation: trueand an interpretation pointing atfind_removalto dig further.Cosmetic detection is whitespace-based (
git show -w). A formatter that changes quote characters is not "cosmetic" by this test, but the lineage trace still walks through it to the real origin.git log -Lon a huge file with deep history is genuinely slow; that is whylimitdefaults to 15 and git calls time out at 30s.
Tests
python -m pytestThe suite builds a throwaway repo reproducing the failure mode (real origin → whitespace-only reformat → reword) and asserts, among other things, that naive blame credits the formatter while every tool here names the true origin. GitHub tests run against a fake transport — no network needed.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceSemantic git queries via MCP. Beyond git log — answer who/what/why about any line, file, or branch with blame, co-change, PR linkage.6242MIT
- Flicense-qualityDmaintenanceEnables searching and retrieving knowledge extracted from GitHub PR reviews to help developers avoid repeating mistakes.
- Alicense-qualityBmaintenanceIndexes commit history to create a queryable expert, providing insights into code evolution, developer intent, and hidden patterns beyond static code analysis.MIT
- FlicenseAqualityBmaintenanceAnalyzes Git commit history and code diffs to auto-remember development context, providing commit timelines, work sessions, unfinished task detection, and daily/weekly reports.9
Related MCP Connectors
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Cross-agent artifact workspace with provenance across Claude Code, Codex, Cursor, LangGraph.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Joel-Wwalker/codebase-archaeology-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server