mcp-setup

mcp-setup is a skill for Claude Code, Codex from ayuayue/PiDeck. It costs 87 tokens per session (1,370 once invoked), scanned A, original, MIT.

A setup assistant for connecting MCP services to the Pi coding agent. It writes the service settings to Pi’s MCP configuration file and checks the connection afterward.

In plain words
What is it for?
Use it to add local or remote MCP services, follow the service’s official setup instructions, verify them with `pi mcp list`, and handle sign-in prompts when required.
Why use it?
It helps avoid malformed settings and protects existing configuration by changing only the selected service entry.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to add local or remote MCP services, follow the service’s official setup instructions, verify them with pi mcp list, and handle sign-in prompts when required.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ayuayue/pideck/mcp-setup
About the project

PiDeck is an open-source Electron desktop workbench for managing coding-agent conversations across local project directories, including pi and DSH sessions and imported Codex or Claude sessions. It is for developers who want one graphical workspace for multiple projects, session history, Git status, terminals, model settings, and extensions. Catalogue add-ons extend PiDeck's configuration and workflow capabilities.

ayuayue/PiDeck · 1,085 stars · on GitHub · pideck.caoayu.top

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.

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

Made for: Claude Code, Codex.

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 mcp-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/ayuayue/pideck/mcp-setup/github.svg)](https://agentmods.dev/skills/ayuayue/pideck/mcp-setup)
Your own site
<a href="https://agentmods.dev/skills/ayuayue/pideck/mcp-setup"><img src="https://agentmods.dev/badge/skills/ayuayue/pideck/mcp-setup/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 mcp-setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/ayuayue/pideck/mcp-setup"><img src="https://agentmods.dev/badge/skills/ayuayue/pideck/mcp-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,370 The whole file, excluding the scripts and references it only reads on demand.
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.00087 $0.01370
Opus 5.5 $0.00035 $0.00548
Sonnet 5.5 $0.00017 $0.00274
Haiku 4.5 $0.00009 $0.00137

Measured 6d ago against content hash 5e786339e2af, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

resources/skills/mcp-setup/SKILL.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.

MCP 配置助手(mcp-setup)

帮用户把 MCP 服务接进 pi。核心原则:每一步以服务官方文档为准,只改 mcp.json 里属于该服务的条目,改完必须验证。

工作流总览

  1. 弄清用户想接什么服务、拿来做什么;
  2. 查该服务官方的 MCP 接入文档(官网 docs / 官方 GitHub README;优先官方源,不用第三方目录的转述);
  3. 按下方 schema 生成配置,写入 ~/.pi/agent/mcp.json(全局)或项目 .pi/mcp.json(仅当前项目);
  4. 运行 pi mcp list 验证;需要 OAuth 的引导用户去 PiDeck 界面点「登录」;
  5. 向用户汇报:加了什么、写到哪、怎么验证、如何撤销。

pi 的 mcp.json 结构(唯一权威 schema)

文件是一个 JSON 对象,键 mcpServers,值是「服务名 → 定义」映射:

{
  "mcpServers": {
    "linear": { "url": "https://mcp.linear.app/mcp" },
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@brave/brave-search-mcp-server"],
      "env": { "BRAVE_API_KEY": "..." }
    }
  }
}

每个服务定义二选一传输:

  • 远程 HTTP:url(必填,http/https)、headers(可选,如 {"Authorization": "Bearer <key>"});
  • 本地 stdio:command(必填)、args、env、cwd(可选)。

通用可选:enabled(布尔,false 则不连接)、description、timeout(秒)、exposure/toolExposure(工具暴露方式,默认不用写)。

不要手写的字段:oauth(clientId/clientSecret 等七字段)只在服务商明确要求预注册客户端时才写;pi 的 MCP OAuth 默认零配置,动态客户端注册自动完成。auth.provider 是复用 pi 模型供应商凭据的高级能力,仅全局配置可用,除非用户明确要求否则不要写。

