MCP Server Builder
anthropics/skills
Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.
MCP server design: tool schemas, resources, stdio/SSE, capability negotiation.
$ npx skills add softspark/ai-toolkit --skill mcp-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install softspark/ai-toolkit mcp-patterns --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/app/skills/mcp-patterns .claude/skills/mcp-patterns && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "mcp-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/mcp-patterns into .claude/skills/mcp-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mcp-patterns", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/softspark/ai-toolkit/tree/main/app/skills/mcp-patternsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add softspark/ai-toolkit --skill mcp-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install softspark/ai-toolkit mcp-patterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .agents/skills && cp -r skills-src/app/skills/mcp-patterns .agents/skills/mcp-patterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "mcp-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/mcp-patterns into .agents/skills/mcp-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mcp-patterns", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add softspark/ai-toolkit --skill mcp-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install softspark/ai-toolkit mcp-patterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/app/skills/mcp-patterns .cursor/skills/mcp-patterns && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "mcp-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/mcp-patterns into .cursor/skills/mcp-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mcp-patterns", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/softspark/ai-toolkit.git --path app/skills/mcp-patterns--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add softspark/ai-toolkit --skill mcp-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install softspark/ai-toolkit mcp-patterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/app/skills/mcp-patterns .gemini/skills/mcp-patterns && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "mcp-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/mcp-patterns into .gemini/skills/mcp-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mcp-patterns", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install softspark/ai-toolkit mcp-patternsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add softspark/ai-toolkit --skill mcp-patterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .github/skills && cp -r skills-src/app/skills/mcp-patterns .github/skills/mcp-patterns && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "mcp-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/mcp-patterns into .github/skills/mcp-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mcp-patterns", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add softspark/ai-toolkit --skill mcp-patterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install softspark/ai-toolkit mcp-patterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/app/skills/mcp-patterns .opencode/skills/mcp-patterns && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "mcp-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/mcp-patterns into .opencode/skills/mcp-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mcp-patterns", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
mcp-patternsMCP server design: tool schemas, resources, stdio/SSE, capability negotiation.
MCP Patterns is an agent skill from softspark/ai-toolkit. MCP server design: tool schemas, resources, stdio/SSE, capability negotiation. Triggers: MCP, Model Context Protocol, JSON-RPC, stdio, SSE, Claude Desktop.
Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Agent Workflows, covering MCP servers. It works with Model Context Protocol. The repository describes itself as: Professional-grade AI coding toolkit: 94 skills, 44 agents, multi-platform (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Antigravity, Codex CLI… The licence is Apache-2.0.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit d64db2b. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadFrom allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript, python and json).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
claude.aiFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
MCP Patterns loads about 2.4k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 642 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from softspark/ai-toolkit at commit d64db2b, republished under its Apache-2.0 licence (© softspark). 642 words, ~2,428 tokens.
.claude/skills/mcp-patterns/SKILL.md (or your agent's skills folder).| Concept | Description |
|---|---|
| Server | Exposes tools, resources, prompts to clients |
| Client | Connects to servers, invokes tools |
| Transport | Communication layer (stdio, HTTP, SSE) |
| Tool | Executable function with JSON Schema |
| Resource | Read-only data (files, URLs) |
| Prompt | Reusable prompt template |
// TypeScript with @modelcontextprotocol/sdk
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [{
name: "search_kb",
description: "Search the knowledge base",
inputSchema: {
type: "object",
properties: {
query: {
type: "string",
description: "Search query"
},
limit: {
type: "number",
description: "Max results",
default: 10
}
},
required: ["query"]
},
annotations: {
readOnlyHint: true, // Doesn't modify state
idempotentHint: true, // Same input = same output
openWorldHint: false // Bounded result set
}
}]
}));| Annotation | Meaning | Use When |
|---|---|---|
readOnlyHint | No side effects | Read operations |
destructiveHint | Deletes/modifies data | Write operations |
idempotentHint | Safe to retry | GET-like operations |
openWorldHint | Results may change | External API calls |
The description is the only signal the model uses to route a request. The schema constrains the call; the description decides whether the call happens at all. Treat it as a routing contract, not API prose. A good one has five parts, in this order:
Search indexed knowledge-base documents and return ranked passages. Skip the HTTP verb and endpoint; calls GET /v2/search tells the model nothing about intent.Ask: is the user looking up existing content, or asking me to create new content? This tool is read-only — if they want to create, stop.Positive triggers tell the model when a tool could apply; negative ones are what stop it firing on overlapping requests. When two tools have similar purposes (search_kb vs search_code, get_document vs list_documents), the only thing keeping the model off the wrong one is each description naming the other and drawing the line. Budget more words for the boundary than the bullseye.
When tools overlap, make each WHEN NOT TO USE point at its neighbour and state the discriminator explicitly:
search_kb
WHEN NOT TO USE: do not use to fetch a document you already have the id for —
that is get_document. Use search_kb only when you need to discover *which*
document, by meaning or keyword.
get_document
WHEN NOT TO USE: do not use to find a document by topic or keyword — you must
already hold an exact id (from search_kb results). For discovery, use search_kb.name: cancel_workflow
description: |
Stop a running agent workflow and discard its in-flight results.
WHEN TO USE: the user says "cancel the workflow", "stop run abc123",
"kill that job", or asks to halt a workflow that get_workflow_status
reports as RUNNING.
WHEN NOT TO USE:
- To inspect progress without stopping — use get_workflow_status.
- To start a fresh run — use start_workflow.
- On a workflow already in a terminal state (COMPLETED/FAILED) — the call
is a no-op and signals the model misread the status.
CRITICAL: cancellation is irreversible and drops partial output. Confirm the
workflowId came from list_workflows or get_workflow_status — never type one
from memory.
Self-test: am I stopping work that is genuinely still RUNNING, or did I confuse
"check status" with "cancel"? If I have not seen a RUNNING status, do not call this.A description that survives this rubric routes correctly without the model reading your source. One that skips WHEN NOT TO USE will misfire the moment a second, similar tool exists in the same server.
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio";
const transport = new StdioServerTransport();
await server.connect(transport);# FastAPI implementation
from fastapi import FastAPI
from sse_starlette.sse import EventSourceResponse
app = FastAPI()
@app.get("/mcp/sse")
async def sse_endpoint():
async def event_generator():
while True:
# Yield MCP events
yield {"event": "message", "data": json.dumps(response)}
return EventSourceResponse(event_generator())
@app.post("/mcp")
async def jsonrpc_endpoint(request: Request):
body = await request.json()
response = await handle_jsonrpc(body)
return JSONResponse(response)Single /mcp endpoint handling GET (SSE) and POST (JSON-RPC):
@app.api_route("/mcp", methods=["GET", "POST"])
async def mcp_endpoint(request: Request):
if request.method == "GET":
# SSE streaming
return EventSourceResponse(stream_generator())
else:
# JSON-RPC
body = await request.json()
return JSONResponse(await handle_jsonrpc(body)){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_kb",
"arguments": {"query": "test", "limit": 5}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{"type": "text", "text": "Search results..."}
]
}
}{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32601,
"message": "Method not found"
}
}| Code | Meaning |
|---|---|
| -32700 | Parse error |
| -32600 | Invalid request |
| -32601 | Method not found |
| -32602 | Invalid params |
| -32603 | Internal error |
Enable intelligent argument suggestions:
server.setRequestHandler(CompletionCompleteRequestSchema, async (request) => {
const { argument } = request.params;
if (argument.name === "service") {
return {
completion: {
values: ["nginx", "postgresql", "redis", "qdrant"],
hasMore: false
}
};
}
return { completion: { values: [], hasMore: false } };
});// Generate secure session ID
const sessionId = crypto.randomUUID();
// Validate Origin header
const allowedOrigins = ["http://localhost:3000", "https://claude.ai"];
if (!allowedOrigins.includes(request.headers.origin)) {
throw new Error("Invalid origin");
}
// Session storage (don't expose to client)
const sessions = new Map<string, SessionData>();Handle multiple requests in single HTTP call:
async def handle_jsonrpc(body):
if isinstance(body, list):
# Batch request
return [await process_single(req) for req in body]
else:
# Single request
return await process_single(body)| Tool | Description |
|---|---|
smart_query | Primary search with auto-routing |
hybrid_search_kb | Raw vector + text search |
get_document | Full document content |
crag_search | Self-correcting search |
multi_hop_search | Complex reasoning |
start_workflow | Start agent workflow |
get_workflow_status | Check workflow progress |
list_workflows | List all workflows |
cancel_workflow | Cancel workflow |
© softspark, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in app/skills/mcp-patterns of softspark/ai-toolkit.
Open the folder on GitHubat commit d64db2b
MCP Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| MCP Patterns this skillsoftspark/ai-toolkit | 179 | — | ~2.4k | Automated safety check: Pass | Apache-2.0 | |
| MCP Server Builderanthropics/skills | 180k | 64 repos | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| MCP Server BuildershareAI-lab/learn-claude-code | 78k | 5 repos | ~1.2k | Automated safety check: Pass | MIT | |
| MCP Integration for Pluginsanthropics/claude-plugins-official | 38k | 11 repos | ~3.1k | Automated safety check: Pass | Apache-2.0 | |
| Fastmcp Client CLIPrefectHQ/fastmcp | 28k | 1 repos | ~823 | Automated safety check: Pass | Apache-2.0 | |
| Crush Configurationcharmbracelet/crush | 29k | — | ~3.7k | Automated safety check: Pass | Custom licence |
anthropics/skills
Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.
shareAI-lab/learn-claude-code
Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.
anthropics/claude-plugins-official
Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.
PrefectHQ/fastmcp
Query and invoke tools on MCP servers using fastmcp list and fastmcp call.
charmbracelet/crush
Explains how to configure the Crush coding agent with crushrc or crush.json, covering providers, models, LSPs, MCP servers, hooks, permissions and config precedence.
mksglu/context-mode
Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.
softspark/ai-toolkit
Prepare or verify a project QA environment with source identity, readiness, browser access, evidence paths and owned cleanup.
softspark/ai-toolkit
Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. An agent skill from softspark/ai-toolkit.
softspark/ai-toolkit
Analyzes code quality, complexity, patterns across codebase.
softspark/ai-toolkit
Drives a brief, specification, issue or existing PR through implementation, review, tests and QA to a ready PR.
softspark/ai-toolkit
Direct technical voice for docs, README, user-facing text. An agent skill from softspark/ai-toolkit.
softspark/ai-toolkit
Detect/generate/debug CI pipeline config (GitHub Actions, GitLab CI).
Works with
Categories
MCP server design: tool schemas, resources, stdio/SSE, capability negotiation. MCP Patterns is an agent skill from softspark/ai-toolkit. MCP server design: tool schemas, resources, stdio/SSE, capability negotiation.
MCP Patterns fits situations like: tasks that involve MCP servers.
Run `npx skills add softspark/ai-toolkit --skill mcp-patterns -a claude-code`. Or copy the skill folder (app/skills/mcp-patterns in softspark/ai-toolkit) into .claude/skills/mcp-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add softspark/ai-toolkit --skill mcp-patterns -a codex`. Or copy the skill folder (app/skills/mcp-patterns in softspark/ai-toolkit) into .agents/skills/mcp-patterns in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add softspark/ai-toolkit --skill mcp-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mcp-patterns, .gemini/skills/mcp-patterns, .github/skills/mcp-patterns and .opencode/skills/mcp-patterns in your project.
SKILL.md names no scripts, command-line tools or credentials: MCP Patterns is instructions for the agent only. Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read.
SKILL.md names 1 domain. In commands or code: claude.ai; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
MCP Patterns is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with MCP Patterns: MCP Server Builder (anthropics/skills, 180k stars), MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), MCP Integration for Plugins (anthropics/claude-plugins-official, 38k stars) and Fastmcp Client CLI (PrefectHQ/fastmcp, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
softspark (a GitHub user) maintains it in softspark/ai-toolkit, which has 179 GitHub stars. The repository holds 112 skills in this directory. The repository was last updated on October 7, 2026.
Source: softspark/ai-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.