AGENT SKILL

add-mcp-to-repo

暂无简介

License 许可
MIT
最近更新
2026-05-27
Stars
★ 0
Forks
0

02 资源文件 1

03 SKILL.md 正文

Add an MCP to the repository

Use this skill when the user wants to add a new MCP server entry to this agent-skills repository so it shows up in the catalogue and is installable from the VS Code extension.

When to use

  • "Add an MCP for X to the repo"
  • "Publish a new MCP server entry"
  • "Make <some MCP> installable from the extension"

Layout you must produce

MCP entries live under examples/mcps/ and are seeded into the mcps Azure Blob container. Each entry is its own directory; the path below examples/mcps/ becomes the MCP id.

examples/mcps/<category>/[<sub>/...]/<mcp-name>/
├── mcp.json     # REQUIRED — the server definition
└── mcp.yml      # optional — metadata for the catalogue UI

Steps

  1. Pick a category + name. Mirror the existing structure, e.g. examples/mcps/browser/playwright/ or examples/mcps/storage/filesystem/.
  2. Create mcp.json. Use either shape:
    • Direct mapping:
      { "playwright": { "type": "stdio", "command": "npx", "args": ["@playwright/mcp@latest"] } }
      
    • Full VS Code fragment with servers and optional inputs (use this when the server needs prompted values):
      {
        "servers": {
          "filesystem": {
            "type": "stdio",
            "command": "npx",
            "args": ["-y", "@modelcontextprotocol/server-filesystem", "${input:filesystem_root}"]
          }
        },
        "inputs": [
          { "id": "filesystem_root", "type": "promptString", "description": "Folder to expose" }
        ]
      }
      
    Every ${input:<id>} placeholder must have a matching entry in inputs.
  3. Create mcp.yml (recommended):
    name: Playwright MCP
    version: 1.0.0
    author: Your Name <you@example.com>
    description: One line describing what the server exposes.
    tags: [mcp, browser]
    
  4. (Optional) Declare dependencies. If this MCP only makes sense alongside a skill/agent/another MCP, add a dependencies list to mcp.yml:
    dependencies:
      - type: skill
        id: general/git/commit-helper
    
    id is the path below the type root (examples/skills/…, examples/agents/…, examples/mcps/…). Unknown types, missing id/type, and duplicates are ignored.
  5. Publish. From api/:
    npm run seed             # overwrites same-named blobs
    npm run seed -- --wipe   # only if you removed/renamed files
    
  6. Verify. Restart the API (or use ?refresh=1) and confirm the entry shows up in the extension's MCP tree; open it to check metadata, dependencies and the mcp.json content preview.

Validation checklist

  • [ ] mcp.json is valid JSON and defines at least one server object.
  • [ ] Every ${input:*} placeholder has a matching inputs entry with an id.
  • [ ] mcp.yml version is bumped if you changed an existing entry (drives the "update available" badge).
  • [ ] Any dependencies ids actually exist in their catalogue.

04 同仓库更多 Skills