mcp-builder
Build high-quality MCP servers with strong tool design, structured outputs, clear error handling, and realistic evaluations. Use when creating or improving MCP servers in TypeScript or Python for external APIs, services, or internal platforms.
What this skill does
# MCP Builder
Design MCP servers that are easy for agents to discover, compose, and trust.
- Leverage native parallel subagent dispatch and 200k+ context windows where available.
## When to Use
Use symptom -> action triggers: when one matches, apply this skill and verify with the protocol below.
- You are creating a new MCP server around an external API or internal platform.
- An existing MCP server needs better tool naming, schemas, pagination, or error handling.
- You need a workflow for evaluating whether an MCP server is actually useful for real agent tasks.
- You are deciding between TypeScript and Python MCP implementations.
## Glossary
- MCP Inspector: An interactive client for browsing registered tools, schemas, inputs, and outputs while you validate a server.
- Structured outputs: Predictable JSON or schema-backed payloads that downstream agents can parse safely instead of scraping prose.
- Workflow tool: A higher-level tool that coordinates several lower-level API steps into one agent-friendly operation.
## Core Workflow
### 1. Research First
Before implementation:
1. Read the current MCP protocol documentation.
2. Read the relevant SDK guide for your implementation language.
3. Review the target service API and list the highest-value operations.
4. Decide which operations should stay low-level and which deserve dedicated workflow tools.
### 2. Design Agent-Friendly Tools
Prefer tools that are easy to discover and compose:
- use clear action-oriented names
- keep schemas explicit and constrained
- support pagination and filters where lists can grow
- return structured content whenever the client can benefit from it
- write error messages that tell the agent what to do next
### 3. Implement Shared Infrastructure
Build common pieces before individual tools:
- authenticated API client
- error formatter
- response normalizer
- pagination helpers
- reusable schema utilities
### 4. Test the Server Like an Agent Would
Verify more than syntax:
- build or type-check the server
- inspect tool registration and descriptions
- run the server through MCP Inspector or an equivalent client
- confirm that common read and write flows behave predictably
### 5. Create Real Evaluations
A strong MCP server needs realistic read-only evaluations:
- write questions that require multiple tool calls
- keep answers stable and verifiable
- prefer realistic operator tasks over toy examples
- store the evaluation set with the server so regressions are visible later
## Shared Infrastructure Before and After
### Pagination Helper
```typescript
// Before
async function listTickets(page = 1) {
return api.get(`/tickets?page=${page}`)
}
// After
export async function paginate<T>(fetchPage: (cursor?: string) => Promise<{ items: T[]; nextCursor?: string }>) {
const items: T[] = [];
let cursor: string | undefined;
do {
const page = await fetchPage(cursor);
items.push(...page.items);
cursor = page.nextCursor;
} while (cursor);
return items;
}
```
### Error Formatter
```typescript
// Before
throw new Error(`Request failed: ${response.status}`)
// After
throw formatToolError({
code: 'tickets.list_failed',
message: 'Unable to list tickets for the requested project.',
status: response.status,
nextAction: 'Check the project id and retry with a smaller page size.',
})
```
### Schema Utilities
```typescript
// Before
server.tool('create_ticket', { title: z.string(), priority: z.string() }, handler)
// After
const prioritySchema = z.enum(['low', 'medium', 'high']);
const ticketInput = buildToolSchema({
title: z.string().min(1),
priority: prioritySchema.default('medium'),
});
server.tool('create_ticket', ticketInput, handler)
```
## Language Guidance
### TypeScript
Prefer TypeScript when you want the strongest SDK ergonomics and schema-heavy tool definitions.
Primary references:
- [TypeScript MCP Guide](./reference/node_mcp_server.md)
- [MCP Best Practices](./reference/mcp_best_practices.md)
### Python
Prefer Python when the target ecosystem or existing service code is already Python-heavy.
Primary references:
- [Python MCP Guide](./reference/python_mcp_server.md)
- [MCP Best Practices](./reference/mcp_best_practices.md)
## Security, Observability, Auth Handling, Logging, and Versioning
### Security
Minimize scopes, redact secrets from errors, and keep authorization checks inside shared request middleware instead of duplicating them per tool.
### Observability
Log request identifiers, tool names, latency, and retry counts so agent failures can be traced without replaying everything manually.
### Auth Handling
Support token refresh or credential reload paths explicitly so agents get actionable failures instead of opaque 401 loops.
### Logging
Prefer structured logs with stable fields such as `tool`, `resource`, `status`, and `duration_ms` over free-form strings.
### Versioning
Treat tool names, schemas, and error contracts as public interfaces; add versions or deprecation notes before changing them in place.
## Anti-Patterns
- Starting work before the plan or gate is clear: Execution drifts when success criteria are implied instead of explicit.
- Treating verification as optional cleanup: The last mile is where regressions and missing updates are usually hiding.
- Mixing planning, implementation, and release work in one jump: You lose the causal chain that explains why a change is safe.
## Verification Protocol
Before claiming "skill applied successfully":
1. Pass/fail: The Mcp Builder workflow names the agent boundary, delegated scope, and expected return artifact.
2. Pass/fail: Context passed to helpers is minimal, task-local, and free of hidden expected answers.
3. Pass/fail: Results are integrated only after evidence, diffs, or citations are checked by the controller.
4. Pressure-test scenario: Run the workflow on two similar tasks that must not share assumptions or leaked context.
5. Success metric: Zero context leakage; every delegated output is independently reviewable.
## Included Assets
- [MCP Best Practices](./reference/mcp_best_practices.md)
- [TypeScript Implementation Guide](./reference/node_mcp_server.md)
- [Python Implementation Guide](./reference/python_mcp_server.md)
- [Evaluation Guide](./reference/evaluation.md)
- `scripts/connections.py`
- `scripts/evaluation.py`
- `scripts/example_evaluation.xml`
## Practical Rules
- Comprehensive API coverage is usually safer than a handful of overly clever workflow tools.
- Add workflow tools only when they remove real friction for agents.
- Keep tool descriptions concise enough to stay readable in tool lists.
- Structured outputs beat prose when downstream automation matters.
- Evaluation quality is part of the server quality, not a separate optional step.
<!-- PORTABILITY:START -->
## Cross-Client Portability
This skill is written to stay usable across GitHub Copilot, Claude Code, Codex, and Gemini CLI.
- GitHub Copilot: keep the folder in a Copilot-visible skill or plugin path, or wrap the workflow as project instructions if the host does not support portable skill folders directly.
- Claude Code: keep the folder in a local skills directory or a compatible plugin or marketplace source.
- Codex: install or sync the folder into `$CODEX_HOME/skills/<skill-name>` and restart Codex after major changes.
- Gemini CLI: this repository generates a project command named `/skills:mcp-builder` from this skill. Rebuild commands with `python scripts/export-gemini-skill.py mcp-builder` and then run `/commands reload` inside Gemini CLI.
<!-- PORTABILITY:END -->
<!-- MCP:START -->
## MCP Availability And Fallback
Preferred MCP Server: None required
- Fallback prompt: "Use the MCP Builder skill without MCP. Rely on the local `SKILL.md`, bundled references or scripts, and manual verification. Show the exact commands, evidence, and final checks you used before concluding."
- If the current host does not expose a matching server, use the bundled rRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.