认证形态判定(按官方文档,不猜)

服务方文档说 写法
OAuth / 浏览器登录 / 无需 token 只写 url;连接后 pi mcp list 显示 needs-auth,引导用户在 PiDeck「配置 → MCP」对应服务行点「登录」
API Key / PAT,放请求头 headers: {"Authorization": "Bearer <key>"}(或文档指定的自定义头名)
API Key 放环境变量 stdio:env: {"<文档规定的变量名>": "<key>"}
无认证 只写传输字段
需要 Docker command: "docker",args 按文档;先确认用户有 Docker

写文件规则(防止破坏用户配置)

  1. 先读后写:读整个 mcp.json,解析 JSON;解析失败立即停手,让用户先在 PiDeck「源文件」页修复,绝不猜着覆盖;
  2. 合并而非覆盖:只新增/替换本次服务的键,其余条目原样保留;
  3. 保格式:写回时 2 空格缩进、键序尽量维持原样;
  4. 密钥安全:密钥值直接写入文件(mcp.json 是明文,这是 pi 的存储方式);但不要把密钥回显到对话或日志里;
  5. 项目级 .pi/mcp.json 只放该项目需要的覆盖,同名条目会遮蔽全局定义。

验证与收尾

pi mcp list          # 人读形态:每个服务的连接状态/工具数
pi mcp list --json   # 程序化形态
  • connected(带工具数)→ 成功;告诉用户工具经 tool_search 可发现,正常对话即可用;
  • needs-auth → 指导用户打开 PiDeck「配置 → MCP」,该服务行会出现「登录」按钮(或用 pi mcp login <服务名>);
  • error → 读错误信息定位:URL 打错 / 密钥无效 / npx 包名错 / Node 缺失。stdio 服务首次连接会 npx 拉包,稍慢是正常的;
  • 修改的是正在运行会话读不到的:新配置从下一个会话/下一轮对话生效。

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. 6d ago First seen · 82 lines · 87 tokens per session scan A 5e786339e2af

Subscribe to this mod's changes

mcp-setup is a skill published in the GitHub repository ayuayue/PiDeck (1,085 stars, last pushed yesterday), licensed MIT. It adds 87 tokens to every session and 1,370 once invoked, about $0.0003 per session on Opus 5.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-10-10.

Related

Other skills, from other repositories

article-writer

Multi-style article creation skill. Supports 5 writing styles (deep analysis, practical guide, story-driven, opinion, news brief), including complete workflow: material collection → outline → content → formatting. Activated when users mention "write article", "write post", "create", or "draft".

netease-youdao/LobsterAI · 62 tokens

skin-creator

Create and apply a two-asset LobsterAI visual skin from the user's style description. Use only when the AI Skin Designer kit supplies the structured skinpack workflow marker; do not use for ordinary theme or image requests.

netease-youdao/LobsterAI · 48 tokens

sn-ppt-dazzle

A workflow for turning an approved presentation outline into a single HTML deck that runs in a web browser. It creates a 1280-by-720 layout with animated backgrounds, page transitions, and keyboard navigation.

OpenSenseNova/SenseNova-Skills · 133 tokens

content-planner

WeChat Official Account topic planning and content calendar management. Based on WeChat article search and trending analysis, generates differentiated topic recommendations and outputs structured content calendars. Activated when users mention "topic", "planning", "content calendar", "trending", or "what to write next…

netease-youdao/LobsterAI · 63 tokens

music-search

Search cloud drives for downloadable music resources (songs, albums, lossless audio). Use this skill when the user wants to download a specific song or album. Do NOT use for general music information, lyrics, or recommendations.

netease-youdao/LobsterAI · 47 tokens

sn-infographic

An image-making tool that turns supplied content into an infographic, a visual format for explaining information with arranged text and graphics.

OpenSenseNova/SenseNova-Skills · 57 tokens