mcp-server-builder

mcp-server-builder is a skill for Claude Code, Codex from khalilbenaz/claude-skills-collection. It costs 105 tokens per session (2,457 once invoked), scanned A, original, MIT.

A guide for creating MCP servers. MCP, or Model Context Protocol, is a standard way to expose tools, data, and reusable prompts to AI models and applications such as Claude Desktop or Cursor.

In plain words
What is it for?
Building local or networked MCP servers, wrapping REST APIs, exposing read-only resources, and creating reusable prompt templates.
Why use it?
It helps turn an existing API, database, file system, or business service into a structured capability that an AI model can call or read.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Building local or networked MCP servers, wrapping REST APIs, exposing read-only resources, and creating reusable prompt templates.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khalilbenaz/claude-skills-collection/mcp-server-builder
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.

Any agent
npx skills add khalilbenaz/claude-skills-collection --skill mcp-server-builder
Clone the repo
git clone --depth 1 https://github.com/khalilbenaz/claude-skills-collection

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-builder

README.md
[![agentmods](https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/mcp-server-builder/github.svg)](https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/mcp-server-builder)
Your own site
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/mcp-server-builder"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/mcp-server-builder/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.

agentmods 80×15 button for mcp-server-builder

Your own site · 80×15
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/mcp-server-builder"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/mcp-server-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,457 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 48
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium MCP Rug Pull · line 38
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 178
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00105 $0.02457
Opus 5 $0.00053 $0.01229
Sonnet 5 $0.00021 $0.00491
Haiku 4.5 $0.00011 $0.00246

Measured 11d ago against content hash 97e6e3ec89ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

mcp-server-builder 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 11d 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.

agent-skills/mcp-server-builder/SKILL.md · 280 lines

How it starts

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

MCP Server Builder

Quand utiliser ce skill

Crée un serveur MCP quand l'objectif est d'exposer une capacité (API, base de données, système de fichiers, service métier) à un LLM de façon structurée. Les cas typiques :

  • Connecter Claude Desktop ou Cursor à un outil interne
  • Wrapper une API REST existante pour qu'elle soit appelable par un agent
  • Exposer des ressources en lecture (documents, données) au contexte de Claude
  • Créer des prompt templates réutilisables pour un workflow métier récurrent

Critères de décision : transport

Contexte Transport recommandé
Claude Desktop / Cursor / usage local stdio
Serveur réseau, multi-clients Streamable HTTP (depuis SDK 1.x)
Compatibilité legacy SSE requise SSE (déprécié en 2025)
Edge / Cloudflare Workers Streamable HTTP avec fetch handler

Workflow

1. Initialisation du projet

Python (recommandé pour démarrages rapides) :

uv init my-mcp-server && cd my-mcp-server
uv add "mcp[cli]"
uv run mcp dev server.py        # hot-reload avec MCP Inspector

TypeScript (recommandé pour production Node.js) :

npx @modelcontextprotocol/create-server my-mcp-server
cd my-mcp-server && npm install
npm run build

Structure minimale Python :

my-mcp-server/
  server.py
  pyproject.toml
  .env               # secrets, jamais committé

2. Squelette serveur minimal

Python — stdio (Claude Desktop) :

from mcp.server.fastmcp import FastMCP

mcp = FastMCP("my-server")

@mcp.tool()
async def ping() -> str:
    """Vérifie que le serveur répond."""
    return "pong"

if __name__ == "__main__":
    mcp.run()          # transport stdio par défaut

TypeScript — stdio :

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const server = new McpServer({ name: "my-server", version: "1.0.0" });

server.tool("ping", "Vérifie que le serveur répond", {}, async () => ({
  content: [{ type: "text", text: "pong" }],
}));

const transport = new StdioServerTransport();
await server.connect(transport);

Read the full file on GitHub · 280 lines

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. 11d ago First seen · 280 lines · 105 tokens per session scan A 97e6e3ec89ed

Subscribe to this mod's changes

mcp-server-builder is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 17d ago), licensed MIT. It adds 105 tokens to every session and 2,457 once invoked, about $0.0005 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

llm-integration

Integrate OpenAI and Anthropic APIs with streaming, structured output, tool calling, token management, and cost optimization.

medy-gribkov/arcana · 28 tokens

sglang

Fast structured generation and serving for LLMs with RadixAttention prefix caching. Use for JSON/regex outputs, constrained decoding, agentic workflows with tool calls, or when you need 5× faster inference than vLLM with prefix sharing. Powers 300,000+ GPUs at xAI, AMD, NVIDIA, and LinkedIn.

davila7/claude-code-templates · 72 tokens

llm-provider

Adds a new LLM provider implementing LLMProvider interface with call() and stream() methods. Integrates with provider factory in src/llm/index.ts, config detection in src/llm/config.ts, and error handling via tracking and recovery. Use when adding a new model backend, integrating a third-party LLM API, or extending…

caliber-ai-org/ai-setup · 100 tokens

calling-llms

Use when sending chat completions through liter-llm and routing to a specific provider via the provider/model prefix. Covers the chat call shape, provider routing, modelhint, message roles, and error categories.

xberg-io/liter-llm · 49 tokens

streaming-responses

Use when streaming tokens incrementally from an LLM via liter-llm over SSE or async iterators. Covers chatstream, delta handling, and null-content chunks.

xberg-io/liter-llm · 39 tokens

api-patterns

API design: naming, versioning, pagination, idempotency, OpenAPI, error contracts and safe retries. Triggers: API design, REST, GraphQL, OpenAPI, Swagger, error response, HTTP status, rate limit.

softspark/ai-toolkit · 52 tokens