mcp-builder

jezweb/claude-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/jezweb/claude-skills --skill mcp-builder
0 commentsdiscussion
summary

Build and deploy MCP servers in Python using FastMCP with tools, resources, and prompts.

  • Scaffolds a working Python MCP server from a description; supports tools (callable functions), resources (readable data), and prompts (reusable templates)
  • Includes local testing modes (direct run, dev mode with auto-reload, HTTP transport) and MCP Inspector integration
  • Deploys to FastMCP Cloud, Docker, or Cloudflare Workers; pre-deploy checklist catches common issues like missing module-level ser
skill.md

MCP Builder

Build a working MCP server from a description of the tools you need. Produces a deployable Python server using FastMCP.

Workflow

Step 1: Define What to Expose

Ask what the server needs to provide:

  • Tools -- Functions Claude can call (API wrappers, calculations, file operations)
  • Resources -- Data Claude can read (database records, config, documents)
  • Prompts -- Reusable prompt templates with parameters

A brief like "MCP server for querying our customer database" is enough.

Step 2: Scaffold the Server

pip install fastmcp

Create the server file. The server instance MUST be at module level:

from fastmcp import FastMCP

# MUST be at module level for FastMCP Cloud
mcp = FastMCP("My Server")

@mcp.tool()
async def search_customers(query: str) -> str:
    """Search customers by name or email."""
    # Implementation here
    return f"Found customers matching: {query}"

@mcp.resource("customers://{customer_id}")
async def get_customer(customer_id: str) -> str:
    """Get customer details by ID."""
    return f"Customer {customer_id} details"

if __name__ == "__main__":
    mcp.run()

Step 3: Add Companion CLI Scripts (Optional)

For Claude Code terminal use, add scripts alongside the MCP server:

my-mcp-server/
├── src/index.ts          # MCP server (for Claude.ai)
├── scripts/
│   ├── search.ts         # CLI version of search tool
│   └── _shared.ts        # Shared auth/config
├── SCRIPTS.md            # Documents available scripts
└── package.json

CLI scripts provide file I/O, batch processing, and richer output that MCP can't. See assets/SCRIPTS-TEMPLATE.md and assets/script-template.ts for TypeScript templates.

Step 4: Test Locally

Quick test -- run directly:

python server.py

Dev mode with inspector UI (recommended):

fastmcp dev server.py
# Opens inspector at http://localhost:5173
# Hot reload, detailed logging, tool/resource inspection

HTTP mode for remote clients:

python server.py --transport http --port 8000

Automated test script using FastMCP Client:

import asyncio
from fastmcp import Client

async def test_server(server_path):
    async with Client(server_path) as client:
        # List everything
        tools = await client.list_tools()
        resources = await client.list_resources()
        prompts = await client.list_prompts()

        print(f"Tools: {[t.name for t in tools]}")
        print(f"Resources: {[r.uri for r in resources]}")
        print(f"Prompts: {[p.name for p in prompts]}")

        # Call first tool
        if tools:
            result = await client.call_tool(tools[0].name, {})
            print(f"Tool result: {result}")

        # Read first resource
        if resources:
            data = await client.read_resource(resources[0].uri)
            print(f"Resource data: {data}")

asyncio.run(test_server("server.py"))

Step 5: Pre-Deploy Checklist

Run these checks before deploying. All required checks must pass.

Required (will cause deploy failure):

  1. Server file exists
  2. Python syntax valid: python3 -m py_compile server.py
  3. Module-level server object (not inside a function):
    grep -q "^mcp = FastMCP\|^server = FastMCP\|^app = FastMCP" server.py
    
  4. requirements.txt exists with PyPI packages only (no git+, -e, .whl, .tar.gz)
  5. No hardcoded secrets (check for api_key = "..." patterns excluding os.getenv/os.environ)

Advisory (warnings):

  1. fastmcp listed in requirements.txt
  2. .gitignore includes .env
  3. No circular imports
  4. Git repository initialised with remote
  5. Server can load: timeout 5 fastmcp inspect server.py

Step 6: Deploy

FastMCP Cloud (simplest):

git add . && git commit -m "Ready for deployment"
git push -u origin main
# Visit https://fastmcp.cloud, connect repo, add env vars, deploy
# URL: https://your-project.fastmcp.app/mcp

Cloud requirements:

  • Module-level server object named mcp, server, or app
  • PyPI dependencies only in requirements.txt
  • Public GitHub repository
  • Environment variables for secrets (no hardcoded values)
  • Auto-deploys on push to main, PR preview deployments

Docker (self-hosted):

FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["python", "server.py", "--transport", "http", "--port", "8000"]

Cloudflare Workers (edge): See the cloudflare-worker-builder skill for Workers-based MCP servers.


Critical Patterns

Module-Level Server Instance

FastMCP Cloud requires the server instance at module level:

# CORRECT
mcp = FastMCP("My Server")

@mcp.tool()
def my_tool(): ...

# WRONG -- Cloud can't find the server
def create_server():
    mcp = FastMCP("My Server")
    return mcp

# FIX for factory pattern -- export at module level
def create_server() -> FastMCP:
    mcp = FastMCP("server")
    return mcp
mcp = create_server()

Type Annotations Required

FastMCP uses type annotations to generate tool schemas:

@mcp.tool()
async def search(
    query: str,           # Required parameter
    limit: int = 10,      # Optional with default
    tags: list[str] = []  # Complex types supported
) -> str:
    """Docstring becomes the tool description."""
    ...

Error Handling

Return errors as strings, don't raise exceptions:

@mcp.tool()
async def get_data(id: str) -> str:
    try:
        result = await fetch_data(id)
        return json.dumps(result)
    except NotFoundError:
        return f"Error: No data found for ID {id}"

Cloud-Ready Server Pattern

import os
from fastmcp import FastMCP

mcp = FastMCP("production-server")
how to use mcp-builder

How to use mcp-builder on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add mcp-builder
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/jezweb/claude-skills --skill mcp-builder

The skills CLI fetches mcp-builder from GitHub repository jezweb/claude-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/mcp-builder

Reload or restart Cursor to activate mcp-builder. Access the skill through slash commands (e.g., /mcp-builder) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.644 reviews
  • Ira Desai· Dec 20, 2024

    mcp-builder reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Charlotte Sharma· Dec 12, 2024

    Registry listing for mcp-builder matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Ira Khanna· Nov 11, 2024

    I recommend mcp-builder for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Tariq Tandon· Nov 7, 2024

    We added mcp-builder from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Henry Verma· Nov 3, 2024

    Useful defaults in mcp-builder — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Hiroshi Khan· Oct 26, 2024

    mcp-builder fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Henry Perez· Oct 22, 2024

    I recommend mcp-builder for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Chen Martin· Oct 2, 2024

    Useful defaults in mcp-builder — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Ishan Taylor· Sep 17, 2024

    mcp-builder has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Zara White· Sep 13, 2024

    Keeps context tight: mcp-builder is the kind of skill you can hand to a new teammate without a long onboarding doc.

showing 1-10 of 44

1 / 5