dsh-mcp-manager: Instructions file for Codex

AGENTS.md

dsh-mcp-manager AGENTS.md is an instructions file for Codex, OpenCode from hyqhyq3/dsh-mcp-manager. It costs 2,090 tokens per session, scanned A, original, MIT.

Project instructions for a DeepSeek Harness plugin that manages remote and local MCP servers from a settings page. MCP is a way for an application to connect to external tools and make them available to an AI assistant.

In plain words
What is it for?
Use them when changing MCP server setup, OAuth or bearer-token authentication, the Settings → MCP page, the same-origin API, tool registration, or the plugin’s documentation.
Why use it?
They define how the browser interface, Node.js server, authentication, stored settings, and tool registration must work together. This reduces the risk of breaking the plugin’s two-part architecture.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md; mentions Codex.

This is hyqhyq3/dsh-mcp-manager's own configuration. It tells Codex and OpenCode how to work on dsh-mcp-manager itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dsh-mcp-manager configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/hyqhyq3/dsh-mcp-manager/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/hyqhyq3/dsh-mcp-manager

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for dsh-mcp-manager AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/hyqhyq3/dsh-mcp-manager/agents-md/github.svg)](https://agentmods.dev/instructions/hyqhyq3/dsh-mcp-manager/agents-md)
Your own site
<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.

agentmods 80×15 button for dsh-mcp-manager AGENTS.md

Your own site · 80×15
<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>
Per session 2,090 This file is loaded in full into every session.
When invoked 2,090 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.02090 $0.02090
Opus 5 $0.01045 $0.01045
Sonnet 5 $0.00418 $0.00418
Haiku 4.5 $0.00209 $0.00209

Measured today against content hash bba99d0749b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

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 today.

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 *
AGENTS.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 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, or static Bearer token) 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.jshost 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 into ctx.tools, state persistence.
  • lib/client.jsclient half (browser): a window.__ModuleLoader__.load(...) factory using react.createElement (no JSX, no bundler). Registers the Settings → MCP tab via the settings.section slot. UI is bilingual (Simplified Chinese and English; follows DSH’s Settings → General → Language preference) — every user-visible string is resolved through t from the mcp locale namespace, never hardcoded.
  • cordis.patch.yml — bundle patch that activates the plugin row (dsh.bundle.patch in package.json).
  • test/*.test.jsnode --test unit tests over the host half's exported helpers plus a stubbed-context apply() API smoke test (not shipped: files lists only lib/*).
  • 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 Host header — 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.effect teardown kills all children on unload. args are quote-aware tokenized with no shell expansion. On Windows shell: true makes Node join command + args with bare spaces and add no quoting, so every token must pass through quoteWindowsToken (idempotent for already-quoted values) or cmd.exe truncates paths containing spaces.
  • Loaded state is migrated once in apply() via migrateLoadedState: missing or duplicate server.id values 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-Id header, SSE-or-JSON response fallback in parseRpc). A 401 triggers one refresh_token retry, then reconnect.
  • Disable/enable is global per profile: disable unregisters tools + drops the connection but persists config and tokens; enable reconnects without re-auth.
  • UI is bilingual: the mcp locale namespace holds zh and en dictionaries with the same key set — add new strings to both. Register them with ctx.effect(() => ctx.locale.register("mcp", { zh, en }), "dsh-mcp-manager: dictionaries"). The client injects locale and declares @deepseek-ai/dsh-client-locale in dsh.client.inject. Register settings.section with locale: "mcp": its component receives the standard t prop and passes it to children. Use a bound t for 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 /settings exposes only onDemandToolInjection; legacy language values in the plugin state file remain untouched and unused. Server-supplied diagnostics (MCP error text, tool descriptions) stay in their original language.

Read the full file on GitHub · 82 lines

Changes

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.

  1. today Changed · +9 lines · +619 tokens per session bba99d0749b2
  2. yesterday Changed · +9 lines · +282 tokens per session 6e8052ba6d49
  3. 11d ago First seen · 64 lines · 1,189 tokens per session scan A f182fd82ca53

Subscribe to this mod's changes

dsh-mcp-manager AGENTS.md is an instructions file published in the GitHub repository hyqhyq3/dsh-mcp-manager (16 stars, last pushed today), licensed MIT. It adds 2,090 tokens to every session, about $0.0104 per session on Opus 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.

Related

Other instructions, from other repositories

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.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

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).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

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.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens