What This Skill Does
Guide for building high-quality MCP (Model Context Protocol) servers that let LLMs interact with external services through well-defined tools. Covers Python (FastMCP), TypeScript (MCP SDK), and C#/.NET implementations.
When to Use It
- Building an MCP server to expose API functionality to AI agents
- Integrating external services (databases, APIs, file systems) via MCP
- Designing tool schemas for LLM consumption
- Setting up MCP transport (stdio, HTTP, SSE)
Key Concepts
Tools
Functions that LLMs can invoke with structured parameters and responses. Each tool has a name, description, input schema, and handler.Resources
Read-only data sources that provide context to the LLM without requiring function calls.Prompts
Pre-built prompt templates that guide LLM behavior for specific tasks.Implementation Options
- Python (FastMCP) — Fastest to build, decorator-based API
- TypeScript (MCP SDK) — Native Node.js, good for web-adjacent services
- C#/.NET (Microsoft SDK) — Enterprise environments, Azure integration
Best Practices
- Write clear tool descriptions — the LLM uses them to decide when to call each tool
- Keep tool inputs simple and well-typed
- Return structured data, not free text
- Handle errors gracefully with meaningful messages
- Test tools independently before exposing via MCP