Borrowing it
Nothing to install: this file belongs to hyqhyq3/dsh-mcp-manager. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/hyqhyq3/dsh-mcp-manager/main/AGENTS.mdgit clone --depth 1 https://github.com/hyqhyq3/dsh-mcp-managerWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/hyqhyq3/dsh-mcp-manager/agents-md)<a href="https://agentmods.dev/instructions/hyqhyq3/dsh-mcp-manager/agents-md"><img src="https://agentmods.dev/badge/instructions/hyqhyq3/dsh-mcp-manager/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/hyqhyq3/dsh-mcp-manager/agents-md"><img src="https://agentmods.dev/badge/instructions/hyqhyq3/dsh-mcp-manager/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02803 | $0.02803 |
| Opus 5.5 | $0.01121 | $0.01121 |
| Sonnet 5.5 | $0.00561 | $0.00561 |
| Haiku 4.5 | $0.00280 | $0.00280 |
Grade A, and why
dsh-mcp-manager AGENTS.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 18d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- stdio transport: `child_process.spawn`, newline-delimited JSON-RPC over stdin/stdout. Reconnect must reap the old child first; `ctx.effect` teardown kills all children on unload. `args` are quote-aware tokenized with * How it starts
The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
DSH plugin: MCP server manager for DeepSeek Harness (web profile). Settings → MCP page for HTTP (OAuth PKCE + RFC 7591 dynamic client registration, static Bearer token, or no auth) and local stdio MCP servers, whose tools are registered as mcp__<name>__<rawName> native tools.
Layout
Plugin source is two files — keep it that way unless a refactor is explicitly requested (tests live under test/):
lib/index.js— host half (Node.js): HTTP API on the DSH GUI webserver under/mcp-manager/api/*, OAuth flow (redirect receiver at/mcp-manager/callback/:id), both MCP transports, tool registration intoctx.tools, state persistence.lib/client.js— client half (browser): awindow.__ModuleLoader__.load(...)factory usingreact.createElement(no JSX, no bundler). Registers the Settings → MCP tab via thesettings.sectionslot. UI is bilingual (Simplified Chinese and English; follows DSH’s Settings → General → Language preference) — every user-visible string is resolved throughtfrom themcplocale namespace, never hardcoded.cordis.patch.yml— bundle patch that activates the plugin row (dsh.bundle.patchin package.json).test/*.test.js—node --testunit tests over the host half's exported helpers plus a stubbed-contextapply()API smoke test (not shipped:fileslists onlylib/*).README.md/README.zh-CN.md— keep both in sync on behavior changes.
Architecture rules
- Two halves talk only through the same-origin JSON API
/mcp-manager/api/*; the client never touches Node APIs and the host never renders UI. - OAuth redirect origin is derived per-request from the
Hostheader — never hardcode a host/port. Client registration is bound to the exact redirect URI and re-registers if the origin changes. - Token state (
~/.dsh/mcp-manager.json) contains secrets — never log tokens; treat the file as sensitive. - Tool name convention
mcp__<server>__<raw>with[^A-Za-z0-9_-]→_normalization and a 64-char cap (sha256 suffix on overflow) — must match the built-in@deepseek-ai/dsh-mcp-client. - Tool schemas must pass through
sanitizeValue/convParams(registry accepts only a raw JSON-Schema subset; unsupported vocabulary degrades to unconstrained). - stdio transport:
child_process.spawn, newline-delimited JSON-RPC over stdin/stdout. Reconnect must reap the old child first;ctx.effectteardown kills all children on unload.argsare quote-aware tokenized with no shell expansion. On Windowsshell: truemakes Node join command + args with bare spaces and add no quoting, so every token must pass throughquoteWindowsToken(idempotent for already-quoted values) orcmd.exetruncates paths containing spaces. - Loaded state is migrated once in
apply()viamigrateLoadedState: missing or duplicateserver.idvalues are backfilled (live status and/servers/:id/*are id-keyed, so a missing id 404s every id-addressed API) and legacy[{ name, value }]env/header arrays are normalized to maps. Persist immediately when it reports a change. - HTTP transport: streamable HTTP (JSON-RPC POST,
Mcp-Session-Idheader, SSE-or-JSON response fallback inparseRpc). A 401 triggers onerefresh_tokenretry, then reconnect; every 401 also parsesWWW-Authenticateforresource_metadataand caches that URL onserver.oauth. - OAuth discovery is ordered, never a single guess: cached/401-advertised RFC 9728 protected-resource metadata (path-inserted, then bare) → its
authorization_servers[0]→ RFC 8414 metadata at the path-inserted well-known URL (wellKnownUrl), thenopenid-configuration, then the naive${issuer}/.well-known/oauth-authorization-server; guessing${origin}/oauth/*is the last resort and returnssource: 'fallback'.issuerOfmust stay pure (no I/O) because the editor compares issuers across a config edit to decide whether cached OAuth state survives;server.oauth.authorizationServer/server.oauth.resourceMetadataUrlare the only non-secret discovery caches, anddiscoverAndPersistwrites them only when they changed. - OAuth client credentials:
clientId(manual, non-secret — skips RFC 7591 entirely and is never re-registered),clientSecretEnv(an environment-variable name only; the value is read per request and sent asclient_secret—client_secret_postis the only supported method), andscope(sent as thescopeauthorization parameter). All three are OAuth-only: switching tostatic/none/stdio deletes them, and a changedclientId/clientSecretEnv/issuer dropsserver.oauth. Validation lives inparseOauthFields(pure) +applyOauthFields;sameServerConfigand both*Viewhelpers must carry the fields or workspace edits silently no-op. - HTTP auth modes are
oauth|static|none, normalized in exactly one place (normalizeAuthMode).noneis exempt from the credential gate (hasToken→ true) andaccessTokenmust return''for it so a stale attached OAuth token is never sent; switching tononein the editor also dropsserver.oauth. - Disable/enable is global per profile: disable unregisters tools + drops the connection but persists config and tokens; enable reconnects without re-auth.
- Diagnostics are an in-memory
Map<serverId, entry[]>ring buffer (20 entries/server, ≤500 chars each) written byrecordAttemptand read byGET /mcp-manager/api/servers/:id/logs. Redaction happens on write, never on render: query-stringcode/state/client_secret/access_token/refresh_tokenare stripped,Authorizationvalues are never stored, andBearer …is masked. Logs are never persisted (a log file would be a new secret-at-rest surface) — the durable record staysctx.logger. Workspace logs survive a rescan because their ids are deterministic (workspaceServerId); deleting a server clears its log. - UI is bilingual: the
mcplocale namespace holdszhandendictionaries with the same key set — add new strings to both. Register them withctx.effect(() => ctx.locale.register("mcp", { zh, en }), "dsh-mcp-manager: dictionaries"). The client injectslocaleand declares@deepseek-ai/dsh-client-localeindsh.client.inject. Registersettings.sectionwithlocale: "mcp": its component receives the standardtprop and passes it to children. Use a boundtfor the slot label callback. DSH owns language selection (Settings → General → Language), browser fallback, persistence, and live updates. Do not add a plugin language selector, language state, or language API.GET /settingsexposes onlyonDemandToolInjection; legacylanguagevalues in the plugin state file remain untouched and unused. Server-supplied diagnostics (MCP error text, tool descriptions) stay in their original language.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 18d ago Changed · +3 lines · +597 tokens per session 9bd8f4c95ac3
- 1mo ago Changed · +1 lines · +116 tokens per session 503682c18991
- 1mo ago Changed · +9 lines · +619 tokens per session bba99d0749b2
- 1mo ago Changed · +9 lines · +282 tokens per session 6e8052ba6d49
- 1mo ago First seen · 64 lines · 1,189 tokens per session scan A f182fd82ca53
dsh-mcp-manager AGENTS.md is an instructions file published in the GitHub repository hyqhyq3/dsh-mcp-manager (26 stars, last pushed yesterday), licensed MIT. It adds 2,803 tokens to every session, about $0.0112 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.