dsh-mcp-workspace-scope: An MCP Tool Scoping Plugin for DeepSeek Harness
felix-lj-ct/dsh-mcp-workspace-scope
A DSH plugin that scopes MCP tool injection per workspace directory, hiding unneeded servers and refusing their calls, with per-session composer switches.
dsh-mcp-workspace-scope is an MCP tool scoping plugin designed for DeepSeek Harness that restricts MCP server injection based on the working directory of a session. In DSH, MCP is process-global, so every session carries the full tool list of all servers, wasting context and risking accidental calls. This plugin uses a per-directory allow-list to ensure each project only sees the MCP servers it needs, and refuses unauthorized calls at runtime, creating a hard boundary. It also provides per-session switches in the composer to temporarily adjust the MCP scope of the current session without modifying rules.
How to Install
dsh plugin --profile web add dsh-mcp-workspace-scope- Category
- Tools & Capabilities
- Platform
- DSH Plugin
- Author
- felix-lj-ct
- Distribution
- Plugin
dsh-mcp-workspace-scope Key Features
dsh-mcp-workspace-scope Repo Summary
What Does It Do?
dsh-mcp-workspace-scope is a DSH plugin for DeepSeek Harness that scopes MCP tool injection by the directory a session was opened in. It solves the problem of MCP being process-global in DSH, where every session carries the full tool list of all servers, wasting context and risking accidental calls. The plugin ensures each project only sees the MCP servers it needs, and provides per-session switches for exceptions.
Core Features
- Per-directory allow-list: define which MCP servers are available for each directory; subdirectories inherit parent rules.
- Hide and refuse: removes tools from the list and blocks calls at runtime, creating a hard boundary.
- Per-session switches: temporarily narrow or widen the MCP scope for the current session from the composer, without altering rules.
- Honest readout: displays the runtime state of each MCP server, so 'allowed but dead' is visible.
- Immediate rule application: changes made via the settings editor or by editing the rules file apply to running sessions instantly.
How to Use This Plugin?
After enabling the plugin in DSH, it has no effect until you create a rules file (default path ~/.dsh/mcp-workspace-scope.json). The file contains a default field and a rules array, e.g., specify 'atlassian' for D:/work/proj-a and 'playwright' for D:/work/proj-b. Matching supports path inheritance, longest-path-wins, and later-row-wins for equal-length duplicates. For temporary exceptions, use the composer switch for the current session.
This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: felix-lj-ct/dsh-mcp-workspace-scope. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.
