Skip to main content
Glama

dsh-cordis-mcp

Expose DeepSeek Harness's dynamic Cordis toolset to Claude Code via MCP (Streamable HTTP): Claude Code can load, define, run, update, stop, delete DSH dynamic plugins in real time—the exact same capabilities as using cordis_define / cordis_run / cordis_stop / cordis_undefine / cordis_inspect_* in a DSH session, through the same runtime agent.

┌─────────────┐   MCP (Streamable HTTP, loopback)   ┌───────────────────────────┐
│ Claude Code │ ────── http://127.0.0.1:8090/mcp ──▶ │ DSH host (本插件)           │
│  (claude)   │ ────── JSON-RPC 2.0 ───────────────▶ │  dynamicCordisRunner      │
└─────────────┘                                       │  cordisInspect            │
                                                      │  agents (会话解析)         │
                                                      └───────────────────────────┘

The plugin mounts on the existing web port—no new ports, no published services; the MCP endpoint enforces Bearer authentication, and the token is configured on the DSH Settings → dsh-cordis-mcp page (auto-generated on first use, customizable/regenerable).

Capabilities (10 tools)

MCP tool

Corresponding DSH tool

Purpose

dsh_status

Bridge status: session resolution, live session list, plugin count

dsh_sessions

List manageable live DSH sessions (plugins are scoped per session)

dsh_plugins_list

cordis_inspect_self (no args)

List all dynamic plugins and their status in the target session

dsh_plugin_inspect

cordis_inspect_self (with args)

Plugin/package details; returns source when packageId is provided

dsh_inspect_providers

cordis_inspect_list

Inspect provider catalog (host + client)

dsh_inspect_query

cordis_inspect_query

Run a read-only inspect query (services/events/builtins/slots/topics/tool catalog)

dsh_plugin_define

cordis_define

Define an immutable Package (create new plugin or append a version)

dsh_plugin_run

cordis_run

Activate a Package (run / update), may return awaiting-approval

dsh_plugin_stop

cordis_stop

Stop running, cancel pending approval, keep definitions and versions

dsh_plugin_undefine

cordis_undefine

Permanently delete a plugin (including all Packages, grants, version pointers)

Packages with a Client half still go through DSH's approval flow on first run: dsh_plugin_run returns awaiting-approval, and completes asynchronously after you click Allow on the Run card in the DSH Web GUI—same as in a DSH session.

Related MCP server: cc-plugin-mcp

One-click install

curl -fsSL https://raw.githubusercontent.com/GeekRicardo/dsh-cordis-mcp/main/install.sh | bash

What the script does (preview with --dry-run first):

  1. Writes the dependency "dsh-cordis-mcp": "github:GeekRicardo/dsh-cordis-mcp" into ~/.dsh/profiles/web/package.json;

  2. Appends dsh-cordis-mcp to dsh.profile.bundles;

  3. cd ~/.dsh/profiles/web && pnpm install;

  4. Verifies bundles are registered, prompts for a restart.

After restarting DSH and hard-refreshing the page, the MCP endpoint is ready alongside the web service:

pm2 restart dsh-web   # 若用 pm2 托管;否则用你的启动方式重启

Connecting Claude Code

# 端口换成你 DSH web 的实际端口(启动日志会打印完整地址)
claude mcp add dsh --transport http http://127.0.0.1:8090/mcp
claude mcp list          # 确认 connected

Authentication (mandatory, no direct connection)

The MCP endpoint enforces Bearer authentication—requests without a token always get 401 (503 if no token is configured). The token is configured on the DSH Settings → dsh-cordis-mcp page: auto-generated and persisted on first use; the page supports view/copy/customize/regenerate. Put the token into the request headers of .mcp.json:

{
  "mcpServers": {
    "dsh": {
      "type": "http",
      "url": "http://127.0.0.1:8090/mcp",
      "headers": { "Authorization": "Bearer <设置页里的 token>" }
    }
  }
}

Token resolution priority: settings page config > DSH_MCP_TOKEN environment variable > auto-generated. Token changes take effect immediately (no restart needed); after regeneration the old token is immediately invalidated, so you must update the Claude Code config accordingly.

Session semantics (important)

