Skip to main content
Glama

deepseek-mcp

A local MCP server that makes DeepSeek available to your primary coding agent for code review and second opinions.

The server reads the repo itself. Your agent passes a git ref or a list of paths — never the code — so a review costs about twenty tokens on the way in instead of several thousand.

Tools

Tool

Use it for

Model

review_changes

Review a diff. Uncommitted work by default, or a branch via base.

review

review_files

Review whole files — architecture, an unfamiliar module, a suspected bug.

review

consult

Ask a specific question. Supports multi-turn via history.

consult

All three are read-only and take paths, not content.

Related MCP server: ProjectBrain

Install

npm i -g @berrydev-ai/deepseek-mcp

That puts a deepseek-mcp binary on your PATH; no checkout needed. Or skip the install and let your MCP client fetch it on demand with npx -y @berrydev-ai/deepseek-mcp, at the cost of a slower cold start.

One caveat if you install from source instead: avoid npm i -g git+https://github.com/berrydev-ai/deepseek-mcp.git. On npm 10.x it appears to succeed but symlinks the global package at a bare clone in the cache with no working tree, leaving bin dangling. Use the registry, or a tarball. dist/ is committed so that installing from git or a tarball still works — a global install has no devDependencies, so nothing can compile at install time.

Configure

There is no dotenv loader. The server reads process.env and nothing else, so .env is a reference for what to set rather than a file that gets read. Configuration belongs in your MCP client's env block.

Claude Code

claude mcp add deepseek -s user -e DEEPSEEK_API_KEY=sk-... -- deepseek-mcp

-s user registers it across all your projects. Without it the default is local scope, which is limited to the directory you ran the command in.

Codex

codex mcp add deepseek --env DEEPSEEK_API_KEY=sk-... -- deepseek-mcp

Note --env rather than Claude's -e, and that the command to launch goes after -- in both. Codex writes to ~/.codex/config.toml globally, so there is no scope flag to think about. The equivalent by hand:

[mcp_servers.deepseek]
command = "deepseek-mcp"

[mcp_servers.deepseek.env]
DEEPSEEK_API_KEY = "sk-..."

Verify with codex mcp get deepseek, and codex mcp remove deepseek to undo.

Any other MCP client

{
  "mcpServers": {
    "deepseek": {
      "command": "deepseek-mcp",
      "env": {
        "DEEPSEEK_API_KEY": "sk-..."
      }
    }
  }
}

Note that a missing key does not stop the server from starting, so the client will report it as connected either way — assertConfigured only fires on the first tool call. If every call comes back with "DEEPSEEK_API_KEY is not set", the env block is the place to look.

The server operates on its working directory, which is normally your project. Set DEEPSEEK_REPO_ROOT to override.

Local development

git clone https://github.com/berrydev-ai/deepseek-mcp.git
cd deepseek-mcp && npm install && npm run build

Run npm run build and commit dist/ alongside any source change, otherwise installs keep serving the previous build.

Direct or through AI Gateway

One env var, no code change. https://api.deepseek.com is the default and has no dependencies. Pointing DEEPSEEK_BASE_URL at a Cloudflare AI Gateway endpoint instead gets you request logs, spend caps, caching and the ability to swap models without touching this repo — worth it the moment you want to compare two models on the same review.

Tuning the prompts

prompts/review.md and prompts/consult.md are the entire behaviour of the server. They are plain markdown; edit and restart. Both are written to keep output tight, because whatever DeepSeek returns lands in your primary agent's context window and competes with everything else there.

The review prompt enforces severity grouping and file:line anchors, and forbids restating what the code does. If reviews come back vague, the fix is almost always in that file rather than in the TypeScript.

Getting it actually invoked

The most common failure mode is not a bug — it is that the primary agent never calls the tool. Coding agents are reluctant to delegate. The tool descriptions are written to draw a clear line (substantial changes yes, one-line edits no), but you may still need to ask for it explicitly at first, or add a line to your CLAUDE.md telling the agent to get a DeepSeek review before opening a PR.

Delegation only pays for itself on work that involves reading and analysing real amounts of code. On small tasks the per-call overhead dominates.

