skills/asmayaseen/building-mcp-servers/SKILL.md
Guides creation of 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). Covers tool design, authentication, Docker deployment, and evaluation creation. NOT when consuming existing MCP servers (use the server directly).
npx skillsauth add aiskillstore/marketplace building-mcp-serversInstall 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.
Create MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. The quality of an MCP server is measured by how well it enables LLMs to accomplish real-world tasks.
Creating a high-quality MCP server involves four main phases:
API Coverage vs. Workflow Tools: Balance comprehensive API endpoint coverage with specialized workflow tools. When uncertain, prioritize comprehensive API coverage.
Tool Naming and Discoverability:
Use consistent prefixes (e.g., github_create_issue, github_list_repos) and action-oriented naming.
Context Management: Design tools that return focused, relevant data. Support filtering/pagination.
Actionable Error Messages: Error messages should guide agents toward solutions with specific suggestions.
Start with the sitemap: https://modelcontextprotocol.io/sitemap.xml
Fetch pages with .md suffix (e.g., https://modelcontextprotocol.io/specification/draft.md).
Key pages: Specification overview, transport mechanisms, tool/resource/prompt definitions.
Recommended stack:
Load framework documentation:
SDK Documentation:
https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/README.mdhttps://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.mdReview the service's API documentation. List endpoints to implement, starting with most common operations.
See language-specific guides:
Create shared utilities:
For each tool:
Input Schema:
Output Schema:
outputSchema where possiblestructuredContent in responsesTool Description:
Annotations:
readOnlyHint, destructiveHint, idempotentHint, openWorldHintReview for: DRY principle, consistent error handling, full type coverage, clear descriptions.
TypeScript:
npm run build
npx @modelcontextprotocol/inspector
Python:
python -m py_compile your_server.py
# Test with MCP Inspector
Create 10 evaluation questions to test LLM effectiveness with your server.
Requirements for each question:
Output Format:
<evaluation>
<qa_pair>
<question>Your question here</question>
<answer>Expected answer</answer>
</qa_pair>
</evaluation>
See Evaluation Guide for complete guidelines.
FastMCP validates Host headers. For Docker, configure:
from mcp.server.fastmcp import FastMCP
from mcp.server.transport_security import TransportSecuritySettings
transport_security = TransportSecuritySettings(
allowed_hosts=[
"127.0.0.1:*", "localhost:*", "[::1]:*",
"mcp-server:*", # Docker container name
"0.0.0.0:*",
],
)
mcp = FastMCP("my_server", transport_security=transport_security)
Add /health endpoint via middleware (see references for full example).
Run: python3 scripts/verify.py
Expected: ✓ building-mcp-servers skill ready
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.