Skip to content
MCP Builder cover
Meta / SkillsFree · MIT

MCP Builder

Scaffold an MCP server with the patterns generators miss — auth, pagination, real errors, least-privilege — and ship it with a test.

v1.0.0 · ~553 tokens · ⬇ 0 · Updated July 6, 2026

What it does

Builds a usable, secure MCP server: strict typed tool schemas with trigger-rich descriptions, small structured outputs, and the patterns generic scaffolds skip (env-only credentials never echoed, limit/cursor pagination, actionable errors, retries/backoff, idempotent writes). Least-privilege security checklist, and a minimal test calling each tool with valid + invalid input.

Example uses

Expose an API to an agent

You want an agent to query your internal API without dumping ten thousand rows of raw JSON into its context.

Build an MCP server in TypeScript that exposes our internal ticketing API with three tools: search_tickets, get_ticket, and create_ticket. API key comes from an env var and must never appear in output or errors. Search paginates with limit and cursor (default 20). Errors return actionable messages, not stack traces. Ship it with a test that calls each tool with one valid and one invalid input.

Add a database read tool

An agent needs to look things up in Postgres and you refuse to expose arbitrary SQL as a tool input.

Add an MCP tool that lets an agent look up orders in our Postgres database by customer email or order ID. Read-only and least privilege: strict input validation, results capped at 50 rows, and trim the fields the agent doesn't need. No raw SQL accepted from the model under any circumstances.

Harden a scaffolded MCP server

A generated MCP server works in the demo but hardcodes its key, returns full upstream payloads, and crashes on rate limits.

Review and harden this MCP server scaffold: it currently hardcodes the API key, returns the entire upstream JSON response, and crashes on HTTP 429. Move credentials to env with a clear failure when unconfigured, add limit/cursor pagination, add backoff that surfaces the rate limit to the agent, and make the write tools idempotent — or state plainly that they aren't.

Install

# 1. Create the skill folder in your Claude setup
mkdir -p ~/.claude/skills/mcp-builder

# 2. Download SKILL.md into it (or move the file you just downloaded)
#    → ~/.claude/skills/mcp-builder/SKILL.md

# 3. Claude Code auto-discovers it on next launch.

Inside the skill

SKILL.md
---
name: mcp-builder
description: Scaffold a correct, secure MCP (Model Context Protocol) server with the patterns that generic generators miss — auth, pagination, errors, and a test. Use when building an MCP server/tool, exposing an API to an agent, or "make an MCP server for X", "add an MCP tool".
---

# MCP Builder

Build an MCP server an agent can actually use safely: typed tools, real error handling,
credential hygiene, and a test that proves it works. Skip the toy scaffold.

## Tool design (per tool)

- **Name + description**: the description is the agent's only guide — say what it does AND
  when to use it, concretely. Vague descriptions = wrong tool calls.
- **Input schema**: strict JSON Schema, required vs optional explicit, enums over free
  strings where possible, sane bounds (limits, max lengths). Validate on entry.
- **Output**: structured and predictable. Return typed data, not a giant string the model
  must parse. Keep payloads small — trim fields the agent doesn't need.

## Patterns generic generators miss

- **Auth / credentials**: read from env, never hardcode; never echo the key back in output
  or errors. Fail clearly if unconfigured.
- **Pagination**: expose `limit`/`cursor`, don't dump 10k rows into context. Default small.
- **Errors**: catch and return a clear, actionable message ("rate limited, retry after N"),
  not a raw stack trace. Distinguish user-fixable vs server errors.
- **Rate limits / retries**: backoff on the upstream API; surface the limit to the agent.
- **Idempotency**: for write tools, make retries safe or say they aren't.

## Security checklist

- Least privilege: only the tools the job needs.
- No arbitrary shell/eval exposed as a tool. No user-string → command.
- Validate and bound every input before it hits the upstream/DB.
- Secrets only via env; `.env` git-ignored; `.env.example` documents the names.

## Ship with a test

A minimal test that starts the server, calls each tool with a valid + an invalid input,
and asserts the shapes. A tool with no test is a tool you haven't run.

## Output

The server scaffold (tools + schemas + handlers), env setup, and the test file.
State the language/SDK and any upstream API assumptions.

Changelog

  • v1.0.02026-07-03Initial clean-room write.

Frequently asked questions

Is MCP Builder free?

Yes. MCP Builder is free to download and MIT-licensed.

Where do I install MCP Builder?

Place the SKILL.md file in ~/.claude/skills/mcp-builder/ and Claude Code auto-discovers it on next launch.

How many tokens does MCP Builder use?

About 553 tokens — it is designed to be token-lean.

Anthony M. — Founder & Lead Reviewer
Anthony M.Verified Builder

We're developers and SaaS builders who use these tools daily in production. Every review comes from hands-on experience building real products — DealPropFirm, ThePlanetIndicator, PropFirmsCodes, and many more. We don't just review tools — we build and ship with them every day.

Written and tested by developers who build with these tools daily.