Dynamic plugins are scoped per session and live in process memory (cleared on DSH restart). The bridge's session resolution order:

  1. sessionId in the call arguments (look it up with dsh_sessions);

  2. The session specified by the DSH_MCP_DEFAULT_SESSION environment variable;

  3. The current single live session;

  4. Multiple live sessions but none specified → error listing the options, requiring sessionId to be passed.

Other environment variables

Variable

Default

Description

DSH_MCP_PATH

/mcp

MCP endpoint path (mounted on the webServer)

DSH_MCP_TOKEN

none

Fallback source for the auth token (used when the settings page has none configured)

DSH_MCP_DEFAULT_SESSION

none

Target session when sessionId is not explicitly passed

Security boundary

  • Mandatory Bearer auth: no token → always 401 / 503, the endpoint can never be connected to directly;

  • Only accepts loopback Hosts (127.* / localhost / ::1), rejects all external access;

  • Rejects browser requests with sec-fetch-site: cross-site, and never returns CORS headers—web pages cannot read the response;

  • The settings page route /dsh-cordis-mcp/settings only allows same-origin loopback (no MCP token needed, but it only changes the token config itself);

  • This endpoint can define/run/delete plugins—equivalent to shell privileges—don't expose the port beyond the local machine.

How it works

File

Responsibility

lib/mcp-protocol.js

Pure MCP JSON-RPC layer (initialize / ping / tools/list / tools/call), zero DSH dependencies

lib/tools.js

Input validation + session resolution for the 10 tools, wrapping dynamicCordisRunner / cordisInspect

lib/token.js

Pure token resolution/generation (settings > env > auto-generated)

lib/http.js

HTTP layer for the MCP route: mandatory auth, body reading, loopback/cross-site protection

lib/index.js

Cordis plugin: injects 5 host services, settings namespace, /mcp + /dsh-cordis-mcp/settings routes

lib/client.js

Settings page UI: token view/copy/customize/regenerate + endpoint address

Uninstall

# 1. 从 ~/.dsh/profiles/web/package.json 的 dsh.profile.bundles 移除 "dsh-cordis-mcp"
# 2. 移除 dependencies 里的 "dsh-cordis-mcp"
# 3. cd ~/.dsh/profiles/web && pnpm install
# 4. 重启 DSH;claude mcp remove dsh

Prerequisites

  • DeepSeek Harness has an initialized web profile (~/.dsh/profiles/web exists), and the current session runs on a preset with the Cordis toolset (the host-side dynamicCordisRunner service exists, which it does by default);

  • Claude Code CLI is installed locally and logged in;

  • Node.js ≥ 20, pnpm available.

Troubleshooting

Symptom

Cause and fix

claude mcp list shows disconnected

DSH not restarted / wrong port. Restart, then look for a [dsh-cordis-mcp] MCP endpoint ready line in the DSH startup log and use the printed address

dsh_plugin_run returns awaiting-approval

Packages with a Client half require you to click Allow on the Run card in the DSH Web GUI; after granting, re-run dsh_plugin_run

Error multiple live DSH sessions

Multiple live sessions exist—first run dsh_sessions to get the id, then pass sessionId in the call

Error no live DSH session

No session is open in the DSH Web GUI; open one and retry

401 / missing or invalid bearer token

The token in .mcp.json is expired or wrong—copy the current token from the settings page and update

503 / auth-not-configured

The host hasn't initialized a token (abnormal state)—save any token on the settings page or restart DSH

Plugins disappear after restart

Dynamic plugins are process-memory state, which is expected; this bridge only manages the running DSH process

License

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables MCP clients to spawn and control Codex CLI and Claude Code sessions on the host machine, with session management and filesystem access.
    4
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    Exposes self-owned AI agent plugins as tools to Claude Code via a stdio MCP server, allowing Claude to call system info, calculator, or scribe transcriber directly.
    3
    MIT

View all related MCP servers

Related MCP Connectors

  • Generate AI music via the Lacuna Music API from MCP clients like Claude Desktop & Code.

  • Augments MCP Server - A comprehensive framework documentation provider for Claude Code

  • Manage SRG+ hubs, channels, content, assets, users, and workspaces from any MCP-aware AI agent.

View all MCP Connectors

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/GeekRicardo/dsh-cordis-mcp'

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