Purpose
MCP Lens is an open-source plugin and GitHub Action for DeepSeek Harness that solves the problem of large MCP tool catalogs consuming a lot of context before the model even starts working on a task. It keeps the resident MCP definition very small, searches for relevant tools across servers, and retains the data needed for subsequent calls.
Key capabilities
It provides two model-facing tools for DeepSeek Harness:
- mcp_search: finds relevant tools and returns their exact input schema.
- mcp_call: calls a specific server/tool and returns the result, including structured data.
No matter how large the catalog is, these two tool definitions take up only 1,114 bytes of JSON. In a 1,000-tool component test fixture, the direct client definition takes up 647,962 bytes. Remote schemas enter the conversation when search returns them; connections are opened on demand; repeated searches reuse the catalog index.
The latest version also fixes multi-step workflows: the customer ID returned along with the text summary remains visible, allowing the model to query that customer's orders based on it. The tested data-flow pass rate improved from 10/12 to 12/12 (see the September 10 results).
Usage
Requirements: Node.js ^22.19.0 || >=24.0.0, Harness 0.1.2-rc.1. As of September 10, 2026, Harness's npm latest and next tags both point to this version.
Build Lens rc.10 from the main branch. The published npm package is still rc.9, targeting Harness 0.1.0-rc.6.
dsh plugin uses pnpm. If pnpm is missing from PATH, replace the last command.
To keep the existing Harness 0.1.0-rc.6 installation, use: dsh plugin --profile web add dsh-mcp-lens@0.1.0-rc.9
Connect the first MCP server: the plugin initially contains no servers. Open ~/.dsh/profiles/web/cordis.patch.yml, or if DSH_HOME is set, open $DSH_HOME/profiles/web/cordis.patch.yml. Replace the empty [] with the given config block; if the file already has other entries, append it as a new top-level entry; if an mcp-lens entry already exists, replace that entry's config. This config connects to the official MCP documentation server and enables its two read-only query tools. The server does not require an API key; Harness uses the model provider you have already configured. Then check the config and start Harness, ask questions normally, and the model will use mcp_search and mcp_call as needed.
In the config you can set servers, cachePath, and the tools you want in allowTools. Patterns match server/tool, with * as a wildcard. denyTools overrides allowTools; an empty allow list enables no tools. Each Cordis patch replaces that entry's entire config, so include all custom settings you want to keep. Replace the command, paths, and tool patterns in it with your own MCP server. cacheNamespace identifies the account and permission scope, without credentials; change it when the account or scope changes. If you do not set it, the catalog of authenticated servers resides in memory and is re-fetched after a restart. The defaults are likewise located in cordis.patch.yml.
A failed refresh keeps the last available catalog, and an unavailable server does not hide the results of other servers. Lens supports MCP Tools based on stdio and Streamable HTTP. OAuth, Resources, Prompts, Elicitation, and task-based execution are not yet implemented.
When it applies
It applies when dozens to thousands of tools are spread across multiple MCP servers. Search adds a step; for a small number of tools used on almost every request, the official direct MCP client is simpler.
Product testing and tools
Model tasks run in Codex through the real Harness ToolRuntime and MCP servers. You can view tasks, results, and reproduction commands in Product tests. Early experiment: DeepSeek V4 Flash pilot, August 14, 2026.
schema calculator: open the calculator, load the 1,000-tool sample or paste the tool definitions you exported, and compare the resident schema size. You can use Copy share link, Copy Markdown, or Download card to share the measurement results with colleagues. The calculation runs in the browser; the share link contains the numeric results.
If a query fails to hit the correct tool, you can send a minimal search example so it can be reproduced, and you can also browse MCP Lens in the DSH Directory.
Development commands (run in the source checkout directory): verify performs type checking, tests, and build. The installation check uses local MCP fixtures and a temporary Harness config file. If Corepack is unavailable, you can run the profile check via npm exec --yes --package=corepack@0.35.0 -- npm run verify:dsh-profile. For the exact Harness version, test commands, and the schema size GitHub Action, see Contributing.
License: MIT.