Guards

  • Paths are resolved and rejected if they escape the repo root.

  • Git refs are validated so an argument cannot be smuggled in as an option.

  • Input is truncated at a character budget, and the response says when that happened.

  • Model calls abort at 55s, below the ~60s tool-call timeout most clients enforce, so you get a clear message rather than a hang.

  • Every response carries a footer with file count, model and token usage.

Notes

Built on @modelcontextprotocol/server v2 via serveStdio, which serves both the 2025 and 2026-07-28 protocol revisions from one factory — clients on either revision work without configuration.

Model defaults are deepseek-v4-flash for reviews and deepseek-v4-pro for consults. Check them against whichever endpoint you point at — the names move over time.

Watch out for the older deepseek-chat and deepseek-reasoner names. They still return 200, but the response comes back as deepseek-v4-flash, so a stale value costs you the reasoning model without ever raising an error. The model in the response footer is read from the provider's reply rather than from your config, so it will tell you what actually ran.

License

MIT — see LICENSE.

Available Tools

3 tools
consultConsult DeepSeekA
Read-only

Ask DeepSeek a specific engineering question as a second opinion — design trade-offs, a decision you are unsure about, or a bug you cannot place. Attach files by path rather than pasting them. For multi-turn exchanges, pass the prior turns in history so the answer builds on them.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathsNoRepo-relative files to attach as context. The server reads them.
contextNoAnything relevant that is not in the files — constraints, symptoms, goals.
historyNoPrior turns of this consultation, oldest first.
questionYesThe specific question. State what you have already tried or ruled out.

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so safety is covered. The description adds valuable behavioral context: files are attached by path (not pasted), and prior turns are passed via 'history' to build on them. No contradiction with annotations.

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?

Three sentences, front-loaded with purpose, followed by two essential usage tips. Every sentence earns its place with no redundancy or filler.

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?

The description fully covers the tool's purpose, main use cases, and important parameters. With 100% schema coverage and readOnly annotation, it provides enough context for an agent to select and invoke the tool correctly. No output schema needed for this Q&A 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?

Schema coverage is 100%, giving baseline 3. The description adds practical guidance beyond schema: 'Attach files by path rather than pasting them' clarifies 'paths', and 'pass the prior turns in history' clarifies 'history'. This adds meaning for parameter usage.

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 uses a specific verb ('Ask') with resource 'DeepSeek' and scope 'a specific engineering question as a second opinion', listing concrete use cases. This clearly distinguishes it from sibling review tools which focus on reviewing changes or files.

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?

The description gives clear context on when to use this tool (design trade-offs, uncertain decisions, hard-to-place bugs) and practical guidance on file attachment and multi-turn history. It does not explicitly name alternatives or state when-not-to-use, but the use cases make the intended usage clear.

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

review_changesReview changes with DeepSeekA
Read-only

Get an independent code review from DeepSeek on the current git changes. The server runs the diff itself, so do NOT paste code into this call — just say which changes to look at. Worth using for substantial changes (a feature, a refactor, anything before a PR); not worth the round trip for one-line edits. Returns findings grouped by severity with file:line anchors.

ParametersJSON Schema
NameRequiredDescriptionDefault
baseNoGit ref to compare against, e.g. "main". Omit to review uncommitted work against HEAD.
focusNoWhat to weight most, e.g. "concurrency safety" or "the new caching layer". Include anything the reviewer would need that is not visible in the diff.
pathsNoLimit the diff to these paths, relative to the repo root.

TDQS

A4.5/5.0
Behavior5/5

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

The description adds critical behavioral context beyond the readOnlyHint and openWorldHint annotations: the server runs the diff itself and the user must NOT paste code. It also discloses the return format ('findings grouped by severity with file:line anchors'), giving the agent a clear expectation of output. This is genuinely helpful and non-redundant.

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?

Four sentences, front-loaded with the core purpose, then usage guidance, a critical behavioral warning, and output format. Every sentence earns its place with no redundancy or fluff.

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?

