Agent skill

MCP Setup

by ayuayue in ayuayue/PiDeck

帮用户接入/配置 MCP(Model Context Protocol)服务。当用户说「帮我接 MCP」「连上某个服务的 MCP」「配置 Model Context Protocol」「加个工具服务器」「为什么 MCP 连不上」等时使用。按服务官方文档把配置写进 pi 的 mcp.json,并用 pi mcp list 验证连接,全程不破坏用户已有配置。

MITAuto-check passedAgent Workflows

Install MCP Setup

skills CLI
$ npx skills add ayuayue/PiDeck --skill mcp-setup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ayuayue/PiDeck mcp-setup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ayuayue/PiDeck.git skills-src && mkdir -p .claude/skills && cp -r skills-src/resources/skills/mcp-setup .claude/skills/mcp-setup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mcp-setup
GitHub stars
1k
Token cost
~650 tokens
SKILL.md length
170 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

帮用户接入/配置 MCP(Model Context Protocol)服务。当用户说「帮我接 MCP」「连上某个服务的 MCP」「配置 Model Context Protocol」「加个工具服务器」「为什么 MCP 连不上」等时使用。按服务官方文档把配置写进 pi 的 mcp.json,并用 pi mcp list 验证连接,全程不破坏用户已有配置。

  • Works in 5 steps: 弄清用户想接什么服务、拿来做什么; → 查该服务官方的 MCP 接入文档(官网 docs / 官方 GitHub… → 按下方 schema 生成配置,写入… → …
  • Tasks that involve MCP servers
  • SKILL.md covers 工作流总览, pi 的 mcp.json 结构(唯一权威 schema), 认证形态判定(按官方文档,不猜) and 写文件规则(防止破坏用户配置), plus 2 more sections
  • Reaches api.githubcopilot.com and mcp.linear.app; needs BRAVE_API_KEY

What it does

MCP Setup is an agent skill from ayuayue/PiDeck. 帮用户接入/配置 MCP(Model Context Protocol)服务。当用户说「帮我接 MCP」「连上某个服务的 MCP」「配置 Model Context Protocol」「加个工具服务器」「为什么 MCP 连不上」等时使用。按服务官方文档把配置写进 pi 的 mcp.json,并用 pi mcp list 验证连接,全程不破坏用户已有配置。

Its SKILL.md is about 650 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering MCP servers. It works with Model Context Protocol and Docker. The repository describes itself as: PiDeck 是一个开源的桌面工作台,用于在本地项目目录中统一管理 PI | DSH Agent 会话,并支持导入 Codex、Claude 本地会话以便统一浏览和恢复。支持多项目工作区、会话历史、Git 集成、内置终端、模型配置和插件管理,基于 Electron 构建。 The licence is MIT.

When your agent uses it

  • Tasks that involve MCP servers

Example prompts

  • “/mcp-setup”

Requirements

  • Node.js
  • Docker
  • A credential in BRAVE_API_KEY

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

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

What it can do on your machine

Read from SKILL.md and the folder at commit 3b93468. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.githubcopilot.com
    • mcp.linear.app

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • BRAVE_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

MCP Setup loads about 650 tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 170 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~650

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ayuayue/PiDeck at commit 3b93468, republished under its MIT licence (© ayuayue). 170 words, ~650 tokens.

Download SKILL.mdSave it as .claude/skills/mcp-setup/SKILL.md (or your agent's skills folder).
name
mcp-setup
description
帮用户接入/配置 MCP(Model Context Protocol)服务。当用户说「帮我接 MCP」「连上某个服务的 MCP」「配置 Model Context Protocol」「加个工具服务器」「为什么 MCP 连不上」等时使用。按服务官方文档把配置写进 pi 的 mcp.json,并用 pi mcp list 验证连接,全程不破坏用户已有配置。

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,值是「服务名 → 定义」映射:

json
{
  "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>"}
无认证只写传输字段
需要 Dockercommand: "docker",args 按文档;先确认用户有 Docker

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

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

验证与收尾

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

最后汇报三件事:写入了什么(服务名 + 字段清单,密钥打码)、验证结果、撤销方法(删掉 mcpServers 里对应键)。

常见坑

  • npx 包名带 @latest 的按文档原样保留,不要自作聪明去掉;
  • Windows 下 stdio 服务若失败,优先怀疑路径空格与杀毒软件拦截 npx;
  • 远程 URL 末尾斜杠按官方文档原样写(如 https://api.githubcopilot.com/mcp/);
  • 服务方同时提供「远程托管」和「本地 stdio」两种时,默认选远程托管(免维护、随官方更新);用户明确要本地/自托管时才选 stdio。

© ayuayue, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in resources/skills/mcp-setup of ayuayue/PiDeck.

Open the folder on GitHubat commit 3b93468

Compare with similar skills

MCP Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

MCP Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
MCP Setup this skillayuayue/PiDeck1k—~650Automated safety check: PassMIT
Project Releaseswimmwatch/cloakbrowser-mcp164—~1.9kAutomated safety check: PassMIT
MCP Builderjezweb/claude-skills1.1k—~3.1kAutomated safety check: NotesMIT
Setup Xhs MCPautoclaw-cc/xiaohongshu-mcp-skills269—~678Automated safety check: PassMIT
Devcontainer Devstacklok/toolhive-studio170—~3.8kAutomated safety check: NotesApache-2.0
Generate MCP Servertrycompai/comp2k—~2.7kAutomated safety check: PassApache-2.0

Similar skills

  • Project Release

    swimmwatch/cloakbrowser-mcp

    Prepare, publish, verify, or recover a cloakbrowser-mcp release only when the user explicitly requests release work.

    164 GitHub stars~1.9k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • MCP Builder

    jezweb/claude-skills

    Build MCP servers in Python with FastMCP. An agent skill from jezweb/claude-skills.

    1.1k GitHub stars~3.1k tokensUpdated 3 days ago
    Agent WorkflowsAuto-check: notes
  • Setup Xhs MCP

    autoclaw-cc/xiaohongshu-mcp-skills

    安装部署 xiaohongshu-mcp 服务并配置 MCP 连接,引导用户完成从零到可用的全流程. An agent skill from autoclaw-cc/xiaohongshu-mcp-skills.

    269 GitHub stars~678 tokensUpdated 7 mo ago
    Agent WorkflowsAuto-check passed
  • Devcontainer Dev

    stacklok/toolhive-studio

    Spin up and interact with ToolHive Studio's containerized dev environment (Xvfb + noVNC + DinD).

    170 GitHub stars~3.8k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Generate MCP Server

    trycompai/comp

    A skill your agent uses when generating an MCP server from an OpenAPI spec with Speakeasy.

    2k GitHub stars~2.7k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Sonar Duplication

    SonarSource/sonarqube-agent-plugins

    Official

    Find files with code duplications in a SonarQube project and inspect duplication blocks for a file (project key optional when MCP integration already defines the default project)

    111 GitHub stars~2.4k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from ayuayue/PiDeck

  • Calls an OpenAI-compatible image generation API using PiDeck's separate image-provider config, then saves the result as a local file.

    1k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Helps show a model provider's usage, balance or quota in PiDeck: checks built-in support, points to the dialog templates, or writes a custom probe entry.

    1k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Diagnoses problems in the PiDeck desktop app from a redacted environment report, matching health checks to known failure patterns with fix steps.

    1k GitHub stars~566 tokensUpdated today
    Auto-check passed

Categories

Questions about MCP Setup

What does MCP Setup do?

帮用户接入/配置 MCP(Model Context Protocol)服务。当用户说「帮我接 MCP」「连上某个服务的 MCP」「配置 Model Context Protocol」「加个工具服务器」「为什么 MCP 连不上」等时使用。按服务官方文档把配置写进 pi 的 mcp.json,并用 pi mcp list 验证连接,全程不破坏用户已有配置。. MCP Setup is an agent skill from ayuayue/PiDeck.

When should I use MCP Setup?

MCP Setup fits situations like: tasks that involve MCP servers.

How do I install MCP Setup in Claude Code?

Run `npx skills add ayuayue/PiDeck --skill mcp-setup -a claude-code`. Or copy the skill folder (resources/skills/mcp-setup in ayuayue/PiDeck) into .claude/skills/mcp-setup in your project. Claude Code loads it when a task matches its description.

How do I install MCP Setup in Codex?

Run `npx skills add ayuayue/PiDeck --skill mcp-setup -a codex`. Or copy the skill folder (resources/skills/mcp-setup in ayuayue/PiDeck) into .agents/skills/mcp-setup in your project. Codex loads it when a task matches its description.

Can I use MCP Setup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ayuayue/PiDeck --skill mcp-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mcp-setup, .gemini/skills/mcp-setup, .github/skills/mcp-setup and .opencode/skills/mcp-setup in your project.

What does MCP Setup need to run?

Going by SKILL.md and its folder, MCP Setup needs credentials named BRAVE_API_KEY. Our summary lists: Node.js; Docker; A credential in BRAVE_API_KEY.

Does MCP Setup access the network?

SKILL.md names 2 domains. In commands or code: api.githubcopilot.com and mcp.linear.app; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is MCP Setup safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does MCP Setup use?

MCP Setup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does MCP Setup use?

About 650 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to MCP Setup?

Skills that share tags, products or a category with MCP Setup: Project Release (swimmwatch/cloakbrowser-mcp, 164 stars), MCP Builder (jezweb/claude-skills, 1.1k stars), Setup Xhs MCP (autoclaw-cc/xiaohongshu-mcp-skills, 269 stars) and Devcontainer Dev (stacklok/toolhive-studio, 170 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains MCP Setup?

ayuayue (a GitHub user) maintains it in ayuayue/PiDeck, which has 1,034 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 9, 2026.

Source: ayuayue/PiDeck on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.