mcp-server-design

mcp-server-design is a skill for Claude Code, Codex from basementstudio/xmcp. It costs 35 tokens per session (1,208 once invoked), scanned A, original, MIT.

Guidance for designing MCP servers and their tools. MCP, or Model Context Protocol, is a way for AI agents to use external tools and information.

In plain words
What is it for?
Use it when creating or improving an MCP server, deciding which tools it should expose, and designing tool inputs and outputs that give agents enough information to act.
Why use it?
It helps avoid exposing a confusing collection of small API operations that an agent must piece together. Instead, the tools are shaped around the tasks people actually want completed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

About the project

xmcp is a TypeScript framework for building applications with the Model Context Protocol, a standard for connecting AI models with tools and external context. Developers use it to create MCP-based integrations.

basementstudio/xmcp · 1,326 stars · on GitHub · xmcp.dev

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/basementstudio/xmcp/mcp-server-design
Any agent
npx skills add basementstudio/xmcp --skill mcp-server-design
Clone the repo
git clone --depth 1 https://github.com/basementstudio/xmcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-server-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/basementstudio/xmcp/mcp-server-design.svg)](https://agentmods.dev/skills/basementstudio/xmcp/mcp-server-design)
Your own site
<a href="https://agentmods.dev/skills/basementstudio/xmcp/mcp-server-design"><img src="https://agentmods.dev/badge/skills/basementstudio/xmcp/mcp-server-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,208 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.01208
Opus 5 $0.00017 $0.00604
Sonnet 5 $0.00007 $0.00242
Haiku 4.5 $0.00003 $0.00121

Measured 6d ago against content hash 4f3c13bd4ff9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

mcp-server-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

apps/website/agent-skills/mcp-server-design/SKILL.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MCP Server Design

Overview

This skill provides best practices for designing MCP (Model Context Protocol) servers that work effectively with LLM agents. The key insight: design for agents, not automation. LLMs are human-like thinkers, not API consumers.

Core Philosophy

Design for Agents, Not Automation

Traditional API design optimizes for programmatic access with granular endpoints. MCP tool design should optimize for how LLMs think and reason:

  • LLMs are human-like thinkers: They understand intent, context, and purpose
  • Tools should be tasks, not endpoints: Shape tools around what users want to accomplish
  • Reduce cognitive load: Fewer, more purposeful tools beat many granular ones

The Three Pillars

  1. Give everything ready: Provide complete, actionable information
  2. Reduce effort: Minimize steps needed to accomplish tasks
  3. Reduce paths: Limit decision branches the LLM must navigate

Tool Design Principles

1. Purpose-Built Tools Over Generic Wrappers

Anti-pattern: Wrapping every API endpoint as a tool

// Bad: Generic database tools
// src/tools/run-sql.ts
// src/tools/list-tables.ts
// src/tools/describe-table.ts

Best practice: Design tools around user tasks

// Good: Task-oriented tools
// src/tools/prepare-database-migration.ts
import { z } from "zod";
import type { ToolMetadata } from "xmcp";

export const schema = {
  description: z.string().describe("What database changes are needed"),
};

export const metadata: ToolMetadata = {
  name: "prepare-database-migration",
  description: "Design a database change with safety checks and reviewed migration plan",
};

// src/tools/analyze-slow-queries.ts
// src/tools/create-backup.ts

2. Minimize Tool Count

LLMs struggle with long tool lists. Each additional tool:

  • Increases selection confusion
  • Adds tokens to every request
  • Dilutes the purpose of each tool

Guidelines:

  • Start with 5-10 core tools
  • Add tools only when evals show they're needed
  • Combine related operations when sensible

Read the full file on GitHub · 178 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 178 lines · 35 tokens per session scan A 4f3c13bd4ff9

Subscribe to this mod's changes

mcp-server-design is a skill published in the GitHub repository basementstudio/xmcp (1,326 stars, last pushed 2d ago), licensed MIT. It adds 35 tokens to every session and 1,208 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

general-video

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated…

heygen-com/hyperframes · 92 tokens

implementation-final-review

Perform the repository's risk-tiered independent final review before implementation completion. Use only when explicitly invoked or when repository instructions require it after behavior-impacting implementation work; audit the complete task diff, supported contracts, lifecycle and security boundaries, complexity, and…

openai/openai-agents-python · 58 tokens

captions-overlay

Overlay doctrine for the embedded-captions workflow — the caption MODEL (drop / rail / embed) and the rule that captions are an OVERLAY composited on top of the film, never a reserved bottom band you shift content up to avoid. Load when adding captions/subtitles to a talking-head or launch video, when deciding whether…

heygen-com/hyperframes · 136 tokens

technical-writing

Write, edit, review, or audit user-facing documentation for the eve repository. Use for changes under docs/, documentation tied to eve APIs or CLI behavior, docs work based on Slack or support feedback, and requests to make eve docs clearer, more natural, or less AI-patterned while verifying claims against current…

vercel/eve · 78 tokens

om-auto-sec-report-pr

Paranoid OWASP-oriented security analysis for a SINGLE unit of work — one PR, one spec under .ai/specs/, or one branch diff. Hunts non-obvious attack vectors beyond OWASP Top 10, flags same-pattern hotspots elsewhere, and emits "Next steps — go deeper" follow-ups. Writes markdown + HTML under .ai/analysis/; runs…

open-mercato/open-mercato · 93 tokens

om-pre-implement-spec

Analyze a spec before implementation: BC audit, risk assessment, gap analysis. Produces a readiness report with BC violations, missing sections, and suggested improvements. Triggers on "analyze spec", "pre-implement", "spec readiness", "BC analysis", "spec gap analysis".

open-mercato/open-mercato · 63 tokens