local-shell-mcp

52Stars11Forks5Issues1Watchers

Bridge all MCP tools from local-shell-mcp—including shell, file, browser, and remote machine—to the DeepSeek Harness web client, with a Live Workspace view for real-time collaboration.

Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
Python
License
MIT
Branch
main
chatgpt-appdsh-pluginharnessmcpremote-control

Install

$ dsh plugin --profile web add github:fwerkor/local-shell-mcp

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin fwerkor/local-shell-mcp for me: review the repository at https://github.com/fwerkor/local-shell-mcp.git first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Description

Bridges the standalone local-shell-mcp MCP service (providing shell, file, browser automation, remote machine, Agent Skills tools, etc.) into DeepSeek Harness's web client, embedding a real-time collaborative Live Workspace panel within the conversation window.

Core Capabilities

  • Automatically registers all upstream MCP service tools under the mcp__lsm__* namespace in the DSH tool list for direct model invocation
  • Injects upstream service-declared instruction segments as part of the system prompt, enabling the model to perceive currently available tools and context
  • Renders an embedded real-time workspace within the "Live Workspace" tab of the DSH session panel, supporting terminal viewing, files, task progress, and querying the model
  • Each DSH session gets its own dedicated upstream MCP connection, auto-disconnected when the session ends, with heartbeat and reconnection on disconnect
  • Listens to upstream tools/list_changed notifications, hot-updating the local tool list without restarting the plugin
  • Non-text content like images, audio, and resources returned from upstream are discarded and replaced with placeholder descriptions to avoid polluting the conversation context

Technical Implementation

  • Language: JavaScript (Node.js, ESM)
  • Key Dependencies: @modelcontextprotocol/sdk (MCP client), zod (result validation), node:crypto, node:fs/promises
  • Architecture Pattern: DSH bundle patch + client injection dual-end structure; server side bridges MCP through four hooks: tools / systemPrompt / webServer / agents, client side mounts React views in the conversation panel via slots / sessions / conversation
  • Entry Files: dsh/index.js (server-side bridge), dsh/client.js (client-side React view), cordis.patch.yml (injection declaration)

Use Cases

When you already have a local-shell-mcp service running locally or in a container and want DeepSeek Harness to directly call it for command line, file operations, browser automation, and remote machine control, installing this plugin brings the complete toolset and real-time workspace into the DSH web interface. Particularly convenient for multi-account collaboration or when you need to visually display the model's execution process.

Prerequisites & Compatibility

DependencyMinimum VersionDescription
DSHNot declaredInjects via dsh.bundle.patch and dsh.client.inject, requires DSH version supporting bundle patch and client runtime
Node.js>=22Declared in package.json engines field
PlatformCross-platformPure Node.js implementation with no native modules, relies on node:crypto / node:fs/promises
Local MCP ServiceBundledDepends on upstream local-shell-mcp HTTP service at default address http://127.0.0.1:8765/mcp, needs to be started separately

Installation

dsh plugin --profile web add github:fwerkor/local-shell-mcp

Configuration

This plugin requires no manual configuration from regular users; the following advanced fields take effect under config in cordis.patch.yml (can also override defaults via similarly-named DSH_LSM_* environment variables):

ConfigurationTypeDescriptionDefault Value
urlStringHTTP/HTTPS address of the upstream MCP service; DSH establishes a Streamable HTTP connection to ithttp://127.0.0.1:8765/mcp
browserUrlStringFrontend origin address for the Live Workspace browser panel; if not set, uses the address returned by upstreamNot set (passthrough from upstream)
headersObjectExtra HTTP headers to passthrough to upstream MCP requests, such as AuthorizationEmpty object
toolCallTimeoutMsNumberMaximum wait time for a single tool call; exceeding this will interrupt120000 (120 seconds)
keepAliveIntervalMsNumberHeartbeat interval; must be at least 5000 milliseconds30000 (30 seconds)
reconnectInitialDelayMsNumberMilliseconds to wait for first reconnection after upstream disconnect500
reconnectMaxDelayMsNumberMaximum backoff wait milliseconds for reconnection30000

Environment variable quick overrides: DSH_LSM_MCP_URL / DSH_LSM_BROWSER_URL / DSH_LSM_AUTHORIZATION / DSH_LSM_TOOL_CALL_TIMEOUT_MS / DSH_LSM_KEEPALIVE_INTERVAL_MS.

FAQ

Q: What will I see after installing?

A: A "Live Workspace" tab will appear in the conversation panel, showing local-shell-mcp's real-time collaborative interface (terminal, files, task progress, etc.). The model's available tools list will also automatically append all upstream-declared tools with the mcp__lsm__ prefix.

Q: Do I need to start the local-shell-mcp service first?

A: Yes. This plugin is just a bridge and doesn't include the MCP service internally; it depends on the upstream MCP service at localhost:8765 (default). You can change the address via the DSH_LSM_MCP_URL environment variable or the url field in cordis.patch.yml.

Q: Is each DSH session independent?

A: Yes. The plugin establishes a separate upstream MCP connection for each DSH Session, tagged with session affinity request headers. It maintains up to 64 active session connections simultaneously; when exceeded, sessions are evicted based on least recently used time for ended sessions.

Q: What if tool results contain images or audio?

A: The plugin only forwards text fragments to the model. Images, audio, and resource content are replaced with placeholders like "[image: …, content discarded]" to prevent large binary data from flooding the conversation context.

Q: Do I need to add a Bearer Token for the local service?

A: Optional. Set DSH_LSM_AUTHORIZATION in the DSH process environment to passthrough to upstream MCP request headers; alternatively, hardcode it in the headers field of cordis.patch.yml.

Q: Will DSH automatically update when the upstream MCP tool list changes?

A: Yes. The plugin subscribes to upstream tools/list_changed notifications. Upon detecting changes, it re-fetches and hot-updates the local mcp__lsm__* tool list without restarting the plugin or reconnecting the session.

Q: What if the Live Workspace fails to load?

A: First verify the upstream MCP service is reachable and the live_workspace_reconnect tool has returned credentials. If the upstream is remote HTTPS and DSH is accessed in a browser, you also need to properly set DSH_LSM_BROWSER_URL; otherwise iframe cross-origin or protocol mismatches will cause failures.

Learning Curve

Beginner — single command installation; main work is starting a local-shell-mcp MCP service that can be accessed, with no additional DSH-side configuration required.

Known Issues & Limitations

  • Upstream tools that require "task-based" execution mode will cause this bridge to throw an error without calling them, as the current implementation only supports standard request/response-style tool calls
  • Maximum number of active DSH session connections is 64; when 64 sessions are all still active and a new session wants to connect, it will directly throw a "too many live sessions" error instead of queuing
  • Upstream returned images, audio, and resource_link content are discarded; the model only receives placeholder descriptions and cannot directly view or forward them
  • cordis.patch.yml's browserUrl cannot contain username and password, otherwise configuration validation will error
  • Tool names undergo length and character normalization (mcp__lsm__ prefix + truncation + hash); upstream tool names that are too long will appear differently in the DSH UI than their original names

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/fwerkor/local-shell-mcp)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory