Skip to main content
Glama
npx dsh-codebase-chat-mcp setup
NOTE

Point it at a folder of code on your computer. Ask questions like a human —"How does login work?", "Is there a hardcoded password?", "What should I fix first?" — in French or English. Every answer cites the exact file and line it came from, so you can verify it in seconds. Nothing is uploaded anywhere.

Pointez-le vers un dossier de code sur votre ordinateur. Posez des questions en langage clair — « Comment fonctionne la connexion ? », « Y a-t-il un mot de passe codé en dur ? », « Que devrais-je réparer en premier ? » — en français ou en anglais. Chaque réponse cite exactement le fichier et la ligne d'où elle vient. Rien n'est envoyé sur internet.

Term

Plain meaning

MCP server

A plug format that lets AI assistants (Claude, Cursor…) use extra tools. Install once — your IDE can "see" your code.

Index

Like the index at the back of a book — a map of every function and file, so answers are instant.

Prompt-only mode

The tool prepares the context; your existing AI writes the answer. No extra API key, no extra cost.

Deterministic analysis

Checks computed directly from your code — same input, same result, every time. No guessing.

Local-first

Indexing, retrieval and prompt building never leave your machine.

Bilingual

Every prompt, report and UI string in French and English.

Everywhere

DeepSeek Harness plugin, MCP server (Cursor, Claude, Windsurf…), plain CLI.

Decision-grade

Not just answers — CTO briefs, audits, TASKS.md plans, board reports.

Zero-cost mode

Prompt-only: your host model does the thinking. No API key needed.

Real AST

Babel for JS/TS + tree-sitter WASM for Python, Go, Rust, Java, C#, PHP.

Paste code into a chat

Hosted code assistant

dsh-codebase-chat

Sees your whole repo, not one file

[source: file:line] citations

~

Code stays on your machine

Works inside Claude / Cursor / Windsurf

~

Deterministic health score, no LLM

Free, no API key required

~

Understand

Decide

codebase_chat — Q&A with cited sources

codebase_intelligence — full CTO brief: architecture, debt, security, roadmap

codebase_search — symbols & usages repo-wide

codebase_audit — tech-debt scan with severity

codebase_explain — file/symbol explanation

codebase_report — board report: SWOT, risks, opportunities

codebase_healthdeterministic static analysis, no LLM

codebase_ceo — one-page executive brief

Act

Explore

codebase_refactor — concrete refactor + Before/After diff

codebase_player — UX playthrough brief, user's POV

codebase_tasks — sprinted TASKS.md action plan

codebase_crea — creative & marketing angles from the code

Common parameters: projectPath, lang (fr/en), embed (local embeddings), promptOnly (MCP), maxTokens (context budget).

dsh --profile headless '/codebase "how is auth handled?" --project C:\my-app'
dsh --profile headless '/codebase-search "usePetStore" --project C:\my-app'
dsh --profile headless '/codebase-explain "storage.ts" --project C:\my-app'
dsh --profile headless '/codebase-refactor "split this hook" --file storage.ts --project C:\my-app'
dsh --profile headless '/codebase-intel --project C:\my-app'
dsh --profile headless '/codebase-audit --project C:\my-app --lang en'
dsh --profile headless '/codebase-tasks --project C:\my-app'
dsh --profile headless '/codebase-apply-tasks --project C:\my-app'
dsh --profile headless '/codebase-build --project C:\my-app'
dsh --profile headless '/codebase-git --project C:\my-app'
flowchart LR
    subgraph LOCAL["Your machine — local-first"]
        direction TB
        A["Source files<br/><sub>JS · TS · Py · Go · Rust · Java · C# · PHP</sub>"]
        B["AST index<br/><sub>Babel + tree-sitter WASM<br/>incremental cache</sub>"]
        C["Retrieval<br/><sub>lexical + local embeddings<br/>token-budgeted</sub>"]
        D["Sourced briefing<br/><sub>module graph · metrics · debt signals</sub>"]
        H["Deterministic analysis<br/><sub>cycles · dead code · duplication · score</sub>"]
        A --> B --> C --> D
        B --> H
    end

    D -->|"promptOnly (default)"| F["Host model<br/><sub>Claude · Cursor · Windsurf · Devin</sub>"]
    D -->|"API key set"| G["DeepSeek / OpenAI"]
    F --> R["Cited answer<br/><sub>[source: file:line] · [Confidence] · [Severity]</sub>"]
    G --> R
    H -.->|"no LLM needed"| R

    style LOCAL fill:#0b0e14,stroke:#4ade80,stroke-width:2px,stroke-dasharray:6 4
    style R fill:#0f1a12,stroke:#4ade80
    style D fill:#10141c,stroke:#fbbf24

Step

What happens

1 · Index

Real AST extraction maps every function, class and import — cached on disk, refreshed incrementally (mtime/size based, no full re-reads).

