Skip to main content
Glama
Korck-lab
by Korck-lab

deepseek-mcp

An MCP server that bridges CLI harnesses to the DeepSeek API. Callers (Claude Code, Codex, opencode, or any MCP client) connect over stdio and get DeepSeek chat completions — plus the option to hand work back to a local harness session.

Quickstart

One-shot install straight from the repo (clone lives in ~/.deepseek-mcp, override with DEEPSEEK_MCP_HOME). Fresh installs prompt for your API key — it opens the key page and reads a hidden paste. Updates keep your existing .env untouched:

curl -fsSL https://raw.githubusercontent.com/Korck-lab/deepseek-mcp/main/scripts/install.sh | bash

Prefer reviewing the script first, or hit terminal weirdness (no controlling tty: SSH without -t, CI)? Download then run — stdin stays yours, no pipe tricks:

curl -fsSL https://raw.githubusercontent.com/Korck-lab/deepseek-mcp/main/scripts/install.sh -o /tmp/deepseek-mcp-install.sh
bash /tmp/deepseek-mcp-install.sh

Manual clone:

git clone https://github.com/Korck-lab/deepseek-mcp
cd deepseek-mcp
npm install
npm run build
cp .env.example .env        # paste your DEEPSEEK_API_KEY
npm run install:cli         # interactive: pick claude/codex/opencode + scope

Then run claude mcp list, codex mcp list, or opencode mcp list to confirm the deepseek server shows Connected, and use it from that client. See Interactive installer for flags and scope details.

Related MCP server: DeepSeek MCP Server

Features

  • Chat completions — OpenAI-style messages → DeepSeek. Supports deepseek-v4-flash / deepseek-v4-pro reasoning models, including reasoning_content.

  • Model discoverylist_models fetches available model ids from the API.

  • Harness bridgeuse_harness runs a prompt in a headless host CLI (claude -p, codex exec, opencode run, or any command you configure), letting the DeepSeek model drive local agents, skills, plugins, and MCP tools configured on that host.

  • Locked by default — the bridge is off until you explicitly allowlist hosts.

  • Zero shell — harness commands run as spawn argument arrays, never through a shell. Prompts are positional args, so no injection surface.

  • dotenv config — keys and harness commands live in .env.

Tools

Tool

Description

chat

Send a chat completion request; returns assistant text (reasoning + answer for reasoning models).

list_models

List models available on the DeepSeek API.

use_harness

Run a prompt in a configured host CLI. Host must be allowlisted.

list_harnesses

Show configured harness hosts and their commands.

Setup

npm install
cp .env.example .env   # add your DEEPSEEK_API_KEY
npm run build
npm test               # protocol smoke test + live API + harness bridge

Run the server:

npm start

Configuration

Variable

Default

Purpose

DEEPSEEK_API_KEY

Required. DeepSeek API key.

DEEPSEEK_BASE_URL

https://api.deepseek.com

API base URL.

DEEPSEEK_MODEL

deepseek-chat

Default model for chat.

HARNESS_ALLOW_HOSTS

(empty = locked)

Comma-separated hosts the bridge may drive.

HARNESS_CMD_<HOST>

Headless command for a host, e.g. HARNESS_CMD_CLAUDE=claude -p.

Example bridge config (opencode is a TUI and needs a PTY wrapper on macOS):

HARNESS_ALLOW_HOSTS=claude,codex,opencode
HARNESS_CMD_CLAUDE=claude -p
HARNESS_CMD_CODEX=codex exec --skip-git-repo-check
HARNESS_CMD_OPENCODE=script -q /dev/null opencode run

MCP client config

{
  "mcpServers": {
    "deepseek": {
      "command": "node",
      "args": ["/absolute/path/to/deepseek-mcp/dist/index.js"]
    }
  }
}

Interactive installer

Register the server with Claude Code, Codex, and/or opencode — no manual config editing:

npm run install:cli

Prompts ask which CLI(s) to install and the scope:

  • global — your user config (~/.claude.json, ~/.codex/config.toml, ~/.config/opencode/opencode.json)

  • project — local to this repo (Claude --scope local, .codex/config.toml, ./opencode.json; gitignored)

Optionally embeds DEEPSEEK_API_KEY into the client config (recommended for global scope, so the server works outside this repo). Scriptable:

