setup-mcp

A setup guide for adding MCP servers to cosh, a tool that connects coding agents to external services. It converts pasted configurations into cosh's expected JSON format and validates them.

In plain words
What is it for?
Use it to add local-process, HTTP, or older SSE-based MCP servers to cosh from a configuration, package name, or other input.
Why use it?
MCP configurations copied from Claude Desktop, VS Code, or documentation may contain unsupported fields, incorrect structure, or invalid JSON.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/alibaba/anolisa/setup-mcp
Any agent
npx skills add alibaba/anolisa --skill setup-mcp
Clone the repo
git clone --depth 1 https://github.com/alibaba/anolisa

Made for: Claude Code, Codex.

Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,622 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00047 $0.01622
Opus 5 $0.00023 $0.00811
Sonnet 5 $0.00009 $0.00324
Haiku 4.5 $0.00005 $0.00162

Measured 3d ago against content hash 0792ebf5b55f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup-mcp 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 3d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/validate_mcp.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

src/os-skills/ai/setup-mcp/SKILL.md · 136 lines

How it starts

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

配置 MCP

帮用户在 cosh 中配置 MCP 服务器。

用户经常从 Claude Desktop、VS Code、GitHub README 等地方复制 MCP 配置粘贴过来,但这些格式和 cosh 不兼容——多了 type 字段、顶层 key 不对、甚至 JSON 本身就有语法错误。不要试图把用户粘贴的内容直接塞给验证脚本赌运气,而是从用户的输入中理解他们要配什么,然后你自己按 cosh 的格式写出正确的配置。验证脚本只用来做最后的合并写入和校验。

cosh 的配置格式

cosh 不用 typetransport 字段——它看配置里有哪些字段来判断传输方式。这是最重要的一点,因为几乎所有外部来源的配置都会带一个 "type": "stdio" 之类的字段,而 cosh 不认这个。

三种传输方式,由字段决定:

本地进程(stdio)较少出现

{
  "mcpServers": {
    "mcp-name": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"],
      "env": { "DEBUG": "true" }
    }
  }
}

远程 HTTP——用户提到 streamableHttpstreamable等字段就是 HTTP Streamable:

{
  "mcpServers": {
    "mcp-name": {
      "httpUrl": "https://mcp.example.com/v1",
      "headers": { "Authorization": "Bearer $MY_API_TOKEN" }
    }
  }
}

远程 SSE(旧版)—— 用户提供的 url 尾部是 /sse 字段就是 SSE:

{
  "mcpServers": {
    "mcp-name": {
      "url": "http://localhost:8080/sse"
    }
  }
}

其他可选字段(三种传输通用):timeouttrustincludeToolsexcludeTools。stdio 还可以用 cwd

怎么做

1. 弄清用户要什么

用户的输入五花八门。可能是一段 JSON、一句"帮我配下 filesystem 的 MCP"、一个 npm 包名、甚至一张截图。不管输入是什么形式,你需要搞清楚三件事:

  1. 用什么连接? 如果用户提到了 npx/uvx/node/python/docker 这些命令,那就是 stdio。如果给了一个 URL,那是远程服务(HTTP 优先,除非用户明确说 SSE)。
  2. 怎么认证? 有些服务需要 API key 或 token。如果需要,密钥用 $VAR_NAME 的形式引用环境变量,别把真实密钥写进配置文件。
  3. 叫什么名字? 服务器需要一个标识名。通常可以从包名或 URL 推断出来,比如 @modelcontextprotocol/server-filesystem 就叫 filesystem

示例 1 — 用户说"帮我配置 filesystem MCP": → 你知道这是 npx -y @modelcontextprotocol/server-filesystem,问用户想暴露哪个目录,然后构建配置。

示例 2 — 用户粘贴了一段 Claude Desktop 的配置:

{"mcpServers": {"github": {"type": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": {"GITHUB_TOKEN": "ghp_xxxx"}}}}

→ 从中提取有用信息:command 是 npx,args 是 ["-y", "@modelcontextprotocol/server-github"],需要 GITHUB_TOKEN。忽略 type 字段。注意到 token 是明文的——改成 $GITHUB_TOKEN,提醒用户设置环境变量。

示例 3 — 用户给了一个 URL https://mcp.linear.app/sse 和一个 API key: → 用户给的是 URL,先确认是 HTTP 还是 SSE。路径里有 /sse 说明是 SSE,和用户确认后用 url 字段。

Read the full file on GitHub · 136 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 136 lines · 47 tokens per session scan A 0792ebf5b55f

Subscribe to this mod's changes

setup-mcp is a skill published in the GitHub repository alibaba/anolisa (614 stars, last pushed 4d ago), licensed Apache-2.0. It adds 47 tokens to every session and 1,622 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

beevibe-team-mesh-negotiation

Multi-round negotiation protocol — covers both initiator and peer roles. Use when about to call negotiate(), when receiving a intent block as a peer, or when receiving an 'escalated' sentinel from a blocked respondnegotiate. Covers proposal crafting, counter-strategy, deadlock detection, when to accept early…

beevibe-ai/beevibe · 112 tokens

beevibe-verify-pr

CI verification before marking a PR-bearing task done. Use BEFORE calling mcpbeevibeupdateprogress(done) on any session whose deliverable is a pull request — including the first dispatch (you opened the PR with gh pr create) and any revision dispatch (you pushed new commits to an existing PR). Watches the PR's…

beevibe-ai/beevibe · 172 tokens

beevibe-pre-task-setup

Cold-start git workspace setup for a fresh beevibe task. Use at the start of a session whose intent has a block but NO or block — i.e. the first dispatch of this task. Checks for an existing repo clone, pulls the base branch if present (clone if missing), prunes any per-task worktrees from earlier tasks whose work has…

beevibe-ai/beevibe · 198 tokens

beevibe-use-repo

You are the child agent inside a fresh Docker sandbox. Borrow the given GitHub repo, produce a real artifact for the goal, and export it. Do not review the repo. The proof is that it works.

beevibe-ai/beevibe · 50 tokens

spec-converge

Iteratively review an instar-development spec with multi-angle internal reviewers (security, scalability, adversarial, integration, decision-completeness, lessons-aware) and real cross-model external reviewers routed through the agent's own installed CLIs (codex → GPT-tier, gemini → Gemini-tier; one pass per available…

JKHeadley/instar · 135 tokens

beevibe-discover-repo

Find the best GitHub repo for a goal, then call userepo to run it in a sandbox. Use whenever the user's goal requires a capability you don't have natively and you haven't been given a specific repo.

beevibe-ai/beevibe · 51 tokens