2 · Retrieve

Lexical scoring + optional local multilingual embeddings pick the chunks that matter inside your token budget.

3 · Prompt

A language-aware briefing is assembled — module graph, metrics, debt signals, file excerpts, citation rules.

4 · Answer

Your model responds with [source: file:line], [Confidence: X%], [Severity: …] — verifiable in seconds.

Safe apply pipeline/codebase-apply and /codebase-apply-tasks support dry-run, create .dsh-backups/ copies before overwriting, enforce protected paths, and never write outside the selected project.

MCP server — recommended

npx dsh-codebase-chat-mcp setup

Detects Claude, Cursor, Windsurf, VS Code and writes the config. No API key — prompt-only mode.

DeepSeek Harness plugin

dsh plugin --profile web add dsh-codebase-chat

Then restart dsh webhttp://127.0.0.1:3080Codebase Pro button.

CLI

npx dsh-codebase-chat --project C:\my-app --ask "how is auth handled?"
npx dsh-codebase-chat --project C:\my-app --health   # offline, no LLM

First run builds a cached index; subsequent runs are incremental.

From source

git clone https://github.com/shinzarou-eng/dsh-codebase-chat.git
cd dsh-codebase-chat
pnpm install && pnpm build

Manual MCP config

{
  "mcpServers": {
    "dsh-codebase-chat": {
      "command": "npx",
      "args": ["dsh-codebase-chat-mcp"]
    }
  }
}
TIP

No API key needed. Without DEEPSEEK_API_KEY / OPENAI_API_KEY, the server runs in promptOnly mode and hands the assembled context to your host model. See mcp/README.md for direct-LLM configuration.

{
  "lang": "en",
  "maxTokens": 60000,
  "ignoreDirs": ["generated", "fixtures"],
  "ignoreFiles": ["bundle.js"],
  "ignoreGlobs": ["src/vendor/**", "*.snap"],
  "protectedPaths": ["src/locked", "migrations"]
}

Key

Effect

lang

Default prompt language (en or fr) for CLI, MCP tools and slash commands

maxTokens

Default context budget when the caller passes none

ignoreDirs

Extra directory names skipped by indexing, codebase_health and the file tree

ignoreFiles

Extra file names skipped the same way

ignoreGlobs

Globs on project-relative paths — ** spans directories, * one segment, ? one char

protectedPaths

Extra paths the apply pipeline can never patch

Variable

Default

Purpose

CODEBASE_CACHE_DIR

OS cache dir

Where the index cache lives

DSH_PROJECT_ALIASES

Extra name=path project aliases (;-separated)

DSH_DAKO_PROJECT

Override the built-in dako alias target

DSH_PROTECTED_PATHS

built-in list

Extra paths that can never be patched

DEEPSEEK_API_KEY / OPENAI_API_KEY

MCP direct-LLM mode only

DEEPSEEK_BASE_URL / OPENAI_BASE_URL

https://api.deepseek.com/v1

Custom endpoint

CODEBASE_MODEL

deepseek-chat

Model for direct-LLM mode

├── lib/            DeepSeek Harness plugin (index.js) + Codebase Pro UI (client.js)
├── src/            TypeScript engine — indexer, extractor, retriever, tokenizer, context, CLI
├── mcp/            Standalone MCP server package (dsh-codebase-chat-mcp)
├── test/           Vitest suites (extractor, retriever, tasks pipeline)
├── docs/           Landing page (GitHub Pages) + assets
└── dist/           Build output (tsup)
pnpm install      # install workspace deps
pnpm build        # tsup → dist/
pnpm test         # vitest run
pnpm typecheck    # tsc --noEmit
Get-NetTCPConnection -LocalPort 3080 | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force }

Then restart dsh --profile web.

Shipped

tree-sitter AST (7 languages), deterministic health score, MCP setup wizard, .codebase-chat.json config

Next

watch mode, GitHub Issues export from TASKS.md, diff-aware retrieval

Planned

VS Code extension, HTTP/SSE transport, PR review mode, report export (HTML/PDF)

Exploring

multi-repo workspaces, shared team index cache, CI bot


Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Enterprise-grade (40m+ lines) codebase intelligence in a zero-setup, private and local MCP: managed indexing, hybrid semantic search, polyglot code dependency graphs, and DB/API/infra knowledge. Benchmark: 61% less tokens, 84% fewer calls, 37x faster than standard AI grep.
    25
    3,695
    3,294
    AGPL 3.0
  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that extracts complete knowledge from any codebase — architecture, patterns, dependencies, API surface. Combines static analysis with AI-powered deep interpretation.
    8
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Local repository intelligence MCP server that builds a reusable graph of code structure for AI coding agents, providing 34 network-free tools for understanding, searching, and analyzing repositories without data leaving the machine.
    40
    MIT