agentleFS
hdprajwalhdprajwal/agent-skills/skills/mcp-builder/SKILL.md

mcp-builder

Skill1 starsChanged 5 months agoMITView on GitHub

Build, scaffold, and review MCP (Model Context Protocol) servers that give LLMs well-designed tools over an external API or service. Use when creating or improving an MCP server in TypeScript (MCP SDK) or Python (FastMCP) — tool design, transports (stdio local / streamable HTTP remote), error shapes, and evaluation. Grounds tool design in the official spec.

  • Installs packages

186 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use chinese-code-review, chinese-commit-conventions and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Leodorareluctant259Skill

    chinese-code-review

    中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈

    Also in 8 projects that use this

  • Leodorareluctant259Skill

    chinese-commit-conventions

    中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化

    Also in 8 projects that use this

  • ComposioHQSkill

    codebase-migrate

    Run large codebase migrations and multi-file refactors. Uses the Composio CLI to coordinate issue tracking, batched PRs, and CI verification while the agent executes the transforms locally across hundreds of files.

    Also in 5 projects that use this

  • truongtv22Skill

    Problem-Solving Techniques

    Apply systematic problem-solving techniques for complexity spirals (simplification cascades), innovation blocks (collision-zone thinking), recurring patterns (meta-pattern recognition), assumption constraints (inversion exercise), scale uncertainty (scale game), and dispatch when stuck. Techniques derived from Microsoft Amplifier project patterns adapted for immediate application.

    Also in 5 projects that use this

  • ArogyaReddySkill

    skill-share

    A skill that creates new Claude skills and automatically shares them on Slack using Rube for seamless team collaboration and skill discovery.

    Also in 26 projects that use this

  • AnthropicSkill

    academy-guide

    Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

    Also in 8 projects that use this

  • +2 more from Leodorareluctant259

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 170 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the spec, don't guess: Start at https://modelcontextprotocol.io/sitemap.xml, fetch pages with a .md suffix for markdown (e.g.

    line 14
  2. Very specific:

    Run locally and inspect with the MCP Inspector: npx @modelcontextprotocol/inspector node build/index.js.

    line 91
  3. Distinctive:

    Write an evaluation: a handful of realistic tasks, then check whether an agent can complete each using only the tools + descriptions.

    line 93
  4. Distinctive:

    Add it to a client config (Claude Code / claude.ai / Cursor) and dry-run the top tasks.

    line 96

“Common” is measured: kept by at least 6 in 10 of the 170 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MCP Builder

An MCP server is judged by one thing: how well it lets an agent actually get real tasks done. Design for the calling LLM, not for API completeness.

1. Research first

  • Read the spec, don't guess. Start at https://modelcontextprotocol.io/sitemap.xml, fetch pages with a .md suffix for markdown (e.g. .../specification/draft.md). Review architecture, transports, and tool/resource/prompt definitions — the protocol moves, so check current.
  • Understand the target API you're wrapping: auth, endpoints, rate limits, pagination, error formats.

2. Choose the stack

  • TypeScript + @modelcontextprotocol/sdk — default. Strong SDK, good compatibility, models write it well. pnpm add @modelcontextprotocol/sdk zod.
  • Python + FastMCP — when the surrounding code is Python (research/ML). pip install mcp (FastMCP is included).
  • Transport: stdio for local servers (the common case — runs as a subprocess of the client). Streamable HTTP for remote servers; prefer stateless JSON (simpler to scale than stateful sessions/streaming).

3. Design the tools (this is where quality lives)

  • Coverage vs. workflow tools. Comprehensive endpoint coverage gives agents flexibility to compose; workflow tools bundle a common multi-step task. When unsure, lean to coverage. Add a workflow tool when one task takes many calls.
  • Names: action-oriented, consistently prefixed — github_create_issue, github_list_repos. The agent finds the right tool by its name.
  • Descriptions: concise, say what it does and when to use it. This is the agent's only guide — invest here.
  • Inputs: validate with a schema (zod in TS, type hints/Pydantic in Python). Mark required vs optional; give defaults.
  • Outputs: return focused, relevant data. Support pagination/filtering so a call can't dump 10k rows into the context window.
  • Errors are instructions. A failed call should tell the agent how to recover: what was wrong, what to try next — not a raw stack trace.

4. Minimal shape

TypeScript (stdio):

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
import { z } from "zod"

const server = new McpServer({ name: "my-service", version: "0.1.0" })

server.tool(
  "myservice_search",
  "Search items by query. Returns up to `limit` matches with id + title.",
  { query: z.string(), limit: z.number().int().max(50).default(10) },
  async ({ query, limit }) => {
    try {
      const results = await api.search(query, limit)
      return { content: [{ type: "text", text: JSON.stringify(results) }] }
    } catch (e) {
      return { content: [{ type: "text", text: `Search failed: ${e.message}. Check the query is non-empty and the API token is set.` }], isError: true }
    }
  }
)
await server.connect(new StdioServerTransport())

Python (FastMCP):

from mcp.server.fastmcp import FastMCP
mcp = FastMCP("my-service")

@mcp.tool()
def myservice_search(query: str, limit: int = 10) -> str:
    """Search items by query. Returns up to `limit` matches."""
    ...

if __name__ == "__main__":
    mcp.run()   # stdio by default

5. Test it like an agent would

  • Run locally and inspect with the MCP Inspector: npx @modelcontextprotocol/inspector node build/index.js.
  • Write an evaluation: a handful of realistic tasks, then check whether an agent can complete each using only the tools + descriptions. Fix the tools the agent misuses or can't find — that's the real bug, not the code.
  • Add it to a client config (Claude Code / claude.ai / Cursor) and dry-run the top tasks.

Review checklist (for an existing server)

  • Tool names consistent, prefixed, action-oriented
  • Every description says what + when, concisely
  • Inputs schema-validated; outputs focused + paginated
  • Errors guide recovery
  • Right transport (stdio local / streamable HTTP remote, stateless)
  • Secrets from env, never hardcoded
  • An eval proves an agent can do the real tasks

Credit

Tool-design guidance adapted from the mcp-builder skill in anthropics/skills. Spec is authoritative: https://modelcontextprotocol.io.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.