Skip to main content
Glama
DeepSeek MCP Connector

DeepSeek MCP Connector

by Vandreye

DeepSeek MCP Connector

Use DeepSeek as a cheap subagent for Claude Code, in the terminal or in VS Code. Claude stays the orchestrator. It hands tasks such as planning, coding, reviews, bug fixes, debugging, tests and docs to DeepSeek, and gets back a short report. That saves Claude tokens.

  • You choose who does what. A routing table you control says which task types go to DeepSeek, which stay with Claude, and which ask you first. Slash commands override it for a single task.

  • DeepSeek works on its own. It reads, searches, creates and edits files and runs your tests in a loop until the job is done. Claude only sees a compact report of roughly 800 tokens or less.

  • Deletes need your permission. DeepSeek has no delete tool. It can only request a delete, and nothing happens until you approve. Deleted files are moved to a trash folder, not destroyed.

  • Sandboxed to the project. DeepSeek can't reach files outside the workspace, .git internals, or secrets like .env and keys. Commands are limited to an allowlist.

How it works

You ─▶ Claude Code (orchestrator) ──MCP──▶ deepseek-mcp (local) ──▶ DeepSeek API
                    ▲                             │  agent loop with file/search/test tools,
                    └──── compact report ◀────────┘  jailed to the project folder

Related MCP server: Nanites

Setup

  1. Get an API key at platform.deepseek.com. Then do one of these:

    • Set it as a user environment variable, for example in PowerShell: setx DEEPSEEK_API_KEY "sk-...". Restart VS Code afterwards.

    • Or save it in the file %USERPROFILE%\.deepseek-mcp\api-key.

  2. Build and install:

    npm install
    npm run build
    npm run setup

    npm run setup does four things:

    • registers the MCP server user-wide (claude mcp add deepseek --scope user ...)

    • installs the slash commands into ~/.claude/commands

    • creates your routing table

    • adds a permission rule so that approve_actions always asks you

    Add -- --allow-tools if Claude shouldn't ask you before every DeepSeek call. Approving deletes still asks either way.

  3. Restart Claude Code or VS Code and run /mcp. deepseek should show as connected.

Choosing who does what

Routing lives in ~/.deepseek-mcp/routing.json. You can override it per project in <project>/.deepseek-mcp/routing.json.

{ "plan": "claude", "code": "deepseek", "review": "claude", "bugfix": "deepseek",
  "debug": "deepseek", "research": "deepseek", "tests": "deepseek", "docs": "deepseek",
  "question": "deepseek", "default": "claude" }

Each value is deepseek, claude or ask. With ask, Claude asks you each time. The server enforces the table too: if Claude tries to send DeepSeek a task type you routed to Claude, the server refuses unless you explicitly asked for DeepSeek.

Command

What it does

/route

Open a menu to pick who handles each task type

/route show

Show the routing, default models and thinking effort

/route code deepseek review claude

Change who handles a type (add --project to change only this project)

/route review pro debug pro

Set DeepSeek's default model per task type

/route review high code off, /route all auto

Set DeepSeek's thinking effort (off, low, medium, high, max, auto) per task type; stored in efforts.json

/ds <task>

Send this task to DeepSeek, whatever the routing says

/ds review <task>, /ds code …, /ds bugfix …, /ds debug …, /ds tests …, /ds plan …

Same, with a specific role

/ds research <question>

DeepSeek researches the codebase and the web (read-only, cites URLs)

/ds-approve [ids|all|reject ids]

See or answer DeepSeek's pending deletes and commands

You can also just say it: "have DeepSeek review this" or "do this one yourself".

Tools Claude gets

Tool

Purpose

deepseek_task

Delegate a task. DeepSeek works until done and returns a compact report. task_id continues an earlier task cheaply, because DeepSeek's prompt cache is reused. areas: ["auth", "feeds"] splits a big job into parallel sub-tasks with one merged report. max_steps / max_tokens raise the budget for one call. web: true gives read-only tasks web_search / web_fetch.

deepseek_ask

One-shot question with optional files, no tools. A cheap second opinion.

deepseek_get_report

Fetch details only when needed: summary, files, a diff, command output, or the tool-call trace.

deepseek_routing

Show or change the routing and the default model per task type.

list_pending_approvals / approve_actions / reject_actions

Handle the delete and command queue.

Models and cost

The default is deepseek-flash. Claude can pick pro (deepseek-v4-pro) for hard tasks. To always use pro for a task type, set it once with /route review pro; it is stored in ~/.deepseek-mcp/models.json (or <project>/.deepseek-mcp/models.json), for example { "review": "pro", "default": "flash" }. Every report ends with DeepSeek's token use (including how much went on thinking) and a cost estimate that applies DeepSeek's off-peak half price outside 01:00-04:00 and 06:00-10:00 UTC on weekdays. Chinese public holidays are not tracked, so the estimate stays an upper bound. Web searches and fetches cost $0.75 per 1,000.

Long runs stay cheap: cached input (the re-sent history) counts at 10% toward the token budget, and once a prompt passes about 200k tokens, old tool outputs are shortened to one-line summaries.

Safety

