mcp-builder
Assists in architecting and implementing standardized MCP servers for AI tool integration.
Install
mkdir -p .claude/skills/mcp-builder-harmitx7 && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15599" && unzip -o skill.zip -d .claude/skills/mcp-builder-harmitx7 && rm skill.zipInstalls to .claude/skills/mcp-builder-harmitx7
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Model Context Protocol (MCP) server integration mastery. Building custom MCP servers, standardizing tool exposes, managing standardized communication between large language models and localized datasets, securing boundary contexts, and architecting resource schemas. Use when modifying, extending, or building custom toolsets for AI platforms relying on the MCP standard.Key capabilities
- →Build custom MCP servers
- →Standardize tool exposure for LLMs
- →Manage communication between LLMs and datasets
- →Secure boundary contexts
- →Architect resource schemas
How it works
This skill guides the building of custom Model Context Protocol (MCP) servers, which standardize how AI agents fetch local data and execute tools. It defines how to expose resources, prompts, and tools, emphasizing rigorous parameter boundaries and explicit descriptions.
Inputs & outputs
When to use mcp-builder
- →Build custom MCP servers
- →Standardize tool exposure
- →Manage AI context boundaries
- →Architect resource schemas
About this skill
MCP Builder — Context Protocol Mastery
Mandatory Pre-Flight Context Inspection
Before reading, generating, or refactoring code in the mcp-builder domain, inspect these 5 critical parameters:
- System Boundaries & Dependencies: Verify that all required dependencies exist in target package manifests and environment paths.
- Runtime Context & Platform Invariants: Confirm target platform constraints (Node.js, Browser, Mobile OS, Edge runtime) before applying APIs.
- Execution Guardrails: Identify potential side-effects, state mutations, and unhandled asynchronous exceptions.
- Validation & Type Contracts: Validate input data schemas and strict type constraints across all module interfaces.
- Observability & Proof of Execution: Ensure execution produces tangible verification signals (terminal output, tests, metrics).
Activation Boundaries
- Activate when: Use when executing, coordinating, planning, or reviewing mcp builder agent workflows, cognitive loops, and architecture standards.
- DO NOT activate when: The task falls outside the
mcp-builderdomain or is managed by a different dedicated specialist agent.
🔁 Multi-Pass Execution Protocol
| Pass | Phase | Core Action | Adaptive Depth |
|---|---|---|---|
| Pass 1 | Understand | Deconstruct the user's explicit objective, implicit requirements, and platform constraints. | Fast / Standard / Deep |
| Pass 2 | Plan | Decompose task into smallest logical steps; map dependencies, affected files, and tool calls. | Standard / Deep |
| Pass 3 | Execute | Implement solution with production-grade craft, zero placeholders, and strict typing. | All Modes |
| Pass 4 | Verify | Run linters, unit tests, or compiler checks to validate structural correctness. | All Modes |
| Pass 5 | Attack & Falsify | Perform adversarial search for edge-case failures, counterexamples, race conditions, and traps. | Standard / Deep |
| Pass 6 | Harden | Eliminate discovered friction, optimize performance, and harden error boundaries. | Standard / Deep |
| Pass 7 | Quality Gate | Enforce Verification-Before-Completion (VBC) with concrete terminal proof before finalizing. | All Modes |
🛠️ Technical Architecture & Reference Recipes
Hallucination Traps (Read First)
- ❌ Exposing tools without input validation schemas -> ✅ Every MCP tool MUST have JSON Schema for parameters; the protocol requires it
- ❌ Returning unstructured strings from tool calls -> ✅ Return structured JSON that the LLM can reliably parse and act on
- ❌ Not handling tool call timeouts -> ✅ Always set execution timeouts; hanging tools block the entire LLM conversation loop
1. The Anatomy of an MCP Server
The Model Context Protocol (MCP) standardizes how AI agents fetch local data and execute tools. A robust MCP server exposes exactly 3 primary concepts:
- Resources: Read-only data payloads (Logs, local files, database dumps).
- Prompts: Reusable injected context scaffolding (e.g., "Summarize this log with strict parameters").
- Tools: Actionable executed capabilities (e.g., "Run Postgres Query", "Restart Server").
// Standardize exposing a Tool securely via an MCP Server Wrapper
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { z } from 'zod';
const server = new McpServer({
name: 'internal-database-auditor',
version: '1.0.0',
});
// Defining a rigorous tool parameter boundary
server.tool(
'query_production_database',
'Executes a read-only sanitized query against the production analytical replica.',
{
table: z
.enum(['users', 'transactions', 'audit_logs'])
.describe('The specific table to analyze'),
limit: z.number().max(100).default(10).describe('Maximum row returns to prevent context bloat'),
},
async ({ table, limit }) => {
// Execution logic
const data = await secureDatabaseClient.query(`SELECT * FROM ${table} LIMIT ${limit}`);
return {
content: [{ type: 'text', text: JSON.stringify(data) }],
};
},
);
2. Resource Management vs Tool Management
Do not use a Tool to read static data. Do not use a Resource to invoke remote actions.
- Resources (URI based): Act identically to local files. Exposed explicitly so the AI context manager can read them before invoking tools. Use for things like
file:///app/config.jsonordb://schema/users. - Tools: Use exclusively when parameterized execution is required dynamically. Tools MUST be accompanied by extremely literal, explicit descriptions, because the LLM uses the description text to map Intent to the Tool execution.
3. Structuring Tool Descriptions (The LLM Gateway)
The LLM decides to fire your tool based entirely on the Description schema. If your description is vague, the LLM will hallucinate executions unpredictably.
// ❌ VAGUE (The LLM will guess when to use this, often incorrectly)
description: 'Changes the system status.';
// ✅ DETERMINISTIC (The LLM knows the exact boundaries and consequences)
description: "Transitions the payment processing gateway between 'ACTIVE' and 'MAINTENANCE' modes. Use this ONLY after verifying traffic logs to halt impending queue flooding. Requires Admin clearance.";
4. MCP Security Boundaries
An MCP Server gives an external AI execution capability over your shell or database.
- Never Expose Raw Shells Natively: Unless deliberately building a high-trust local desktop agent. Expose mapped commands (
execute_npm_build) instead of raw terminals (bash_command). - Enforce Read-Only Defaults: If creating a database tool, create
query_select_onlyseparate fromexecute_mutation. Give the AI read-only access. - Context Size Truncation: If a tool queries a 5GB text log, the AI context window will instantly overflow and crash the session. The MCP logic MUST forcibly truncate outputs before returning.
🚨 Edge-Case & Failure Mode Matrix
| Scenario | Risk | Production Mitigation |
|---|---|---|
| Empty or Null Inputs | Unhandled exception or unexpected rendering collapse | Enforce fallback guards, optional chaining, and explicit empty state handlers |
| Network Timeout / Latency | Hanging operations or duplicate side-effects | Implement bounded abort controllers, exponential backoff, and idempotency keys |
| Concurrency / Race Conditions | Stale state overwrite or inconsistent data mutations | Use atomic transactions, mutex locking, or cancel-on-resubmit controls |
| Invalid Schema / Malformed Payload | Downstream runtime errors or security injection | Validate boundary payloads with Zod/Pydantic schemas prior to execution |
| Resource / Memory Saturation | OOM errors, frame drops, or memory leaks | Clean up listeners, cancel active timers, and enforce pagination/virtualization |
🏛️ Tribunal Verification & Guardrails
Active Reviewers: orchestrator · agent-organizer · logic-reviewer
Slash Command: /review or /tribunal-full
🔬 Evidence Standard (Tri-State Verification)
Every finding, audit statement, or completion claim must classify its factual certainty:
[OBSERVED]: Directly confirmed in the codebase or verified via executed terminal command.[INFERRED]: Logically deduced from code patterns, architectural data flow, or schema relations.[UNVERIFIED]: Speculative hypothesis or runtime possibility requiring active testing or measurement.
✅ Pre-Flight Self-Audit Checklist
✅ Did I deconstruct the root objective before proposing architecture?
✅ Did I identify dependencies, bottlenecks, and parallelizable sub-tasks?
✅ Did I avoid over-engineering and select the simplest effective pattern?
✅ Did I verify assumptions with concrete file reads instead of speculation?
✅ Did I establish measurable verification criteria before completion?
🛑 Verification-Before-Completion (VBC) Protocol
CRITICAL: You must follow a strict "evidence-based closeout" state machine.
- ❌ Forbidden: Declaring a task complete because the output "looks correct."
- ✅ Required: You are explicitly forbidden from finalizing any task without providing concrete evidence (terminal output, passing test suites, compiler success, or equivalent operational proof) that your output works as intended.
When not to use it
- →The task involves exposing tools without input validation schemas
- →The task involves returning unstructured strings from tool calls
- →The task does not handle tool call timeouts
Limitations
- →Every MCP tool MUST have JSON Schema for parameters
- →Return structured JSON that the LLM can reliably parse and act on
- →Always set execution timeouts; hanging tools block the entire LLM conversation loop
How it compares
This skill provides a structured approach to building secure and reliable MCP servers with explicit tool descriptions and input validation, preventing common LLM hallucination issues compared to ad-hoc tool exposure.
Compared to similar skills
mcp-builder side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| mcp-builder (this skill) | 0 | 3mo | No flags | Advanced |
| mcp-builder | 136 | 5mo | Review | Advanced |
| copilot-sdk | 7 | 5mo | Review | Intermediate |
| nodejs-backend-patterns | 12 | 4mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by Harmitx7
View all by Harmitx7 →You might also like
mcp-builder
anthropics
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).
copilot-sdk
github
Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.
nodejs-backend-patterns
wshobson
Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.
chatgpt-app-builder
mcp-use
Build ChatGPT apps with interactive widgets using mcp-use and OpenAI Apps SDK. Use when creating ChatGPT apps, building MCP servers with widgets, defining React widgets, working with Apps SDK, or when user mentions ChatGPT widgets, mcp-use widgets, or Apps SDK development.
create-mcp-app
modelcontextprotocol
This skill should be used when the user asks to "create an MCP App", "add a UI to an MCP tool", "build an interactive MCP View", "scaffold an MCP App", or needs guidance on MCP Apps SDK patterns, UI-resource registration, MCP App lifecycle, or host integration. Provides comprehensive guidance for building MCP Apps with interactive UIs.
retellai-hello-world
jeremylongshore
Create a minimal working Retell AI example. Use when starting a new Retell AI integration, testing your setup, or learning basic Retell AI API patterns. Trigger with phrases like "retellai hello world", "retellai example", "retellai quick start", "simple retellai code".