npm run install:cli -- --clis claude,codex,opencode --scope global --embed key --yes

Flags: --clis a,b,c, --scope global|project, --embed key|skip, --yes.

Auto-versioning

Local git hooks bump the version and tag releases automatically from conventional commit messages — no manual version edits, no CI needed.

npm run hooks:install        # git config core.hooksPath .githooks (per-repo)

On every commit it reads the commit message and:

Commit type

Example

Bump

breaking

feat!: drop node 18, or BREAKING CHANGE in body

major

feat:

feat: add installer

minor

fix: / perf:

fix: opencode pty wrapper

patch

anything else

docs:, chore:, test:, refactor:

none

After the commit is created, a post-commit hook reads the real message from COMMIT_EDITMSG (the message is not available earlier — pre-commit runs before it exists), bumps package.json (+package-lock.json), amends the commit so the bump is included, then creates an annotated tag vX.Y.Z. Merge commits never re-bump; amends do re-bump (tag already exists, so it just skips). Run npm version manually at any time to override.

Security

  • The bridge is disabled until you allowlist hosts. With HARNESS_ALLOW_HOSTS empty, use_harness errors.

  • Harness commands run without a shell; the prompt is a single positional argument.

  • The API key lives only in .env (gitignored) and is sent only to the DeepSeek API.

  • Each harness call spawns a fresh headless session — no access to the calling client's session state. Note that a harness CLI runs with its own configured tools and credentials; only allowlist hosts you trust.

Development

  • npm run build — compile src/dist/

  • npm run dev — run from source with tsx

  • npm test — MCP protocol smoke test (handshake, tools/list, live chat, model list, harness bridge)

Requires Node.js >= 20.

License

MIT

Available Tools

4 tools
chatA

Send a chat completion request to DeepSeek. Accepts an OpenAI-style message list and returns the assistant's reply text.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoDeepSeek model id (default: deepseek-chat; alternative: deepseek-reasoner)
messagesYesChat messages, newest last. Each: {role: system|user|assistant, content: string}
max_tokensNoMax output tokens (default: 2048)
temperatureNoSampling temperature (0-2)

TDQS

A4.2/5.0
Behavior4/5

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