See docs/security.md. In short:

  • DeepSeek has no delete tool.

  • Commands outside the allowlist wait for you.

  • Edited files are backed up to .deepseek-mcp/backups/ and deleted files go to .deepseek-mcp/trash/.

  • Every action is logged to .deepseek-mcp/logs/.

The .deepseek-mcp/ folder ignores itself in git.

Code you delegate is sent to DeepSeek's API, which is hosted in China. Secret files are never sent, but don't delegate code you can't share.

Configuration

All settings are optional environment variables; see .env.example. Useful ones:

  • DEEPSEEK_ALLOW_COMMANDS: extra auto-allowed commands, for example make test;cargo fmt --check

  • DEEPSEEK_MAX_STEPS: how many tool-loop steps a task may take (default 25)

  • DEEPSEEK_MAX_STEPS_REVIEW / _RESEARCH / _DEBUG / _PLAN: higher limits for those types (defaults 80 / 80 / 50 / 40)

  • DEEPSEEK_THINKING=enabled: turn thinking on for every type; it is off for code/tests/docs/question/general and on at low effort for plan/review/debug/bugfix/research. Per type: DEEPSEEK_THINKING_<TYPE>, DEEPSEEK_REASONING_EFFORT[_<TYPE>]

  • DEEPSEEK_ELICITATION=off: stop the server prompting you directly (then approve_actions acts on Claude's word)

  • DEEPSEEK_WEB=on: allow web_search / web_fetch (off by default; /ds research then searches the web, otherwise it researches the workspace only)

  • DEEPSEEK_STRICT_TOOLS=on: strict tool schemas (DeepSeek beta; tool-using calls go to the /beta API), so tool arguments always match their schema. Off by default: in the benchmark they cost about 20% more DeepSeek tokens (more steps, longer tool calls) with no quality gain

Development

npm test            # unit tests (no API key needed)
npm run check:live  # live checks of strict tools and web search (uses your API key, < $0.01)
npm run build
npm run inspect     # MCP Inspector, to call the tools by hand

Available Tools

7 tools
approve_actionsA

Carry out queued DeepSeek requests (deletes/commands). ONLY when the user explicitly approves these ids.

Inputs: ids (required).

deepseek_askB

One-shot question to DeepSeek, no tools (cheap second opinion). Routed as type 'question'. Pass file paths to include them.

Inputs: question (required), files, model, workspace, +1 more.

deepseek_get_reportC

Fetch one part of a past task's full report. Only when needed: it costs Claude tokens.

Inputs: section (required), task_id (required), path.

deepseek_routingA

Show or change which agent handles each task type, DeepSeek's default model and thinking effort per type (the user's choice). Only change it when the user asks.

Inputs: set, scope, effort, models, +1 more.

deepseek_taskA

Hand a task to DeepSeek (cheap subagent; reads/writes files, runs tests, works until done). USER ROUTING: plan→claude, code→deepseek, review→claude, bugfix→deepseek, debug→deepseek, research→deepseek, tests→deepseek, docs→deepseek, question→deepseek, other→claude. Only use for types routed to deepseek, or when the user explicitly asked for DeepSeek (set user_override). "ask" = ask the user first. Omit model to use the user's default (see deepseek_routing). Give file paths, not contents. Big jobs: pass areas=[...] for parallel sub-tasks with one merged report. Returns a compact report.

Inputs: task (required), web, type, areas, +10 more.

list_pending_approvalsA

List DeepSeek's queued delete/command requests waiting for the user's approval.

Inputs: no named parameters.

reject_actionsC

Discard queued DeepSeek requests.

Inputs: ids (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 7 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes: ask, task, report retrieval, routing, and approval actions. The main overlap is between deepseek_ask and deepseek_task for question-type work, though the descriptions clarify the intended difference between a cheap one-shot answer and a full subagent task.

    Naming Consistency4/5

    The set consistently uses snake_case and mostly follows a verb_noun pattern (ask, get_report, list, approve, reject). Minor deviations are the noun-style names deepseek_task and deepseek_routing, plus the deepseek_ prefix not being applied to the approval tools.

    Tool Count5/5

    Seven tools is well-scoped for a delegation/approval connector. Each tool covers a distinct capability: asking, delegating, retrieving reports, configuring routing, and managing pending approvals.

    Completeness4/5

    The approval lifecycle is fully covered (list, approve, reject), and delegation has ask, task, report retrieval, and routing controls. Minor gaps remain around task status/cancellation and discovering past task IDs, but core workflows are supported.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Enables Claude Code and Claude Desktop to delegate bounded, disposable tasks to local or cheap cloud models, with model scoring, guardrails, and cost-saved tracking.
      53
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables Claude to delegate web search, page reading, text drafting, and parallel multi-model image generation to cheaper helper models on any OpenAI-compatible backend. Claude stays in charge of planning and final decisions while consuming fewer of its own tokens.
      5
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables Claude Code and other MCP clients to hand bounded work — code review, test stubs, commit messages, docs, format conversion, mock data, embeddings — to a local GPU model or a cheap cloud/OpenAI-compatible endpoint, so file contents are sent straight to that model instead of entering the main AI platform's context window. This cuts token spend dramatically while giving users a second model for reviewing code, with the orchestrating assistant still checking every result.
      MIT