agentleFS
yeaight7yeaight7/agent-powerups/skills/mcp-server-builder/SKILL.md

mcp-server-builder

Skill6 starsChanged 4 months agoApache-2.0View on GitHub

Design high-quality MCP servers around workflows, narrow schemas, context-aware outputs, and actionable errors. Use when building or reviewing MCP tools for real agent tasks.

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use agent-designer, env-secrets-manager and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Arnav-0Skill

    agent-designer

    Use when the user asks to design multi-agent systems, create agent architectures, define agent communication patterns, or build autonomous agent workflows.

    Also in 3 projects that use this

  • Arnav-0Skill

    env-secrets-manager

    Env & Secrets Manager

    Also in 3 projects that use this

  • mar-antayaSkill

    ci-cd-pipeline-builder

    CI/CD Pipeline Builder

    Also in 3 projects that use this

  • JeffallanSkill

    rag-architect

    Designs and implements production-grade RAG systems by chunking documents, generating embeddings, configuring vector stores, building hybrid search pipelines, applying reranking, and evaluating retrieval quality. Use when building RAG systems, vector databases, or knowledge-grounded AI applications requiring semantic search, document retrieval, context augmentation, similarity search, or embedding-based indexing.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when designing or implementing an MCP server.

    line 8
  2. Distinctive:

    Keep input schemas narrow and typed — reject unknown fields.

    line 20
  3. Distinctive:

    Prefer human-meaningful identifiers over opaque IDs when both are available.

    line 23
  4. Distinctive:

    Default response fits in ~500 tokens for list operations, ~1500 for detail operations.

    line 44
  5. Very specific:

    Add limit, page, or summary parameters for large result sets.

    line 45
  6. Distinctive:

    Every error should tell the agent its next valid action.

    line 54
  7. Distinctive:

    Write representative task scenarios (not unit tests for individual tools).

    line 65
  8. Distinctive:

    Check whether an agent can complete the full workflow using only the exposed tools.

    line 66
  9. Distinctive:

    Use the Python and Node references only for the stack you are actually shipping.

    line 86
  10. Distinctive:

    Use them as optional helpers, not mandatory runtime requirements.

    line 93

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MCP Server Builder

Use this skill when designing or implementing an MCP server.

When to Use

  • Building a new MCP server from scratch.
  • Refactoring a weak or over-thin MCP tool surface.
  • Reviewing whether a server exposes the right workflows.
  • Designing evaluation cases for MCP usability.

Core Principles

  • Build workflow tools, not thin endpoint wrappers — one tool should complete a meaningful agent task, not expose a single API method.
  • Keep input schemas narrow and typed — reject unknown fields; use enums over free strings where possible.
  • Return high-signal, size-bounded outputs — default to concise; add detail or verbose flags when larger payloads are occasionally useful.
  • Make error messages corrective — tell the agent what to do next, not just what went wrong.
  • Prefer human-meaningful identifiers over opaque IDs when both are available.
  • Design evaluation cases before declaring the server "done".

Workflow

1. Map the workflow

  • Identify the real tasks an agent must complete, not the underlying API surface.
  • Merge low-level steps into meaningful operations (e.g., one create_and_publish tool instead of separate create, validate, publish).

2. Design the tool surface

tool name:    stable, verb-noun, describes the workflow step
input schema: typed, narrow, required fields only + optional detail flags
output shape: consistent structure across all tools in the server
failure modes: named error codes + correction hint

3. Design for context limits

  • Default response fits in ~500 tokens for list operations, ~1500 for detail operations.
  • Add limit, page, or summary parameters for large result sets.
  • Truncate deterministically (e.g., top N by recency) — never truncate randomly.

4. Design corrective errors

Bad error: "Error: 404 Not Found"

Good error: "Resource 'project-123' not found. Use list_projects to see available project IDs."

Every error should tell the agent its next valid action.

5. Implement shared infrastructure first

  • Auth handling and token refresh.
  • Retry logic with exponential backoff and rate-limit awareness.
  • Pagination helpers.
  • Output formatting helpers (consistent truncation, redaction of secrets).

6. Evaluate before shipping

  • Write representative task scenarios (not unit tests for individual tools).
  • Check whether an agent can complete the full workflow using only the exposed tools.
  • Redesign weak tools before adding more tools — more tools is not always better.

Server Readiness Checklist

  • Every tool completes a meaningful workflow step.
  • All inputs are typed and schema-validated.
  • Output size is bounded by default.
  • All error messages include a correction hint.
  • Auth and retry are handled in shared infrastructure.
  • At least one end-to-end task scenario has been tested.
  • No secrets appear in tool outputs or error messages.

Local References

  • reference/mcp_best_practices.md
  • reference/python_mcp_server.md
  • reference/node_mcp_server.md
  • reference/evaluation.md

Use the Python and Node references only for the stack you are actually shipping.

Bundled Scripts

  • scripts/evaluation.py — evaluation scaffolding
  • scripts/connections.py — connection-oriented examples

Use them as optional helpers, not mandatory runtime requirements.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.