Preface¶
When integrating MCP tools into DeepSeek Harness (DSH), the larger the tool catalog, the more tool schemas the model sees per turn, increasing both context pressure and API costs. dsh-mcp-lens is a DSH community plugin maintained by labmimors, aiming to handle large-scale MCP tools through two stable model interfaces—mcp_search and mcp_call. It only exposes the exact inputSchema of candidate tools when needed and enforces authorization control over final server/tool calls.
What This Is¶
dsh-mcp-lens is positioned as a solution to reduce MCP context and API costs. It consolidates a large number of MCP tools into a smaller model-visible surface through two model interfaces, lazy discovery, and precise schema invocation.
Basic information:
- Repository name:
labmimors/dsh-mcp-lens - License:
MIT - GitHub:
https://github.com/labmimors/dsh-mcp-lens
Core Features¶
Two Stable Model Interfaces¶
The plugin supports searching and invoking 1,000 MCP tools through two model-visible interfaces. The model no longer faces the full tool catalog directly; instead, it completes discovery and invocation through stable interfaces.
Small Candidate Set Exposed Only When Needed¶
The plugin does not pass all tool schemas to the model. When needed, it exposes the exact inputSchema values for a small ranked set. This reduces the scale of tool definitions the model needs to process per turn.
Calls Controlled by allowTools and denyTools¶
Final server/tool calls pass through allowTools and denyTools gates. denyTools always takes precedence.
In other words, a remote tool is not exposed to the model unless it matches allowTools; if it also matches denyTools, denyTools takes priority.
Lazy Activation¶
When lazy activation is enabled, the plugin does not start MCP processes or open MCP sockets. It defers the startup of MCP resources until they are actually needed.
Local Catalog Calculator¶
The plugin includes a local catalog calculator for self-reporting byte measurements of tool schemas.
Shared results should be treated as self-reported local measurements. They are not signatures and cannot serve as proof that measurement actually occurred.
Dependency-Free GitHub Action Included¶
The plugin also ships with a dependency-free GitHub Action for auditing checked-in tool payloads. It can push tool payload size checks into CI.
Installation & Enablement¶
First, ensure the environment meets the following requirements:
- DeepSeek Harness
0.1.0-rc.6 - Node.js
^22.19.0or>=24.0.0 pnpminPATH
The fastest installation method:
dsh plugin --profile web add dsh-mcp-lens@next
The npm next tag currently resolves to 0.1.0-rc.9.
If you need to pin to a reviewed version, you can use:
dsh plugin --profile web add dsh-mcp-lens@0.1.0-rc.9
After installation, you can view the current profile configuration and start Harness:
dsh --profile web --dump-config
dsh --profile web
The first command inspects the current profile configuration, and the second starts the profile.
Typical Usage¶
After installation, you can prompt Harness as usual without needing to mention mcp_search or mcp_call explicitly in your prompts.
If you use the GitHub Action example from the repository to audit checked-in tool payloads, you can configure it like this:
- uses: labmimors/dsh-mcp-lens@v0.1.0-rc.7
with:
tools-file: fixtures/request-header-tools.json
This Action is used to check already-committed tool payloads.
If you integrate an MCP documentation server following the README scenario, no additional API key is needed; however, Harness itself still requires a configured model provider.
Applicable Scenarios & Notes¶
dsh-mcp-lens is better suited for these scenarios:
- Tens to thousands of MCP tools
- Multiple MCP servers
- Long-tail tool catalogs
- Carrying all tool schemas in every request creates noticeable context pressure
If you only have a few tools that are used in nearly every request, introducing this plugin may not be necessary.
Before using it, note the following:
-
The plugin runs with the current
dshprocess privileges. Before installation, it is recommended to review the source code, theMITlicense, the Action version, and theallowTools/denyToolsconfiguration. -
denyToolsalways takes precedence in both search and invocation. If a tool needs to be hidden or disallowed from invocation,denyToolsshould be used as the priority. -
Shared results from the local calculator are only self-reported local measurements—not signatures or proof of measurement.
Conclusion¶
The value of dsh-mcp-lens lies in consolidating large-scale MCP tool catalogs into two model interfaces, exposing exact inputSchema values when needed, and using allowTools and denyTools to control final invocation. It suits DSH scenarios with a large number of tools, complex catalogs, and a desire to reduce MCP context and API costs.
You can first review the release versions, license, and Action examples in the GitHub repository:
https://github.com/labmimors/dsh-mcp-lens