build-mcp
Build an MCP server end to end, tailored to how it will be used. Use when asked to build an MCP, create an MCP server, wrap an API as a tool, make a tool for Claude, expose a service to an agent, build a Claude connector, or turn a service into MCP tools. Asks up front who the server is for (just me, my org, or public) and what it wraps, then walks through analyze, build, deploy, scale, and distribute with steps tailored to that answer. Builds on the example-skills:mcp-builder skill for implementation depth.
git clone --depth 1 https://github.com/techwolf-ai/ai-first-toolkit /tmp/build-mcp && cp -r /tmp/build-mcp/plugins/tool-build-kit/skills/build-mcp ~/.claude/skills/build-mcpSKILL.md
# Build MCP
Build a Model Context Protocol (MCP) server the right way, end to end. The defining move of this skill: establish the user's context with `AskUserQuestion` before building anything, then tailor every phase to that context. A personal local server and a public hosted server share almost no steps past "build", so branch early and commit to the branch.
## How this relates to mcp-builder
The Anthropic `example-skills:mcp-builder` skill is the gold-standard reference for the *implementation* itself: FastMCP and TypeScript SDK patterns, tool design, input/output schemas, annotations, error handling, and evaluation. Do not duplicate it. This skill is the **scope-and-distribution wrapper around it**: it decides what to build, for whom, where it runs, and how it ships. When you reach the build phase, invoke `example-skills:mcp-builder` for the deep implementation guidance and keep this skill's references thin.
## The five phases
1. **Analyze**: understand the service to wrap and pick the right tool boundaries.
2. **Build**: scaffold and implement the server (delegates to mcp-builder).
3. **Deploy**: get it running and registered for the target runtime.
4. **Scale**: harden and operate it (only substantive for hosted servers).
5. **Distribute**: make it reachable by the intended audience.
Run them in order. The `AskUserQuestion` answers from Phase 0 gate phases 3, 4, and 5.
## Phase 0: Establish context (AskUserQuestion, do this first)
Before analyzing or writing anything, branch on the user's context. Ask the **audience** question first; it is the headline decision and it cascades into everything downstream. Then ask runtime only if it is still ambiguous, and ask language after Analyze (so you can recommend based on the wrapped service).
**Question 1 (always, ask first): Audience / scope:**
Use `AskUserQuestion`:
- header: "Audience"
- question: "Who is this MCP server for? This decides how we deploy and distribute it."
- options:
1. "Just me": personal local tool on my machine.
2. "My team / org": shared internally, installed by colleagues.
3. "Public / external": published openly for anyone to install.
**Question 2 (conditional): Where it runs:**
Skip for "Just me" (assume local stdio). Ask for org/public when unclear:
- header: "Runtime"
- question: "Where should the server run?"
- options:
1. "Local stdio": runs as a subprocess on each user's machine. Simplest. Each user supplies their own secrets.
2. "Hosted HTTP": one Streamable HTTP server many users connect to. Needs auth, deploy, and scaling.
**Question 3 (after Analyze): Language:**
- header: "Language"
- question: "What should the server be written in?"
- options:
1. "Python (FastMCP)": fastest path, great for wrapping Python-friendly APIs.
2. "Node / TypeScript (MCP SDK)": the mcp-builder ecosystem default (strongest SDK, models write TS well, best MCPB compatibility). Pick it when torn, or when the service has a strong TS SDK or you ship via npm.
3. "Recommend for me": pick based on the service analyzed in Phase 1; lean TypeScript unless the wrapped service is clearly Python-friendly.
Ask one question at a time. Confirm the resolved context back to the user in one line before proceeding (e.g. "Building a personal, local, Python stdio server that wraps the Linear API"). That resolved tuple drives the branch table below.
## Branch table (the spine of this skill)
| Phase | Just me (local stdio) | My org (local stdio) | My org (hosted HTTP) | Public (package) | Public (hosted HTTP) |
|-------|----------------------|----------------------|----------------------|------------------|----------------------|
| **Deploy** | `claude mcp add --scope user` or `.mcp.json` | Bundle in a Claude Code plugin; `${CLAUDE_PLUGIN_ROOT}` paths | Deploy Streamable HTTP endpoint + OAuth/bearer | Publish to PyPI/npm; users run via `uvx`/`npx` | Deploy HTTP endpoint; document the URL |
| **Scale** | N/A (keep it maintainable) | N/A per-user; version the plugin | Real: statelessness, sessions, auth, rate limits | Versioning + backward-compat tool changes | Full: statelessness, auth, rate limits, observability |
| **Distribute** | Not shared. Stop after registration. | Org marketplace (`.claude-plugin/marketplace.json` + `/plugin install`) | Org marketplace entry pointing at the hosted URL | PyPI/npm + MCP registry via `mcp-publisher` | MCP registry `remotes` entry + public docs |
If a phase says N/A for the chosen branch, say so explicitly and move on. Do not pad it.
Reference files for each branch:
- **references/transports.md**: stdio vs Streamable HTTP, when each applies, the `http`/`streamable-http` naming gotcha.
- **references/deploy-local.md**: `claude mcp add`, scopes, `.mcp.json`, Claude Desktop config, uvx/npx run configs.
- **references/distribute-marketplace.md**: bundling an MCP server in a Claude Code plugin, org marketplace, the public MCP registry.
- **references/scaling.md**: hosted-server statelessness, sessions, auth, versioning, security.
- **references/python-fastmcp.md** and **references/node-sdk.md**: thin quickstarts that hand off to mcp-builder.
Load only the references the current branch and phase need. Progressive disclosure.
## Phase 1: Analyze
Understand what you are wrapping before you write tools. Output a short tool plan, then confirm it.
1. **Identify the service/API.** Read its docs or SDK. Note auth model (API key, OAuth, none), base URL, rate limits, pagination style.
2. **Pick tool boundaries.** This is a real tradeoff, framed the way mcp-builder frames it: comprehensive API coverage gives agents flexibility to compose operations, while specialized workflow tools are more convenient for specific tasks. Performance is client-dependent (some clients do better with code execution over basic tools, others with higher-level workflows). When uncertain, default to comprehensive API coverage rather than a few workflow tools. Either way each tool does one focused thing with a clear,Find context from past Claude Code (CLI) and Claude Cowork (desktop) sessions on this Mac. Use when the user wants to recall something they did before but can't find it , phrasings like "where did I work on X", "find that session where I…", "when did I last do Y", "pull up the conversation about Z", "that time I built/tried/discussed …". Searches by kind (code/cowork), time range, title, working directory, or free-text content across all transcripts.
Mine the user's Claude Code + Cowork session history into a structured task profile, what they do with AI, how often, how successfully where friction lives, then propose atomic skills that would reduce iteration. Use when the user asks to "analyse my Claude use", "build a task profile", "what tasks do I do with Claude", "where am I spending tokens", "what skills would help me", or mentions reviewing past sessions for patterns. Produces profile.csv (shareable), explorer.html (personal coaching view with AI-first principle comparison + token-spend chart), and skill-proposals.md.
Personal diagnosis of where your Claude Code + Cowork spend goes. Reads local transcripts, prints your conversation length distribution, marathon share, cache rebuild costs, and per-project diagnosis (good projects and problem projects) right in the terminal. Then offers a deeper dive that fans out parallel Haiku subagents over your most expensive (and most efficient) sessions and writes a tight Markdown report. Use when the user asks "why is my Claude spend so high", "where am I burning tokens", "diagnose my Claude habits", "audit my Claude usage", or asks for a personal token-cost diagnosis.
Analyze, re-engineer, or bootstrap projects to align with AI-first design principles. Use when asked to review, audit, improve, 'ai-firstify', or start a new project. Performs deep analysis across 7 dimensions, actively restructures existing projects, or guides new project setup through discovery questions. Based on the 9 design principles and 7 design patterns from the TechWolf AI-First Bootcamp.
Analyze engagement patterns across published posts to identify what works. Use when asked to review performance, find successful patterns, or optimize future content.
Generate LinkedIn post ideas from external sources (files, URLs, research). Use when the user provides source material (PDFs, URLs, articles) to brainstorm topics. NOT for writing or developing drafts - use write-linkedin-post instead.
Generate opinion piece ideas from recent LinkedIn posts (last 30 days). Use when asked to find opinion topics, brainstorm article ideas, or cross-pollinate content between LinkedIn and opinion pieces.
Entry point for the TechWolf content-studio plugin. Use to understand the workflow, pick the right content skill, or start setup for a new author/repository.