No annotations provided, so the description carries the full burden. It discloses the core behavior (sends request, returns reply text) and the message format. It doesn't mention side effects like API costs or rate limits, but for a stateless generation tool this is adequate.

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 action and result. No redundancy or wasted words.

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 well-documented params. It lacks an output schema, but the description states the return type ('assistant's reply text'), which suffices. No obvious missing context given its limited scope.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds only a minor nuance ('OpenAI-style' message list) beyond the schema, but does not meaningfully explain parameters further.

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 states a specific action ('Send a chat completion request to DeepSeek') and clearly distinguishes this tool from siblings like list_models and list_harnesses. Mentioning OpenAI-style messages and the reply text further clarifies its unique role.

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 context is clear: this tool is for generating chat completions, while siblings manage models/harnesses. However, there is no explicit 'when not to use' or alternative comparison, so it falls short of a 5.

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

list_harnessesA

List harness hosts the bridge can drive (from HARNESS_ALLOW_HOSTS / HARNESS_CMD_* config) with their commands.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the transparency burden. It usefully discloses the configuration source (HARNESS_ALLOW_HOSTS / HARNESS_CMD_*) and that commands are included, but it omits edge cases like empty lists or error behavior, leaving read-only as an inference.

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?

A single, front-loaded sentence with no filler. Each phrase adds value: 'List', 'harness hosts', 'the bridge can drive', and the config source.

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 simple listing tool with no parameters or output schema, the description covers key facts: what is listed and where the data comes from. It does not define the return format, but the purpose is clear enough for tool selection.

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 zero parameters, so no parameter details are needed. The description adds meaning by specifying the content (hosts and commands) and the source, which is sufficient for understanding.

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 the specific verb 'List' and identifies the resource as 'harness hosts' with scope 'the bridge can drive (from config)', clearly distinguishing it from sibling tools like list_models and use_harness.

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool versus alternatives (e.g., before use_harness or in contrast to list_models). The description states only what the tool does, with no explicit use cases or exclusions.

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

list_modelsA

List models available on the DeepSeek API.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations, the description carries the burden of behavioral disclosure. It only states that it lists models, with no mention of output format, pagination, rate limits, or any side effects. For a read-only listing tool, this minimal disclosure is insufficient for full transparency.

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 a single, front-loaded sentence that delivers the core information without any fluff. Every word earns its place.

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

Completeness3/5

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

Given the simplicity of a zero-parameter listing tool, the description is minimally adequate. However, with no output schema or annotations, it does not describe the return format or any limitations, leaving some gaps for the agent.

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 zero parameters, so the baseline of 4 applies. The description doesn't need to add parameter details because there are none to document.

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 ('List') and resource ('models') with a clear scope ('available on the DeepSeek API'). It distinguishes itself from sibling tools like chat and list_harnesses by naming a different resource and action.

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool versus alternatives. The description only states what it does, not in which contexts it is appropriate or when other tools might be preferred.

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

use_harnessA

Run a prompt in a headless host CLI (claude -p, codex exec, opencode run, ...). Lets the DeepSeek model drive local agents, skills, plugins, and MCP tools configured on that host. Host must be in HARNESS_ALLOW_HOSTS.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for the harness (default: server cwd)
hostYesHarness to drive (claude | codex | opencode, or other configured)
promptYesTask for the harness session
timeout_msNoKill the harness after this many ms (default: 120000)

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose a key security constraint (HARNESS_ALLOW_HOSTS) and explains the capability of driving local agents. But it omits important behavioral traits: it doesn't state that the prompt executes arbitrary commands (potential side effects), what the return value contains (stdout/stderr), or whether the call blocks until completion. This is a risky execution tool, and the description should be more candid about its effects and result format.

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 three sentences, each earning its place: the first defines the action, the second expands on capabilities, and the third provides a crucial security constraint. It is front-loaded with the main verb and avoids redundancy or filler. This is a model of concise, informative writing.

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

Completeness3/5

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

For an execution tool of moderate complexity (4 params, no output schema), the description covers the primary purpose and a necessary prerequisite but leaves gaps: it doesn't describe the response format or error behavior, which is essential when no output schema exists. It also doesn't point to list_harnesses as a way to discover allowed hosts. Thus, while useful, it falls short of being fully self-sufficient for an agent to invoke it correctly without additional context.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds minimal extra meaning: it ties the 'host' param to the HARNESS_ALLOW_HOSTS allowlist and clarifies that 'prompt' is the task for the harness. It does not elaborate on 'cwd' or 'timeout_ms' beyond what the schema already states, so no significant enhancement is provided.

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 opens with a specific verb and resource: 'Run a prompt in a headless host CLI' with concrete examples (claude -p, codex exec, opencode run). It also clarifies its scope by stating it lets the model drive local agents, skills, plugins, and MCP tools, which distinguishes it from siblings like chat (interactive) and list_harnesses (listing). No ambiguity remains about the tool's core function.

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 for when to use this tool: whenever the model needs to execute a prompt in a headless CLI harness. It also provides a prerequisite (host must be in HARNESS_ALLOW_HOSTS), which implicitly guides the agent to verify host legitimacy. However, it does not explicitly contrast with sibling tools like chat or list_harnesses, nor state when not to use it, so it misses the 'when-not' element for a 5.

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. 4 tool updatesv0.4.0
    • First observedchat
    • First observedlist_harnesses
    • First observedlist_models
    • First observeduse_harness

TDQS

A3.9/5.0
Disambiguation4/5

chat and use_harness both send prompts, but one targets the DeepSeek API and the other targets local harness CLIs, which is clearly distinguished in descriptions. list_models and list_harnesses are distinct list operations for different resources.

Naming Consistency5/5

All tool names follow a clear verb style: chat, list_models, list_harnesses, use_harness. The naming is consistent and predictable, with list_* for listing operations and direct verbs for actions.

Tool Count5/5

Four tools is well-scoped for a bridge server that provides chat completion, model listing, and harness control. Each tool serves a distinct purpose without redundancy.

Completeness4/5

The core workflow of sending prompts and listing models/harnesses is covered. A minor gap is lack of streaming or more detailed model/harness management, but the essential lifecycle for the stated purpose is present.

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

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/Korck-lab/deepseek-mcp'

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