skills/team/mcp-server-scaffold/SKILL.md
Custom MCP server creation with FastMCP pattern and testing. Use when building MCP servers to expose tools, resources, or prompts to AI assistants. Do NOT use when the integration is synchronous REST-only; Do NOT use when the tool surface is a single function that does not benefit from the MCP protocol.
npx skillsauth add michaelalber/ai-toolkit mcp-server-scaffoldInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"A good interface is like a good joke: if you have to explain it, it isn't that good." -- adapted from the Unix philosophy
This skill guides the creation of Model Context Protocol (MCP) servers using the Python mcp SDK
and the FastMCP pattern. MCP servers expose tools (actions), resources (data), and
prompts (structured messages) to AI assistants through a standardized, transport-agnostic
protocol. The same handlers run unchanged across stdio, SSE, and streamable HTTP — transport is a
deployment concern, not a design concern.
Non-Negotiable Constraints:
verb_noun; the name is the primary documentation for AI consumers.ctx.error()); never let raw exceptions reach the transport.The full principle table, tool-vs-resource-vs-prompt decision tree, discipline rules,
anti-patterns, and error recovery live in references/conventions.md.
DESIGN Identify each capability the server exposes; classify as tool | resource | prompt
(decision tree in references/conventions.md). Default to @mcp.tool() when unsure.
SCAFFOLD Create the FastMCP server instance, choose transport, set up project structure.
(Server/tool/resource/prompt patterns in references/mcp-protocol-patterns.md.)
IMPLEMENT Write handlers with input validation, structured error handling, and ctx logging.
INSPECT Run `mcp dev server.py`; invoke each tool in the MCP Inspector; verify response
format, schemas, and error cases. (Inspector checklist in mcp-testing-patterns.md.)
TEST Write pytest tests exercising tools end-to-end — one per category: happy path, edge,
error, validation. (Patterns in references/mcp-testing-patterns.md.)
DEPLOY Configure transport (stdio for CLI; SSE/HTTP for networked) and deploy.
Exit criteria: every capability classified and implemented with validated inputs and structured errors; each tool validated in the Inspector; tests pass across the four categories; transport configured for the target deployment.
<mcp-server-state>
step: Design | Scaffold | Implement | Inspect | Test | Deploy
server_name: [name of the MCP server]
transport: stdio | sse | streamable-http
tools_defined: [count]
tools_tested: [count with passing tests]
last_action: [what was just completed]
next_action: [what should happen next]
blockers: [any issues preventing progress]
</mcp-server-state>
references/mcp-protocol-patterns.md.references/mcp-testing-patterns.md.references/conventions.md.| Skill | Relationship |
|-------|-------------|
| rag-pipeline-python | MCP servers are natural interfaces for RAG. Expose retrieval/generation as tools and documents as resources; follow that skill for retrieval quality, this one for the transport/interface layer. |
| ollama-model-workflow | MCP servers can front local Ollama models with a standardized interface. The MCP layer handles transport and schema; the Ollama workflow handles model selection, prompt formatting, and tuning. |
| fastapi-scaffolder | When the same capability also needs a REST surface, build the HTTP API there and keep MCP handlers transport-agnostic so logic is shared, not duplicated. |
development
Interviews the user relentlessly about a plan, decision, or idea — one question at a time, each with a recommended answer. Shared engine behind "grill-me" and "grill-with-docs". Use on any "grill" trigger phrase or to stress-test thinking. Do NOT use to build the plan; it ends at shared understanding, not implementation.
testing
Runs a relentless interview to sharpen a plan or design, capturing the decisions as ADRs and a glossary along the way. Use when the user wants to be grilled AND wants the session to leave durable domain documentation behind. Do NOT use for a throwaway stress-test with no artifacts; use grill-me instead.
tools
OWASP-based security review of Vue/TypeScript front-ends. Detects framework (Vite/Vue CLI/Nuxt), entry points, and data flows; scans the OWASP Top 10 (2025) mapped to Vue client-side risks (raw-HTML XSS via v-html, URL/protocol injection, bundled secrets, insecure token storage, dependency CVEs, missing CSP, open redirects, router guard bypass); emits an exec summary plus graded findings. Use to audit Vue for vulnerabilities. Not for architecture grading (vue-architecture-checklist).
tools
Analyzes legacy Vue codebases and produces actionable modernization plans. Primary migration paths include Options API to Composition API, Vue 2 to Vue 3, Vue CLI to Vite, JavaScript to TypeScript, Vue Test Utils/Karma/Mocha to Vitest + Vue Testing Library, legacy Vuex to Pinia, and removed-in-Vue-3 pattern cleanup (filters, event bus, `$listeners`). Does NOT perform the migration — assesses, quantifies risk, and plans.