MC

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.zip

Installs 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.
371 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

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

You give it
a requirement to integrate LLMs with local tools and data
You get back
a custom MCP server with standardized tool exposure and resource schemas

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:

  1. System Boundaries & Dependencies: Verify that all required dependencies exist in target package manifests and environment paths.
  2. Runtime Context & Platform Invariants: Confirm target platform constraints (Node.js, Browser, Mobile OS, Edge runtime) before applying APIs.
  3. Execution Guardrails: Identify potential side-effects, state mutations, and unhandled asynchronous exceptions.
  4. Validation & Type Contracts: Validate input data schemas and strict type constraints across all module interfaces.
  5. 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-builder domain or is managed by a different dedicated specialist agent.

🔁 Multi-Pass Execution Protocol

PassPhaseCore ActionAdaptive Depth
Pass 1UnderstandDeconstruct the user's explicit objective, implicit requirements, and platform constraints.Fast / Standard / Deep
Pass 2PlanDecompose task into smallest logical steps; map dependencies, affected files, and tool calls.Standard / Deep
Pass 3ExecuteImplement solution with production-grade craft, zero placeholders, and strict typing.All Modes
Pass 4VerifyRun linters, unit tests, or compiler checks to validate structural correctness.All Modes
Pass 5Attack & FalsifyPerform adversarial search for edge-case failures, counterexamples, race conditions, and traps.Standard / Deep
Pass 6HardenEliminate discovered friction, optimize performance, and harden error boundaries.Standard / Deep
Pass 7Quality GateEnforce 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:

  1. Resources: Read-only data payloads (Logs, local files, database dumps).
  2. Prompts: Reusable injected context scaffolding (e.g., "Summarize this log with strict parameters").
  3. 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.json or db://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_only separate from execute_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

ScenarioRiskProduction Mitigation
Empty or Null InputsUnhandled exception or unexpected rendering collapseEnforce fallback guards, optional chaining, and explicit empty state handlers
Network Timeout / LatencyHanging operations or duplicate side-effectsImplement bounded abort controllers, exponential backoff, and idempotency keys
Concurrency / Race ConditionsStale state overwrite or inconsistent data mutationsUse atomic transactions, mutex locking, or cancel-on-resubmit controls
Invalid Schema / Malformed PayloadDownstream runtime errors or security injectionValidate boundary payloads with Zod/Pydantic schemas prior to execution
Resource / Memory SaturationOOM errors, frame drops, or memory leaksClean 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.

SkillInstallsUpdatedSafetyDifficulty
mcp-builder (this skill)03moNo flagsAdvanced
mcp-builder1365moReviewAdvanced
copilot-sdk75moReviewIntermediate
nodejs-backend-patterns124moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by Harmitx7

View all by Harmitx7 →

i18n-localization

Harmitx7

Internationalization (i18n) and localization mastery. Abstracting hardcoded strings, managing JSON/YAML translation dictionaries, bidirectional routing (RTL support for Arabic/Hebrew), Pluralization algorithms, date/currency formatting, and SSR locale detection in Next.js/React. Use when preparing a

00

code-review-checklist

Harmitx7

Code review guidelines covering code quality, security, and best practices.

00

performance-profiling

Harmitx7

Performance profiling mastery. Core Web Vitals (LCP, CLS, INP), Lighthouse auditing, JavaScript profiling, React rendering optimization, bundle analysis, memory leak detection, database query profiling (EXPLAIN ANALYZE), load testing, and performance budgets. Use when optimizing performance, debuggi

00

web-accessibility-auditor

Harmitx7

Web Accessibility (a11y) mastery. WCAG 2.2 AA standards, semantic HTML, ARIA attributes, keyboard navigation, focus management, screen reader compatibility, color contrast, and dynamic content announcements. Use when building UI components or auditing frontend code for accessibility compliance.

00

data-validation-schemas

Harmitx7

Data validation and schema design mastery. Zod, Yup, Joi, Valibot, and Pydantic schema design, runtime type checking, API boundary validation, form validation patterns, DTO design, schema composition, error message formatting, schema evolution strategies, and coercion rules. Use when validating user

00

plan-writing

Harmitx7

Technical design and implementation planning mastery. Writing structured execution checklists, dependency mapping, establishing rollback protocols, segmenting monolithic tasks, writing ADRs (Architecture Decision Records), and defining verification criteria. Use when transitioning from ideation to c

00

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).

136215

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.

763

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.

1246

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.

535

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.

331

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".

31

Search skills

Search the agent skills registry