mcp-builder

Guides the design, implementation, testing, and deployment of Model Context Protocol servers.

Updated Jun 11, 2026
One-click install
npx skills add https://github.com/marcocpt/trae_skills --skill mcp-builder-marcocpt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-builder
Source: https://github.com/marcocpt/trae_skills/tree/main/mcp-builder
Command: npx skills add https://github.com/marcocpt/trae_skills --skill mcp-builder-marcocpt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building an MCP server that AI assistants can reliably call requires many decisions—tool naming, schema design, error handling, testing, and deployment—and mistakes in any of them cause tools to be ignored, misused, or crash in production. ## Core Features & Use Cases - Protocol Design Guidance: Clarifies when to use Tools, Resources, or Prompts, with naming, parameter, and description conventions that help AI assistants select tools correctly. - Implementation Patterns: Provides TypeScript and Python project structures, Zod/Pydantic validation, error handling with isError flags, and resource lifecycle management. - Testing & Deployment: Covers unit tests, integration tests via InMemoryTransport, MCP Inspector debugging, and npm/pip/Docker distribution. - Use Case: You want to expose your company's internal API to Claude. Follow the checklist to design snake_case tools with clear descriptions, validate inputs with Zod, test with MCP Inspector, and publish an npm package users configure in their MCP client. ## Quick Start Help me build an MCP server that exposes my service's API as tools for AI assistants, following best practices for design, testing, and deployment.

Frequently Asked Questions about mcp-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an MCP server in TypeScript?

Use the @modelcontextprotocol/sdk package with Zod for schema validation. Structure the project with an index.ts entry point that registers tools and resources, then connect via StdioServerTransport after registering all handlers.

When should I use MCP Tools vs Resources vs Prompts?

Use Tools for actions with side effects like creating or deleting data, Resources for read-only data identified by URIs, and Prompts for predefined interaction templates. The rule is: execute operations with Tools, read data with Resources, guide interactions with Prompts.

How do I test an MCP server before deployment?

Write unit tests for business logic separated from MCP registration, then run integration tests using InMemoryTransport with the SDK Client. Use MCP Inspector via npx @modelcontextprotocol/inspector for interactive manual verification.

Why is my MCP tool not being called by the AI assistant?

The AI selects tools based on names and descriptions, so vague naming causes missed calls. Use snake_case verb-first names and descriptions that state the purpose, return content, and limits, and add .describe() to every parameter.

Why does console.log break my MCP server?

MCP servers communicate over stdio, so console.log corrupts the protocol stream. Use console.error for debug output or the SDK's sendLoggingMessage method for structured logging instead.

How do I handle errors in MCP tool handlers?

Wrap all external calls in try/catch and return content with isError set to true plus an actionable message. Distinguish error types like invalid parameters, missing permissions, nonexistent resources, and unavailable services so the AI can respond appropriately.