create-mcp-servers
This utility generates MCP-compliant servers using secure patterns, environment variables, and tool discovery structures.
Install
mkdir -p .claude/skills/create-mcp-servers && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3812" && unzip -o skill.zip -d .claude/skills/create-mcp-servers && rm skill.zipInstalls to .claude/skills/create-mcp-servers
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Create Model Context Protocol (MCP) servers that expose tools, resources, and prompts to Claude. Use when building custom integrations, APIs, data sources, or any server that Claude should interact with via the MCP protocol. Supports both TypeScript and Python implementations.Key capabilities
- →Configures MCP server tool discovery and schemas
- →Implements secure environment variable handling
- →Structures API integrations for MCP protocol
- →Sets up standard directory layouts for servers
How it works
It generates an MCP-compliant architecture using meta-tools for on-demand discovery or direct tool implementation, strictly enforcing security via env vars.
Inputs & outputs
When to use create-mcp-servers
- →Building custom MCP tools
- →Integrating APIs into Claude
- →Creating custom MCP resources
About this skill
<essential_principles>
<the_5_rules> Every MCP server must follow these:
- Never Hardcode Secrets - Use
${VAR}expansion in configs, environment variables in code - Use
cwdProperty - Isolates dependencies (not--cwdin args) - Always Absolute Paths -
which uvto find paths, never relative - One Server Per Directory -
~/Developer/mcp/{server-name}/ - Use
uvfor Python - Better than pip, handles venvs automatically </the_5_rules>
<security_checklist>
- Never ask user to paste secrets into chat
- Always use environment variables for credentials
- Use ${VAR} expansion in configs
- Provide exact commands for user to run in terminal
- Verify environment variable existence without showing values
- Never hardcode API keys in code or configs </security_checklist>
<architecture_decision> Operation count determines architecture:
- 1-2 operations → Traditional pattern (flat tools)
- 3+ operations → On-demand discovery pattern (meta-tools)
Traditional: Each operation is a separate tool On-demand: 4 meta-tools (discover, get_schema, execute, continue) + operations.json </architecture_decision>
<context> MCP servers expose: - **Tools**: Functions Claude can call (API requests, file operations, calculations) - **Resources**: Data Claude can read (files, database records, API responses) - **Prompts**: Reusable prompt templates with argumentsStandard location: ~/Developer/mcp/{server-name}/
</context>
</essential_principles>
<routing> Based on user intent, route to appropriate workflow:No context provided (skill invoked without description): Use AskUserQuestion:
- header: "Mode"
- question: "What would you like to do?"
- options:
- "Create a new MCP server" → workflows/create-new-server.md
- "Update an existing MCP server" → workflows/update-existing-server.md
- "Troubleshoot a server" → workflows/troubleshoot-server.md
Context provided (user described what they want): Route directly to workflows/create-new-server.md </routing>
<workflows_index>
| Workflow | Purpose |
|---|---|
| create-new-server.md | Full 8-step workflow from intake to verification |
| update-existing-server.md | Modify or extend an existing server |
| troubleshoot-server.md | Diagnose and fix connection/runtime issues |
| </workflows_index> |
<templates_index>
| Template | Purpose |
|---|---|
| python-server.py | Traditional pattern starter for Python |
| typescript-server.ts | Traditional pattern starter for TypeScript |
| operations.json | On-demand discovery operations definition |
| </templates_index> |
<scripts_index>
| Script | Purpose |
|---|---|
| setup-python-project.sh | Initialize Python MCP project with uv |
| setup-typescript-project.sh | Initialize TypeScript MCP project with npm |
| </scripts_index> |
<references_index> Core workflow:
- creation-workflow.md - Complete step-by-step with exact commands
Architecture patterns:
- traditional-pattern.md - For 1-2 operations (flat tools)
- large-api-pattern.md - For 3+ operations (on-demand discovery)
Language-specific:
- python-implementation.md - Async patterns, type hints
- typescript-implementation.md - Type safety, SDK features
Advanced topics:
- oauth-implementation.md - OAuth with stdio isolation
- response-optimization.md - Field truncation, pagination
- tools-and-resources.md - Resources API, prompts, streaming
- testing-and-deployment.md - Unit tests, packaging, publishing
- validation-checkpoints.md - All validation checks
- adaptive-questioning-guide.md - Question templates for intake
- api-research-template.md - API research document format </references_index>
<quick_reference>
# List servers
claude mcp list
# Add server (Python)
claude mcp add --transport stdio <name> \
--env API_KEY='${API_KEY}' \
-- uv --directory ~/Developer/mcp/<name> run python -m src.server
# Add server (TypeScript)
claude mcp add --transport stdio <name> \
--env API_KEY='${API_KEY}' \
-- node ~/Developer/mcp/<name>/build/index.js
# Remove server
claude mcp remove <name>
# Check logs
tail -f ~/Library/Logs/Claude/mcp-server-<name>.log
# Find paths
which uv && which node && which python
</quick_reference>
<troubleshooting_quick>
Server not appearing: Check claude mcp list, verify config in ~/.claude/settings.json
"command not found": Use absolute paths from which uv / which node
Environment variable not found:
echo $MY_API_KEY # Check if set
echo 'export MY_API_KEY="value"' >> ~/.zshrc && source ~/.zshrc
Secrets visible in conversation: STOP. Delete conversation. Rotate credentials. Never paste secrets in chat.
Full troubleshooting: workflows/troubleshoot-server.md </troubleshooting_quick>
<success_criteria> A production-ready MCP server has:
- Valid configuration in Claude Code (
claude mcp listshows ✓ Connected) - Valid configuration in Claude Desktop config
- Environment variables set securely in ~/.zshrc
- Architecture matches operation count
- OAuth stdio isolation if applicable
- Response optimization for list/search operations
- All validation checkpoints passed
- No errors in logs </success_criteria>
When not to use it
- →Integrating services that lack an API
- →Building standard browser-based extensions
Prerequisites
Limitations
- →Requires an existing API to integrate with
- →Tool discovery patterns require specific server-side schema definitions
How it compares
It forces compliance with production-grade MCP standards (e.g., `uv`, absolute paths) rather than creating ad-hoc scripts.
Compared to similar skills
create-mcp-servers side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| create-mcp-servers (this skill) | 1 | 6mo | Review | Intermediate |
| mcp-builder | 136 | 3mo | Review | Advanced |
| copilot-sdk | 7 | 4mo | Review | Intermediate |
| mcp-developer | 1 | 3mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by glittercowboy
View all by glittercowboy →You might also like
mcp-builder
anthropics
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
copilot-sdk
github
Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.
mcp-developer
Jeffallan
Use when building MCP servers or clients that connect AI systems with external tools and data sources. Invoke for MCP protocol compliance, TypeScript/Python SDKs, resource providers, tool functions.
perplexity-known-pitfalls
jeremylongshore
Identify and avoid Perplexity anti-patterns and common integration mistakes. Use when reviewing Perplexity code for issues, onboarding new developers, or auditing existing Perplexity integrations for best practices violations. Trigger with phrases like "perplexity mistakes", "perplexity anti-patterns", "perplexity pitfalls", "perplexity what not to do", "perplexity code review".
mcp-builder
keepsty
MCP 服务器构建方法论 — 系统化构建生产级 MCP 工具,让 AI 助手连接外部能力
mcp-builder-ms-v2
diegosouzapw
MCP Server Development Guide workflow skill. Use this skill when the user needs building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK) and the operator should preserve the upstream workflow, copied support files, and provenance before me