返回目錄

dsh-mcp-lens

精選清單收錄維護狀態: 活躍

labmimors/dsh-mcp-lens

面向海量目录的 MCP 工具检索插件,可在上千工具中精确检索,并带允许/拒绝控制。

前往 GitHub專案首頁
$ dsh plugin add dsh-mcp-lens

安裝

dsh 沒有統一的安裝指令 —— 把該外掛 README 中的設定行加入你的 profile / patch 設定,然後重啟即可。

查看安裝教學

12

星數

3

Fork

TypeScript

語言

MIT

授權條款

2026-08-14

建立於

2026-09-11

最近推送

README

MCP Lens for DeepSeek Harness

English | 简体中文

verify license

1,000 MCP tools. Two interfaces. Exact schemas when you need them.

MCP Lens routes a 1,000-tool catalog through search and call; the component fixture uses 1,114 bytes of standing MCP definitions

Install · Try the 1,000-tool calculator · See product tests

Large tool catalogs take up room before the model starts solving your task. MCP Lens keeps the standing MCP definitions small, finds relevant tools across servers, and preserves the returned data needed by the next call.

MCP Lens gives DeepSeek Harness two model-facing tools:

  1. mcp_search finds relevant tools and returns their exact input schemas.
  2. mcp_call calls a specific server/tool and returns its result, including structured data.

The two tool definitions occupy 1,114 bytes of JSON, regardless of catalog size. In the 1,000-tool component fixture, the direct client's definitions occupy 647,962 bytes. Remote schemas enter the conversation when search returns them. Connections open on demand, and repeated searches reuse the catalog index.

The latest version also fixes multi-step workflows: a customer ID returned alongside a text summary stays visible, so the model can use it to look up the customer's order. The tested data flows improved from 10/12 to 12/12. Read the September 10 results.

This works well for dozens to thousands of tools spread across MCP servers. Search adds a step; for a few tools used on nearly every request, the official direct MCP client is simpler.

Install

Use Node.js ^22.19.0 || >=24.0.0 and Harness 0.1.2-rc.1. As of September 10, 2026, Harness's npm latest and next tags point to this version.

Build Lens rc.10 from the main branch below. The published npm package is still rc.9, which targets Harness 0.1.0-rc.6.

npm install -g @deepseek-ai/dsh@0.1.2-rc.1
git clone https://github.com/labmimors/dsh-mcp-lens.git
cd dsh-mcp-lens
npm ci --ignore-scripts
npm run build
npm pack --ignore-scripts
dsh plugin --profile web add ./dsh-mcp-lens-0.1.0-rc.10.tgz

dsh plugin uses pnpm. If pnpm is missing from PATH, replace the last command with:

npm exec --yes --package=pnpm@10.20.0 -- dsh plugin --profile web add ./dsh-mcp-lens-0.1.0-rc.10.tgz

If you are keeping an existing Harness 0.1.0-rc.6 installation, use dsh plugin --profile web add dsh-mcp-lens@0.1.0-rc.9.

Connect your first MCP server

The plugin starts with no servers. Open ~/.dsh/profiles/web/cordis.patch.yml, or $DSH_HOME/profiles/web/cordis.patch.yml if you set DSH_HOME.

Replace an empty [] with this block. If the file already has other entries, append it as another top-level item; if it already has an mcp-lens item, replace that item's config.

- id: mcp-lens
  config:
    servers:
      - name: mcp-docs
        transport: streamable-http
        url: https://modelcontextprotocol.io/mcp

    cachePath: !!js dshHomePath('mcp-lens/catalog.json')
    allowTools:
      - mcp-docs/search_model_context_protocol
      - mcp-docs/query_docs_filesystem_model_context_protocol
    denyTools: ['mcp-docs/submit_feedback']

This connects the official MCP documentation server and enables its two read-only query tools. The server needs no API key; Harness uses the model provider you have configured.

Check the configuration and start Harness:

dsh --profile web --dump-config
dsh --profile web

Then ask:

Use the official MCP documentation server to explain when an MCP client should use Streamable HTTP.

Ask normal questions. The model uses mcp_search and mcp_call as needed.

Configuration

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 the item's whole config, so include all custom settings you want to keep.

Local stdio server
- id: mcp-lens
  config:
    servers:
      - name: local
        transport: stdio
        command: node
        args: ['/absolute/path/to/mcp-server.mjs']
        cwd: /absolute/path/to/project

    cachePath: !!js dshHomePath('mcp-lens/catalog.json')
    allowTools: ['local/search_*', 'local/read_*']
    denyTools: ['local/delete_*']

Replace the command, paths, and tool patterns with those of your MCP server.

Authenticated HTTP server
- id: mcp-lens
  config:
    servers:
      - name: knowledge
        transport: streamable-http
        url: https://mcp.example.com/rpc
        headers:
          Authorization: !!js '`Bearer ${process.env.MCP_TOKEN}`'
        cacheNamespace: knowledge-acme-readonly

    cachePath: !!js dshHomePath('mcp-lens/catalog.json')
    allowTools: ['knowledge/read_*', 'knowledge/search_*']
    denyTools: ['*/delete_*', '*/destroy_*']

cacheNamespace identifies the account and permission scope, without containing a credential. Change it when the account or scope changes. Without it, an authenticated server's catalog stays in memory and is fetched again after restart.

Timeouts, search limits, and catalog settings

在 GitHub 閱讀完整 README →

DSH Plugins 是獨立的 DeepSeek Harness 外掛目錄,與 DeepSeek 官方無關,也不代表官方背書。第三方外掛未經安全稽核,安裝前請審查原始碼。

每週取得最新的 DeepSeek Harness 外掛,絕不濫發。