dsh-mcp-sync: Instructions file for Claude Code

CLAUDE.md

dsh-mcp-sync CLAUDE.md is an instructions file for Claude Code from nan1010082085/dsh-mcp-sync. It costs 1,073 tokens per session, scanned A, original, MIT.

Instructions for an MCP manager: MCP, or Model Context Protocol, is a way for AI assistants to connect to external tools. This manager discovers servers, puts them in one registry, connects them, and exposes their tools.

In plain words
What is it for?
Use it to synchronise MCP servers from Claude, Cursor, Codex, or DSH; connect and manage them; inspect health and usage statistics; and retry or reconnect failed servers.
Why use it?
It gives different MCP sources a shared place and makes connected tools available through a consistent interface. It also describes retries, connection statistics, health checks, and reconnection.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions Codex.

This is nan1010082085/dsh-mcp-sync's own configuration. It tells Claude Code how to work on dsh-mcp-sync 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-sync configures →

Reuse

Borrowing it

Nothing to install: this file belongs to nan1010082085/dsh-mcp-sync. 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/nan1010082085/dsh-mcp-sync/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/nan1010082085/dsh-mcp-sync

Made for: Claude Code.

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-sync CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/nan1010082085/dsh-mcp-sync/claude-md/github.svg)](https://agentmods.dev/instructions/nan1010082085/dsh-mcp-sync/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/nan1010082085/dsh-mcp-sync/claude-md"><img src="https://agentmods.dev/badge/instructions/nan1010082085/dsh-mcp-sync/claude-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-sync CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/nan1010082085/dsh-mcp-sync/claude-md"><img src="https://agentmods.dev/badge/instructions/nan1010082085/dsh-mcp-sync/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,073 This file is loaded in full into every session.
When invoked 1,073 The same file — it is already loaded in full.
Security scan A 0 findings. 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.01073 $0.01073
Opus 5 $0.00536 $0.00536
Sonnet 5 $0.00215 $0.00215
Haiku 4.5 $0.00107 $0.00107

Measured 9d ago against content hash 5d6bddc6e3d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

dsh-mcp-sync CLAUDE.md scanned grade A with 0 findings 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 9d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 102 lines

How it starts

The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.

dsh-mcp-sync 开发规则

插件概述

统一 MCP 管理:扫描各来源 → 同步到注册表 → 连接 → 注册工具。同步后的 MCP 是一等公民,可编辑、可删除、可直接调用。

核心架构

扫描来源 (Claude/Cursor/Codex/DSH)
         ↓
    统一注册表 (~/.dsh/mcp-registry.json)
         ↓
    MCP 连接管理器
         ↓
    DSH 工具注册 (mcp__<name>__<tool>)
         ↓
    模型直接调用

安装(任一方式)

# GitHub 安装
dsh plugin --profile web add github:nan1010082085/dsh-mcp-sync

# npm 安装
dsh plugin --profile web add dsh-mcp-sync

发布流程(强制)

  1. 修改 lib/ 下的文件
  2. 更新 package.json 的 version (当前: 0.6.0)
  3. cd packages/mcp-sync && npm publish
  4. ./scripts/sync-repos.sh mcp-sync(同步到独立 GitHub repo)
  5. dsh plugin --profile web add github:nan1010082085/dsh-mcp-sync
  6. 运行 dsh web 验证无报错

v0.6.0 新特性

1. 自动重试机制 (mcp-client.js)

  • 连接失败时自动重试(最多3次,可配置)
  • 可重试错误类型:ECONNRESET、EPIPE、timeout、closed、ENOTFOUND、ECONNREFUSED
  • 可配置参数:maxRetries、retryDelayMs

2. 统计信息跟踪 (mcp-client.js)

  • 连接统计:总连接数、成功数、失败数
  • 调用统计:总调用数、成功数、失败数
  • 成功率计算:连接成功率、调用成功率

3. 新增 API 端点 (routes.js)

  • GET /stats: 获取统计信息和运行时间
  • POST /reconnect: 重新连接失败的服务器
  • GET /health: 健康检查,返回详细状态信息

4. 客户端 UI 改进 (client.js)

  • 新增 Stats 标签页
  • 显示运行时间、连接统计、工具调用统计
  • 显示服务器状态分布

文件结构

文件 用途
lib/index.js 服务端主入口:同步、连接、工具注册
lib/registry.js 统一 MCP 注册表(CRUD、导入)
lib/mcp-client.js MCP 连接管理器(stdio/SSE/HTTP)
lib/mcp-tools.js MCP 工具 → DSH 工具注册
lib/sources.js 数据源扫描(Claude/Cursor/Codex/DSH)
lib/routes.js API 路由(注册表 CRUD + 连接管理)
lib/client.js 客户端 UI

注册表 vs 来源

  • 来源 (sources.js): 只读扫描 Claude/Cursor/Codex/DSH 配置
  • 注册表 (registry.js): 统一存储,可编辑、可删除
  • 同步: 来源 → 注册表(不覆盖已存在的)

API 路由

路由 方法 说明
/api/dsh-mcp-sync/registry GET 列出所有注册的 MCP
/api/dsh-mcp-sync/registry POST 添加/更新 MCP
/api/dsh-mcp-sync/registry DELETE 删除 MCP
/api/dsh-mcp-sync/sync POST 从来源同步到注册表
/api/dsh-mcp-sync/sources GET 查看来源配置(只读)
/api/dsh-mcp-sync/connections GET 连接状态
/api/dsh-mcp-sync/connect POST 连接服务器
/api/dsh-mcp-sync/disconnect POST 断开连接
/api/dsh-mcp-sync/tools GET 列出工具
/api/dsh-mcp-sync/call POST 调用工具
/api/dsh-mcp-sync/stats GET 获取统计信息(v0.6.0)
/api/dsh-mcp-sync/reconnect POST 重新连接失败的服务器(v0.6.0)
/api/dsh-mcp-sync/health GET 健康检查(v0.6.0)

Read the full file on GitHub · 102 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. 9d ago First seen · 102 lines · 1,073 tokens per session scan A 5d6bddc6e3d4

Subscribe to this mod's changes

dsh-mcp-sync CLAUDE.md is an instructions file published in the GitHub repository nan1010082085/dsh-mcp-sync (1 stars, last pushed 13d ago), licensed MIT. It adds 1,073 tokens to every session, about $0.0054 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

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

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

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

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,735 tokens