Despite no output schema, the description explains exactly what the tool does, when to use it, a key usage caveat, and the return structure. Annotations cover safety and open-world assumptions. The description is fully self-sufficient for an agent to select and invoke the tool correctly.

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

Parameters3/5

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

The input schema already provides 100% description coverage for all three optional parameters (base, focus, paths). The description's mention of 'which changes to look at' is consistent with the path/focus parameters but adds little semantic detail beyond the schema. Baseline of 3 is appropriate.

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 function: 'Get an independent code review from DeepSeek on the current git changes.' The verb 'get' plus the resource 'current git changes' is specific and distinguishes it from siblings like review_files (file-level) and consult (general consultation).

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?

The description provides explicit when-to-use guidance ('Worth using for substantial changes... anything before a PR') and when-not-to-use ('not worth the round trip for one-line edits'). It does not explicitly name alternatives, but the context is clear enough for an agent to decide between this and related tools.

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

review_filesReview whole files with DeepSeekA
Read-only

Get a DeepSeek review of complete files rather than a diff. Use when the question is about existing code rather than a change — architecture, a suspected bug, or an unfamiliar module. Pass paths only; the server reads them.

ParametersJSON Schema
NameRequiredDescriptionDefault
focusNoWhat to weight most, and any context not visible in the files.
pathsYesRepo-relative file paths to review.

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description adds the useful detail that the server reads the files, so the agent does not need to read them itself. This clarifies the execution model and aligns with openWorldHint, though it does not discuss limits or response structure. No contradictions found.

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?

The description is two sentences, front-loaded with the core purpose in the first sentence and usage context in the second. Every sentence earns its place with no redundancy or filler.

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?

The tool is simple with two parameters, good annotations, and no output schema. The description covers purpose, usage, and calling convention. It does not explicitly describe the return format, but for a review tool the output is implied as the review itself, so completeness is sufficient.

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

Parameters3/5

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

The schema already covers both parameters with descriptions (repo-relative paths, focus). The description adds 'Pass paths only; the server reads them', which reinforces the paths parameter but does not introduce new semantic meaning. With high schema coverage, baseline 3 is appropriate.

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 provides a DeepSeek review of complete files (resource) rather than a diff. It explicitly contrasts with diff-based review and gives example use cases (architecture, suspected bug, unfamiliar module), making the purpose unmistakable. The verb 'Get' is specific to the action.

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?

The description gives explicit usage context: use when the question is about existing code rather than a change, and lists concrete scenarios. It says 'rather than a diff' which implies the sibling tool review_changes, but it does not explicitly name the alternative tool, so it stops short of full explicitness.

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. 3 tool updatesv0.1.0
    • First observedconsult
    • First observedreview_changes
    • First observedreview_files

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: review_changes focuses on git diffs, review_files on complete files, and consult on general engineering questions. There is no overlap or ambiguity in what each tool does.

Naming Consistency4/5

Two tools follow a consistent verb_noun pattern (review_changes, review_files), while consult is a single verb but still clear and in line with the action-oriented naming. Minor deviation from the review_ prefix but not chaotic.

Tool Count5/5

Three tools is a well-scoped set for the server's purpose of providing DeepSeek-powered code assistance. Each tool covers a distinct need without unnecessary redundancy.

Completeness5/5

The tool surface covers the full range of use cases for the domain: reviewing changes, reviewing existing files, and asking general engineering questions. No obvious gaps exist for an AI consultation server.

Maintenance

ActivityMaintained
ResponsivenessSyncing

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

  • A
    license
    C
    quality
    D
    maintenance
    A privacy-first MCP server that provides local LLM-enhanced tools for code analysis, security scanning, and automated task execution using backends like Ollama and LM Studio. It enables symbol-aware code reviews and workspace exploration while ensuring that all code and analysis remain strictly on your local machine.
    36
    ISC
  • A
    license
    B
    quality
    B
    maintenance
    Local MCP server providing project cognition capabilities for AI coding agents, including context packs, impact analysis, and git diff review through stdio communication.
    10
    3
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    A self-hosted MCP server that enables AI coding agents to read, edit, search, and run code in local projects with human review loops and policy controls.
    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/berrydev-ai/deepseek-mcp'

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