MCP Builder
Build MCP (Model Context Protocol) servers using the official @modelcontextprotocol/sdk.
Install
npx skills add Leanmcp/gateway-skills --skill mcp-builder -g -a claude-code -y- Repository
- Leanmcp/gateway-skills2.1k
- Category
- AI and agents
- Updated
- 28d ago
- License
- MIT
- Context cost
- Mediumabout 2,324 tokens
- Runs scripts
- Yes, review before use
What it does
Build MCP (Model Context Protocol) servers using the official @modelcontextprotocol/sdk. Use this skill when users ask to create an MCP server, MCP tools, MCP resources, or want to expose APIs/functionality to AI agents. This skill covers vanilla MCP implementation with Streamable HTTP transport, session management, tools, resources, and prompts.
MCP Builder Skill
This skill guides you in building MCP (Model Context Protocol) servers using the official @modelcontextprotocol/sdk package with TypeScript.
When to Use This Skill
- User asks to "create an MCP server"
- User wants to "expose an API to AI agents"
- User needs "tools for Claude/LLM"
- User mentions "Model Context Protocol"
- User wants to build "AI agent integrations"
MCP Core Concepts
What is MCP?
Model Context Protocol (MCP) is an open standard that enables structured, secure interactions between Large Language Models (LLMs) and external systems. MCP acts as a bridge allowing AI agents to:
- Access external data sources safely
- Execute tools and functions
- Maintain consistent communication protocols
- Integrate with APIs and databases
Key Components
Tools - Interactive functions that perform actions or computations:
- Execute operations and computations
- Accept parameters from the LLM
- Return structured responses
- Can change system state (side effects allowed)
- Examples: calculations, database operations, API calls, sending emails
Resources - Read-only data endpoints:
- Passive data sources (no side effects)
- Loaded into AI context for reasoning
- URI-based identification
- Examples: documentation, config files, status data, user profiles
Prompts - Reusable prompt templates:
- Pre-defined conversation starters
- Can accept arguments for customization
- Return structured messages for the LLM
Transport Options
| Transport | Best For | Pros | Cons |
|---|---|---|---|
| Streamable HTTP | Production, cloud, multiple clients | Scalable, remote access | Requires session management |
| SSE | Real-time apps, live updates | Streaming, auto-reconnect | Connection limits |
| STDIO | Local desktop, development | Simple, low latency | Single session, local only |
Recommendation: Use Streamable HTTP for most production servers.

