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.
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.
npx skills add basementstudio/xmcp --skill mcp-server-designgit clone --depth 1 https://github.com/basementstudio/xmcpWrote 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.
[](https://agentmods.dev/skills/basementstudio/xmcp/mcp-server-design)<a href="https://agentmods.dev/skills/basementstudio/xmcp/mcp-server-design"><img src="https://agentmods.dev/badge/skills/basementstudio/xmcp/mcp-server-design/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00035 | $0.01208 |
| Opus 5.5 | $0.00014 | $0.00483 |
| Sonnet 5.5 | $0.00007 | $0.00242 |
| Haiku 4.5 | $0.00003 | $0.00121 |
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 1mo 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.
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
- Give everything ready: Provide complete, actionable information
- Reduce effort: Minimize steps needed to accomplish tasks
- 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
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.
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.
- 1mo ago First seen · 178 lines · 35 tokens per session scan A 4f3c13bd4ff9
mcp-server-design is a skill published in the GitHub repository basementstudio/xmcp (1,342 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 1,208 once invoked, about $0.0001 per session on Opus 5.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.
Other skills, from other repositories
lookup-agent-run
Find an eve Agent Run from a run ID, project, request reference, or approximate time using authorized evidence available to the consumer.
dashboard-chat-best-practices
Apply dashboard-grade chat UX patterns in the Eve chat template. Use when changing Next.js Cache Components/PPR behavior, static shell layout, Suspense bootstrap boundaries, theme hydration, auth display hydration, signed-in/signed-out static shell behavior, optimistic messages, streaming row identity…
eve-chat-template-eve
Work safely on Eve-specific internals in the Eve chat template. Use when changing the Eve agent, withEve routes, eveChannel auth, useEveAgent, ClientSession/SessionState, persisted event logs, stream/resume behavior, connection authorization, Vercel Connect MCP connections, local Eve tools, or upstream Eve API…
investigate
Investigate a specific issue report with strict, evidence-driven diagnosis.
review
Comprehensive security and correctness audit. Use for review, deep review, thermo nuclear, or thermonuclear requests and branch or PR diff audits.
om-create-opencode-agent
Scaffold a NEW file-defined OpenCode agent for the Open Mercato Agent Orchestrator (the agent assembled from an agents/ / directory of Markdown files and run on the OpenCode runtime / Playground). Creates AGENT.md + OUTCOME.md (+ optional skills/, sub-agents/, tools/), enforces the propose-only hard gates, runs yarn…