mcp-builder
Guide for creating 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).
What this skill does
# MCP Server Development Guide ## Overview To create high-quality MCP (Model Context Protocol) servers that enable LLMs to effectively interact with external services, use this skill. An MCP server provides tools that allow LLMs to access external services and APIs. ## High-Level Workflow Creating a high-quality MCP server involves four main phases: ### Phase 1: Deep Research and Planning #### Agent-Centric Design Principles **Build for Workflows, Not Just API Endpoints:** - Don't simply wrap existing API endpoints - build thoughtful, high-impact workflow tools - Consolidate related operations (e.g., `schedule_event` that both checks availability and creates event) - Focus on tools that enable complete tasks, not just individual API calls **Optimize for Limited Context:** - Agents have constrained context windows - make every token count - Return high-signal information, not exhaustive data dumps - Provide "concise" vs "detailed" response format options - Default to human-readable identifiers over technical codes **Design Actionable Error Messages:** - Error messages should guide agents toward correct usage patterns - Suggest specific next steps: "Try using filter='active_only' to reduce results" - Make errors educational, not just diagnostic #### Study MCP Protocol Documentation **Fetch the latest MCP protocol documentation:** Use WebFetch to load: `https://modelcontextprotocol.io/llms-full.txt` **For Python implementations:** - Python SDK: `https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.md` **For Node/TypeScript implementations:** - TypeScript SDK: `https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/README.md` ### Phase 2: Implementation #### Set Up Project Structure **For Python:** - Create a single `.py` file or organize into modules if complex - Use the MCP Python SDK for tool registration - Define Pydantic models for input validation **For Node/TypeScript:** - Create proper project structure - Set up `package.json` and `tsconfig.json` - Use MCP TypeScript SDK - Define Zod schemas for input validation #### Implement Core Infrastructure First Create shared utilities before implementing tools: - API request helper functions - Error handling utilities - Response formatting functions (JSON and Markdown) - Pagination helpers - Authentication/token management #### Implement Tools Systematically For each tool: **Define Input Schema:** - Use Pydantic (Python) or Zod (TypeScript) for validation - Include proper constraints (min/max length, regex patterns) - Provide clear, descriptive field descriptions **Write Comprehensive Docstrings:** - One-line summary of what the tool does - Detailed explanation of purpose and functionality - Explicit parameter types with examples - Complete return type schema - Usage examples **Add Tool Annotations:** - `readOnlyHint`: true (for read-only operations) - `destructiveHint`: false (for non-destructive operations) - `idempotentHint`: true (if repeated calls have same effect) - `openWorldHint`: true (if interacting with external systems) ### Phase 3: Review and Refine #### Code Quality Review Review the code for: - **DRY Principle**: No duplicated code between tools - **Composability**: Shared logic extracted into functions - **Consistency**: Similar operations return similar formats - **Error Handling**: All external calls have error handling - **Type Safety**: Full type coverage - **Documentation**: Every tool has comprehensive docstrings ### Phase 4: Create Evaluations Create comprehensive evaluations to test MCP server effectiveness. Each evaluation question must be: - **Independent**: Not dependent on other questions - **Read-only**: Only non-destructive operations required - **Complex**: Requiring multiple tool calls and deep exploration - **Realistic**: Based on real use cases - **Verifiable**: Single, clear answer that can be verified ## Best Practices Summary 1. Build for workflows, not just API endpoints 2. Optimize for limited context windows 3. Design actionable error messages 4. Follow natural task subdivisions 5. Use evaluation-driven development 6. Study framework documentation thoroughly 7. Implement core infrastructure first 8. Add proper tool annotations 9. Test with realistic scenarios
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.