mcp-builder
Skill2 starsChanged 4 months agoMITView on GitHub
Build production-grade MCP (Model Context Protocol) servers that connect AI agents to external APIs, databases, and services. Use when the user wants to build an MCP server, integrate an external API with Claude or any AI agent, create custom tools for an AI agent, expose a service via MCP, or asks how to connect their app to an AI model using the MCP standard.
- Reads credentials
186 other projects use a version of this.
Adopted by
Most recently taken up by
- rvdbreemen/OTGW-firmwaretheir own version, first seen Nov 8, 2026
- codewhale-hq/codewhale-plugin-marketplacetheir own version, first seen Nov 8, 2026
- Bruno-Cunha-Souza/ValarMindSkillstheir own version, first seen Nov 8, 2026
- Leodorareluctant259/superpowers-zhtheir own version, first seen Nov 8, 2026
- truongpx396/learn-harness-engineering-by-building-mini-claude-codetheir own version, first seen Nov 8, 2026
- ControllableModel/SWE-Skills-Benchtheir own version, first seen Nov 8, 2026
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.
Leodorareluctant259Skillchinese-code-review
中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈
Also in 8 projects that use this
Leodorareluctant259Skillchinese-commit-conventions
中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化
Also in 8 projects that use this
ComposioHQSkillcodebase-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
truongtv22SkillProblem-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
ArogyaReddySkillskill-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
AnthropicSkillacademy-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
Other versions186 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 186
- anthropics/skills★ 189ksame name
- shareAI-lab/analysis_claude_code★ 80ksame name
- shareAI-lab/learn-claude-code★ 80ksame name
- ComposioHQ/awesome-claude-skills★ 75ksame name
- activepieces/activepieces★ 25ksame name
- ComposioHQ/awesome-codex-skills★ 17ksame name
- composio-community/awesome-codex-skills★ 16ksame name
- mcp-use/mcp-use★ 11ksame name
- jnMetaCode/superpowers-zh★ 8.4ksame name
- vudovn/ag-kit★ 8.2ksame name
176 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository48 other files it gives its agents.
- agent-memorySkill
- ai-engineerSkill
- api-designSkill
- autoplanSkill
- backend-devSkill
- benchmarkSkill
- brand-guidelinesSkill
- code-reviewerSkill
- commit-messageSkill
- database-architectSkill
- data-engineerSkill
- debuggerSkill
- design-explorerSkill
- devex-engineerSkill
- devops-platformSkill
- doc-coauthoringSkill
- forward-deployment-engineerSkill
- frontend-designSkill
- internal-commsSkill
- java-developmentSkill
- land-and-deploySkill
- office-hoursSkill
- pdfSkill
- performance-optimizerSkill
- plan-ceo-reviewSkill
- plan-design-reviewSkill
- plan-eng-reviewSkill
- pptxSkill
- product-engineerSkill
- prompt-engineerSkill
- python-developmentSkill
- qa-engineerSkill
- react-developmentSkill
- release-engineerSkill
- research-agentSkill
- retro-engineerSkill
- safety-guardrailsSkill
- security-engineerSkill
- skill-creatorSkill
- spec-authorSkill
- sre-canarySkill
- system-designSkill
- technical-writerSkill
- test-writerSkill
- theme-factorySkill
- typescript-developmentSkill
- webapp-testingSkill
- xlsxSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 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.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
What are the 5 most common operations a user needs?: Start here — not with full API coverage.
- Distinctive: line 410
Read tool-design.md when defining a tool inventory, descriptions, schemas, and destructive-operation safeguards.
“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.
Files
MCP Server Development
MCP (Model Context Protocol) is the standard for connecting AI agents to external tools and services. An MCP server exposes tools, resources, and prompts that any compatible AI agent can call — Claude, GPT-4, Gemini, or any other model that speaks the protocol.
Build MCP servers like you build APIs: with clear contracts, proper error handling, and the caller (the AI agent) as your user. A badly designed MCP tool confuses the model. A well-designed one makes the model dramatically more capable.
MCP Builder Principles
- The AI agent is the caller — design for it. Tool names, descriptions, and schemas must be clear enough that an LLM picks the right tool without being told. If a tool name is ambiguous, the agent will misuse it.
- Tool descriptions are prompt engineering. The
descriptionfield in your tool schema is what the model reads to decide when and how to call it. Write it like a senior engineer explaining an API to a junior — concrete, precise, with examples. - Comprehensive beats clever. Cover the API's core operations completely before adding workflow shortcuts. Agents can compose basic tools; they cannot invent missing operations.
- Actionable errors are non-negotiable. When a tool fails, the error message must tell the agent exactly what went wrong and exactly what to try next. "An error occurred" is useless. "Authentication failed: API key missing. Set the X-API-KEY header with your key from https://example.com/settings/api" is useful.
- Stateless by default. Design tools to be stateless and idempotent where possible. Stateful MCP servers are harder to debug, scale, and reason about.
- Security is not optional. MCP servers run with the credentials of the human user. Never log secrets. Validate every input. Scope permissions to the minimum required.
Step 0: Plan Before You Build
Answer these before writing a line of code:
- What service are you wrapping? Name it. What does it do?
- What are the 5 most common operations a user needs? Start here — not with full API coverage.
- What is the authentication mechanism? API key, OAuth, bearer token, mTLS?
- What transport?
stdiofor local tools (runs on user's machine),streamable HTTPfor remote servers (deployed, shareable). - What language? TypeScript recommended (best SDK support, type safety, broad compatibility). Python (FastMCP) for data/ML workflows.
- What are the failure modes? API rate limits, network timeouts, auth expiry — plan the error messages now.
Architecture
Transport Selection
| Transport | When to use | How it works |
| stdio | Local tools, developer utilities, file system access | Agent spawns the server as a subprocess; communicates via stdin/stdout |
| Streamable HTTP | Remote services, shared team servers, deployed APIs | Server runs independently; agent connects via HTTP; stateless JSON preferred |
Rule: stdio for anything touching the local machine (files, databases, local dev tools). HTTP for anything deployed or shared.
Tool Design Patterns
Pattern 1: Direct API Mapping (recommended first)
One tool per major API endpoint. Simple, predictable, composable.
server.registerTool("github_list_repos", {
description: "List repositories for a GitHub user or organization. Returns name, description, stars, and clone URL for each repo.",
inputSchema: {
owner: z.string().describe("GitHub username or organization name"),
type: z.enum(["all", "public", "private"]).default("public").describe("Filter by repository type"),
per_page: z.number().min(1).max(100).default(30).describe("Number of repos to return (max 100)")
}
}, async ({ owner, type, per_page }) => {
// implementation
})Pattern 2: Workflow Tool (after core coverage)
Higher-level tools that combine multiple operations for common use cases.
server.registerTool("github_create_pr_from_branch", {
description: "Create a pull request from a feature branch to main. Automatically sets title from branch name if not provided.",
inputSchema: {
repo: z.string().describe("Repository in format 'owner/repo'"),
branch: z.string().describe("Source branch name"),
title: z.string().optional().describe("PR title (defaults to branch name with hyphens replaced by spaces)"),
body: z.string().optional().describe("PR description in Markdown")
}
}, async ({ repo, branch, title, body }) => {
// implementation combining list-branches, create-pr operations
})TypeScript Implementation (Recommended)
Project Structure
my-mcp-server/
├── src/
│ ├── index.ts # Server entry point
│ ├── tools/ # One file per tool group
│ │ ├── repos.ts
│ │ └── issues.ts
│ ├── client.ts # API client with auth + retry
│ └── errors.ts # Error types and formatters
├── package.json
├── tsconfig.json
└── README.mdpackage.json
{
"name": "my-mcp-server",
"version": "1.0.0",
"type": "module",
"scripts": {
"build": "tsc",
"dev": "tsx watch src/index.ts",
"start": "node dist/index.js"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.0.0",
"zod": "^3.23.0"
},
"devDependencies": {
"typescript": "^5.4.0",
"tsx": "^4.11.0"
}
}Server Entry Point (stdio)
// src/index.ts
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { registerRepoTools } from "./tools/repos.js";
import { registerIssueTools } from "./tools/issues.js";
const server = new McpServer({
name: "github-mcp",
version: "1.0.0",
});
// Register all tool groups
registerRepoTools(server);
registerIssueTools(server);
// Start with stdio transport
const transport = new StdioServerTransport();
await server.connect(transport);Server Entry Point (HTTP)
// src/index.ts
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
import express from "express";
const app = express();
app.use(express.json());
app.post("/mcp", async (req, res) => {
const server = new McpServer({ name: "my-mcp", version: "1.0.0" });
// register tools...
const transport = new StreamableHTTPServerTransport({ sessionType: "stateless" });
await server.connect(transport);
await transport.handleRequest(req, res, req.body);
});
app.listen(3000);Tool Implementation with Full Error Handling
// src/tools/repos.ts
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
export function registerRepoTools(server: McpServer) {
server.registerTool(
"github_get_repo",
{
description: "Get details about a GitHub repository including description, stars, forks, language, and open issue count.",
inputSchema: {
repo: z.string().describe("Repository in 'owner/repo' format, e.g. 'microsoft/vscode'"),
},
// Annotations help agents understand tool behavior
annotations: {
readOnlyHint: true, // Does not modify data
destructiveHint: false,
idempotentHint: true, // Same input = same output
}
},
async ({ repo }) => {
// Input validation (beyond schema)
if (!repo.includes("/")) {
return {
isError: true,
content: [{
type: "text",
text: `Invalid repo format: "${repo}". Expected "owner/repo", e.g. "microsoft/vscode".`
}]
};
}
try {
const response = await fetch(`https://api.github.com/repos/${repo}`, {
headers: {
Authorization: `Bearer ${process.env.GITHUB_TOKEN}`,
Accept: "application/vnd.github.v3+json",
},
});
if (response.status === 404) {
return {
isError: true,
content: [{ type: "text", text: `Repository "${repo}" not found. Check the name and ensure it is public or your token has access.` }]
};
}
if (response.status === 401) {
return {
isError: true,
content: [{ type: "text", text: "GitHub authentication failed. Set the GITHUB_TOKEN environment variable with a valid personal access token." }]
};
}
if (!response.ok) {
return {
isError: true,
content: [{ type: "text", text: `GitHub API error ${response.status}: ${await response.text()}` }]
};
}
const data = await response.json();
// Return both structured data and human-readable text
return {
content: [
{
type: "text",
text: `**${data.full_name}**\n${data.description ?? "No description"}\n\n⭐ ${data.stargazers_count} stars · 🍴 ${data.forks_count} forks · 🐛 ${data.open_issues_count} open issues\nLanguage: ${data.language ?? "Unknown"}\nURL: ${data.html_url}`
}
],
structuredContent: data // Full JSON for programmatic use
};
} catch (error) {
return {
isError: true,
content: [{ type: "text", text: `Network error connecting to GitHub API: ${error instanceof Error ? error.message : String(error)}. Check your internet connection.` }]
};
}
}
);
}Python Implementation (FastMCP)
# server.py
from fastmcp import FastMCP
import httpx
import os
mcp = FastMCP("my-mcp-server")
@mcp.tool()
async def get_repo(repo: str) -> str:
"""Get details about a GitHub repository.
Args:
repo: Repository in 'owner/repo' format, e.g. 'microsoft/vscode'
Returns:
Repository details including description, stars, and language.
"""
if "/" not in repo:
raise ValueError(f'Invalid repo format: "{repo}". Expected "owner/repo".')
token = os.environ.get("GITHUB_TOKEN")
if not token:
raise EnvironmentError(
"GITHUB_TOKEN not set. Create a token at https://github.com/settings/tokens"
)
async with httpx.AsyncClient() as client:
response = await client.get(
f"https://api.github.com/repos/{repo}",
headers={"Authorization": f"Bearer {token}"},
timeout=10.0
)
response.raise_for_status()
data = response.json()
return (
f"**{data['full_name']}**\n"
f"{data.get('description', 'No description')}\n"
f"⭐ {data['stargazers_count']} stars · Language: {data.get('language', 'Unknown')}"
)
if __name__ == "__main__":
mcp.run()Tool Description Writing Guide
The description field is what the model reads. Write it like documentation for a developer:
Bad description:
"Gets stuff from GitHub"Good description:
"Get details about a GitHub repository including name, description, star count,
fork count, open issue count, primary language, and clone URL. Use when you need
to look up information about a specific repo before performing operations on it."Template for every tool description:
[Verb] [what it does] including [key data returned].
Use when [specific trigger condition].
[Auth note if non-obvious.]
[Format note if output is structured.]Testing Your MCP Server
MCP Inspector (interactive)
# TypeScript server
npx @modelcontextprotocol/inspector node dist/index.js
# Python server
npx @modelcontextprotocol/inspector python server.pyOpens a web UI where you can call every tool manually and inspect request/response.
Automated Tests
// Test each tool in isolation
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
const server = new McpServer({ name: "test", version: "1.0.0" });
registerRepoTools(server);
await server.connect(serverTransport);
// Call tool and assert response
const result = await client.callTool("github_get_repo", { repo: "microsoft/vscode" });
assert(result.content[0].text.includes("microsoft/vscode"));Claude Desktop Integration (stdio)
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"my-server": {
"command": "node",
"args": ["/path/to/my-mcp-server/dist/index.js"],
"env": {
"API_KEY": "your-key-here"
}
}
}
}For Python:
{
"mcpServers": {
"my-server": {
"command": "python",
"args": ["/path/to/server.py"],
"env": { "GITHUB_TOKEN": "ghp_xxx" }
}
}
}Security Checklist
- No secrets in source code — all via environment variables
- No secrets in logs or error messages — strip before returning
- All user inputs validated — schema + semantic validation
- API calls have explicit timeouts (default: 10s)
- Rate limit errors handled gracefully with retry guidance
- Tool annotations set (
readOnlyHint,destructiveHint) — helps agents and UIs warn before destructive calls - Permissions scoped to minimum required — don't request admin if read is enough
Bundled Reference
Read tool-design.md when defining a tool inventory, descriptions, schemas, and destructive-operation safeguards. It is a review aid; the project API contract remains the source of truth. For a JSON tool inventory, run python scripts/validate_tool_contract.py tools.json before implementation.
Definition of Done — MCP Server
- All planned tools implemented with complete input schemas
- Every parameter has a
describe()string - Every error path returns an actionable error message (not a raw exception)
- Auth errors specifically explain how to fix the auth issue
- Tool annotations set on every tool
- Tested via MCP Inspector — all tools callable
- At least one automated test per tool
- README includes: what the server does, prerequisites, install steps, env vars, Claude Desktop config snippet
- No secrets in source, logs, or error responses
- Works with
npx @modelcontextprotocol/inspector— passes manual smoke test
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
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.

