mcp-digger
Allows browsing and searching source code from Bitbucket-hosted .NET repositories.
Allows browsing and searching source code from GitHub-hosted .NET repositories.
Allows browsing and searching source code from GitLab-hosted .NET repositories.
Provides on-demand access to internal .NET / C# source code from NuGet packages.
Indexes NuGet-style packages to expose their source code, making private packages searchable.
Click on "Deploy 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., "@mcp-digger Find all implementations of IRepository interface"
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.
mcp-digger
Code context for AI coding agents. Progressive, on-demand access to your internal .NET / NuGet package source — agents browse, search, and read private C# libraries autonomously, with zero workspace pollution.
⚠ Scope: .NET / C# only. mcp-digger indexes NuGet-style repos containing
.csprojpackages and.cssource files. It is not a general-purpose source indexer — other languages (TypeScript, Python, Java, Go, etc.) are out of scope.
✨ Why
Public NuGet packages have documentation ecosystems — API references, tutorials, community Q&A. Tools like context7 serve that well.
Internal .NET packages often have source code as their primary documentation. mcp-digger turns that source into structured, searchable, token-efficient context that any MCP-compatible agent can consume — bridging the documentation gap in private C# library ecosystems.
Without it:
🐢 Slow context gathering —
git clone+find+grep+catchains burn tokens on infrastructure before useful context is retrieved.🔍 No semantic search — file system tools find text, not API surfaces. "Every type implementing this interface" means writing extraction scripts on demand.
💸 Token waste — agents read whole files when a single method signature would do.
🖱 Permission click fatigue — dozens of shell-command approvals per session.
🧹 Workspace noise — referenced repos pollute file search, git status, and the agent's context window.
With it:
✅ Correct code on the first try — real signatures, generic constraints, interface contracts, base class patterns.
⚡ Self-service context — point the agent at your NuGet repos once; it browses, searches, and reads autonomously.
🪙 Progressive disclosure — 200-token overview before 5,000 tokens of source. Most questions resolve at L1 or L2.
🧼 Zero workspace pollution — managed clones live outside your project tree.
🌐 Any Git host — GitHub, GitLab, Azure DevOps, Bitbucket, self-hosted — HTTPS or SSH.
Related MCP server: CodeGraph
🛠 How it works
Ten purpose-built tools, escalating from broad to deep. The agent picks the cheapest tool that answers its question.
┌─→ 📦 dig_package_overview ─┐
│ (docs, key types) │
🩺 dig_status → 📋 dig_list → 📖 dig_repo_overview ┤ ├─→ 🔎 dig_lookup → 📄 dig_file
(health) (discover) (README + summaries) │ │ (symbol → file) (full source)
├─→ 📁 dig_package_files ────┤
│ (file listing) │
└────────────────────────────┴─→ 📝 dig_signatures
(stripped API)
Operational: 🔄 dig_refresh (force cache invalidation, on demand)
Bootstrap: 🌱 dig_init (only when no config exists)🧰 Tools (10)
Tier | Tool | What it does |
Health | 🩺 | Config summary, connectivity check per repo, index health stats |
Discovery | 📋 | Lists configured repos + their packages with one-line |
L1 Overview | 📖 | Repo |
L1 Overview | 📦 | Package docs, key interfaces, abstract classes, file count |
L1 Overview | 📁 |
|
L2 Search | 🔎 | Indexed symbol search — |
L2 Search | 📝 | Stripped C# public API surface filtered by keyword (no method bodies) |
L3 Source | 📄 | Full source of a single file (capped at 1 MB) |
Operational | 🔄 | Force-rebuild caches for one or all repos |
Bootstrap | 🌱 | Creates starter |
Search modes for dig_lookup:
Mode | Finds |
| Type/method declarations matching a name substring |
| Classes/structs implementing an interface or extending a base class |
| Files referencing a given type name (word-boundary, case-sensitive) |
🚀 Quick start
Install
npm install -g mcp-digger
# or run directly
npx mcp-diggerRequires Node.js 20+, git on PATH, and a .NET / C# source repo (NuGet packages with .csproj + .cs sources).
Minimal config
Create .digger/config.json in your workspace root:
{
"repos": [
{
"name": "my-libraries",
"url": "https://github.com/org/shared-libs.git",
"packageFilter": "MyCompany.*",
"auth": {
"strategy": "pat",
"PAT-EnvVarName": "GIT_PAT"
}
}
]
}Don't have a config yet? Start the server, then call dig_init to scaffold one.
Agent setup
Add to .claude/settings.json or project settings:
{
"mcpServers": {
"digger": {
"command": "npx",
"args": ["-y", "mcp-digger"]
}
}
}Add to ~/.codex/config.toml (or .codex/config.toml for project-scoped):
[mcp_servers.mcp-digger]
command = "npx"
args = ["-y", "mcp-digger"]Add to claude_desktop_config.json:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"digger": {
"command": "npx",
"args": ["-y", "mcp-digger"]
}
}
}Add to .vscode/mcp.json (workspace) or your user mcp.json:
{
"servers": {
"digger": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-digger"]
}
}
}Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"digger": {
"command": "npx",
"args": ["-y", "mcp-digger"]
}
}
}Verify
Once connected, ask your agent to call dig_status — it reports config validation, per-repo connectivity, and index health.
⚙ Configuration
Repos & packages
A repos[] entry has three ways to declare packages:
Option | Behavior |
| Explicit list — these packages plus any local sibling project they pull in via |
| Wildcard — narrows to packages matching the prefix, found via |
(omit both) | Auto-discover all non-test |
sourceRoot defaults to "src" — set it to whichever directory holds your package folders. The walk is recursive, so nested layouts like src/Group/Foo/Foo.csproj are picked up.
By default, managed clones use the repo's default branch. Pin to a specific one:
{
"repos": [
{
"name": "my-libraries",
"url": "https://github.com/org/shared-libs.git",
"branch": "develop"
}
]
}The branch is used for both initial clone and subsequent fetches. Only applies to managed clones — for local repos, you control the checked-out branch yourself.
Skip managed cloning when the repo is already on disk. The local path is read-only — mcp-digger never fetches or modifies it.
{
"localRepos": {
"my-libraries": "C:/repos/shared-libs"
},
"repos": [
{
"name": "my-libraries",
"sourceRoot": "src"
}
]
}Strategy | Behavior |
| Try unauthenticated, fall back to PAT if set |
| Always use PAT (fatal if not set) |
| Never authenticate |
PATs can be inline ("PAT": "...") or via environment variable indirection ("PAT-EnvVarName": "MY_TOKEN"). The .env file in your workspace root is loaded automatically — values containing # should be quoted.
Variable | Default | Purpose |
|
| Override config file path |
|
| Override managed clone directory |
|
| Override cache directory |
Secrets (PAT values) belong in .env or the real environment — never as env vars in this table.
🩺 Diagnostics & recovery
Symptom | First call | Then |
Connection / auth issues |
| Reports auth attempts, exact error, actionable hints |
"No matches" but you expect some |
| Force-rebuilds index, picks up new extraction logic |
Server starts but no tools visible |
| If unconfigured, only |
Need a config from scratch |
| Scaffolds |
Debug log
Enable debug logging in your config:
{ "debug": true, "repos": [...] }Logs go to .digger/debug.log (capped at 5 MB, auto-truncated). Critical errors and crash output land in .digger/error.log.
💬 Feedback
Tried mcp-digger on your codebase? Share what worked, what broke, what's missing in GitHub Discussions. Bug reports go in Issues.
📜 License
MIT License — see LICENSE.
Available Tools
2 toolsdig_initDig InitAIdempotent
Bootstrap mcp-digger by creating a starter config file. Only available when no config exists. After running, edit the generated template with your repository details, then restart the MCP server to activate all tools.
Inputs: no named parameters.
dig_statusDig StatusARead-onlyIdempotent
Health-check tool — validates mcp-digger configuration and tests git connectivity for all configured repositories. Call this to verify setup is correct, diagnose auth or network issues, or confirm repos are reachable before digging into source.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: dig_init creates a starter config, while dig_status validates connectivity and configuration. There is no overlap.
Both tools consistently use the 'dig_' prefix and verb_noun pattern (init, status) in snake_case, making the naming predictable.
With only two tools, the server feels thin for a tool named 'digger' that presumably should provide git analysis capabilities. The description hints at more tools after configuration, but currently only init and status are defined.
The server lacks core digging functionality (e.g., analyzing commits, blame, changes). It only covers initialization and health-check, leaving a major gap in the expected tool surface.
Maintenance
Related MCP Connectors
The context platform for AI agents: code search, team decisions, and grounded project context.
Codebase intelligence for AI agents — dead code, blast radius, ownership.
Package intelligence for AI agents across npm, PyPI, crates.io and deps.dev. No API keys.
Package intelligence for AI agents across npm, PyPI, crates.io and deps.dev. No API keys.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceCodeMap is a Roslyn-powered MCP server that lets AI agents navigate C# codebases by symbol, call graph, and architectural fact, instead of brute-force reading thousands of lines of source code. One tool call. Precise answer. No context flood.24-
- AlicenseNot gradedqualityDmaintenanceSupercharges AI coding agents with semantic code intelligence, providing pre-built knowledge graphs for surgical context, faster answers, and fewer tool calls.MIT
- FlicenseAqualityDmaintenanceProvides codebase indexing and retrieval tools that give AI agents token-efficient, query-relevant context packages (symbols, imports, and dependencies) instead of scanning entire repositories.6-
- AlicenseNot gradedqualityBmaintenanceGives AI coding agents real .NET tooling: Roslyn code navigation and refactoring, build/test with affected-test selection, git, and parallel orchestration as a dependency graph.MIT