Skip to main content
Glama
janeksm
by janeksm

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 .csproj packages and .cs source 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 gatheringgit clone + find + grep + cat chains 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: Carto MCP Server

🛠 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

🩺 dig_status

Config summary, connectivity check per repo, index health stats

Discovery

📋 dig_list

Lists configured repos + their packages with one-line .csproj summaries

L1 Overview

📖 dig_repo_overview

Repo README.md (filtered to architecture sections) + package count

L1 Overview

📦 dig_package_overview

Package docs, key interfaces, abstract classes, file count

L1 Overview

📁 dig_package_files

.cs file listing for a package, with directory summary header

L2 Search

🔎 dig_lookup

Indexed symbol search — symbol, implements, or references mode. Cross-package supported.

L2 Search

📝 dig_signatures

Stripped C# public API surface filtered by keyword (no method bodies)

L3 Source

📄 dig_file

Full source of a single file (capped at 1 MB)

Operational

🔄 dig_refresh

Force-rebuild caches for one or all repos

Bootstrap

🌱 dig_init

Creates starter .digger/config.json (registered only when no config is found)

Search modes for dig_lookup:

Mode

Finds

symbol (default)

Type/method declarations matching a name substring

implements

Classes/structs implementing an interface or extending a base class

references

Files referencing a given type name (word-boundary, case-sensitive)


🚀 Quick start

Install

npm install -g mcp-digger
# or run directly
npx mcp-digger

Requires 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.json

  • macOS: ~/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

"packages": ["A", "B"]

Explicit list — these packages plus any local sibling project they pull in via <ProjectReference> (transitive, sibling-only).

"packageFilter": "MyCompany.*"

Wildcard — narrows to packages matching the prefix, found via .sln/.slnx/Directory.Packages.props workspace scan. Follows transitive ProjectReference links automatically.

(omit both)

Auto-discover all non-test .csproj directories under sourceRoot (recursive — nested layouts supported).

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

auto (default)

Try unauthenticated, fall back to PAT if set

pat

Always use PAT (fatal if not set)

none

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

DIGGER_CONFIG

.digger/config.json

Override config file path

MANAGED_SOURCE_DIR

.digger/source

Override managed clone directory

CACHE_DIR

.digger/cache

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

dig_status

Reports auth attempts, exact error, actionable hints

"No matches" but you expect some

dig_refresh <repo>

Force-rebuilds index, picks up new extraction logic

Server starts but no tools visible

dig_status

If unconfigured, only dig_status + dig_init are registered

Need a config from scratch

dig_init

Scaffolds .digger/config.json (atomic — won't overwrite existing)

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 tools
dig_initDig InitA
Idempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare idempotentHint=true and destructiveHint=false. Description adds that the tool is only available when no config exists, which clarifies the idempotency constraint—running it multiple times may cause errors. This goes beyond annotations by specifying availability condition and required restart.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with no wasted words. The description is front-loaded with the main action and then provides usage constraints and follow-up steps. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema and no parameters, the description covers the init process, availability condition, and required post-step. It does not mention error cases or output (e.g., what file is created), but given the simplicity, it is nearly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, and schema coverage is 100%. Baseline for 0 parameters is 4, and the description appropriately focuses on what the tool does without needing param details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool bootstraps mcp-digger by creating a starter config file. It specifies the action (create) and the resource (starter config file). The sibling tool 'dig_status' likely checks status, so this distinguishes initialization from status checking.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states 'Only available when no config exists', setting clear usage condition. Also provides post-run instructions (edit template, restart server). Could mention that dig_status is for checking status but not necessary for a one-time setup tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

dig_statusDig StatusA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, and non-destructive. The description adds minor context about what is being tested (auth, network), but does not go beyond what annotations imply. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the main purpose, and no unnecessary information. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters and no output schema, the description covers all necessary context: purpose, usage scenarios, and limitations. Complete for a simple health-check tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, so the description cannot add parameter semantics. The baseline for zero parameters is 4, and the description is sufficient.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: a health-check that validates configuration and tests git connectivity. It distinguishes from the sibling 'dig_init' by focusing on verification and diagnosis before actual digging.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to call for verifying setup, diagnosing auth/network issues, or confirming repos are reachable. Implicitly suggests use before other tools, but does not explicitly state when not to use or mention alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.1.3
    • First observeddig_init
    • First observeddig_status

TDQS

A4.1/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: dig_init creates a starter config, while dig_status validates connectivity and configuration. There is no overlap.

Naming Consistency5/5

Both tools consistently use the 'dig_' prefix and verb_noun pattern (init, status) in snake_case, making the naming predictable.

Tool Count2/5

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.

Completeness2/5

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

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    B
    maintenance
    CodeMap 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.
    19
    -
  • A
    license
    Not graded
    quality
    A
    maintenance
    Supercharges AI coding agents with a pre-indexed semantic code graph, enabling instant symbol relationships, impact analysis, and context retrieval across 20+ languages.
    113,765
    69,062
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Supercharges AI coding agents with semantic code intelligence, providing pre-built knowledge graphs for surgical context, faster answers, and fewer tool calls.
    MIT

Latest Blog Posts

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/janeksm/mcp-digger'

If you have feedback or need assistance with the MCP directory API, please join our Discord server