building-mcp-servers

building-mcp-servers is a skill for Claude Code, Codex from andreaswasita/copilot-agents-dojo. It costs 17 tokens per session (1,568 once invoked), scanned A, original, MIT.

A guide for creating a Model Context Protocol (MCP) server, a program that lets an AI agent use tools or access resources from another system. It covers servers written with the official TypeScript or Python software libraries, including local and hosted connections.

In plain words
What is it for?
Use it to expose internal APIs to an agent, create a focused tool server for a specific domain, or register and configure a new MCP server.
Why use it?
It provides a defined design and testing process, so the server does not need to implement the communication format itself or ship without setup information.

Skill for Claude CodeCodex

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

Good fit Use it to expose internal APIs to an agent, create a focused tool server for a specific domain, or register and configure a new MCP server.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/andreaswasita/copilot-agents-dojo/building-mcp-servers
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 andreaswasita/copilot-agents-dojo --skill building-mcp-servers
Clone the repo
git clone --depth 1 https://github.com/andreaswasita/copilot-agents-dojo

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 building-mcp-servers

README.md
[![agentmods](https://agentmods.dev/badge/skills/andreaswasita/copilot-agents-dojo/building-mcp-servers/github.svg)](https://agentmods.dev/skills/andreaswasita/copilot-agents-dojo/building-mcp-servers)
Your own site
<a href="https://agentmods.dev/skills/andreaswasita/copilot-agents-dojo/building-mcp-servers"><img src="https://agentmods.dev/badge/skills/andreaswasita/copilot-agents-dojo/building-mcp-servers/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 building-mcp-servers

Your own site · 80×15
<a href="https://agentmods.dev/skills/andreaswasita/copilot-agents-dojo/building-mcp-servers"><img src="https://agentmods.dev/badge/skills/andreaswasita/copilot-agents-dojo/building-mcp-servers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,568 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 pass 7 Sept 2026
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.00017 $0.01568
Opus 5 $0.00009 $0.00784
Sonnet 5 $0.00003 $0.00314
Haiku 4.5 $0.00002 $0.00157

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

Security

Grade A, and why

building-mcp-servers 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.

optional-skills/building-mcp-servers/SKILL.md · 149 lines

How it starts

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

Building MCP Servers Skill

Authors a Model Context Protocol server in TypeScript or Python using the official SDKs (@modelcontextprotocol/sdk, mcp), with deliberate tool/resource/prompt design, both stdio and Streamable HTTP transports, OAuth 2.1 auth, and a test fixture. Does NOT roll its own JSON-RPC framing and does NOT ship without registry + config snippet.

When to Use

  • A required system is not in mcp/registry.yaml.
  • An existing MCP server is too broad; you need a domain-specific facade.
  • User says "build", "write", "author", "create" + "MCP server".
  • Wrapping internal APIs so an agent can call them without bespoke skills.

Prerequisites

  • Node 20+ (TypeScript) or Python 3.11+.
  • The official SDK installed (@modelcontextprotocol/sdk or mcp).
  • An auth strategy decided upfront (CLI inheritance for local, OAuth 2.1 + PKCE for hosted).
  • mcp/registry.yaml and mcp/configs/ writable.
  • @modelcontextprotocol/inspector for handshake debugging.

How to Run

1. Pick primitives: tools / resources / prompts. Default to tools.
2. Design tool names (verb_object) and JSON Schema inputs.
3. Scaffold the server with the official SDK + stdio transport.
4. Add Streamable HTTP transport if the server is hosted.
5. Implement auth — CLI inheritance (local) or OAuth 2.1 + PKCE (hosted).
6. Add tests: in-memory transport unit tests + a real stdio smoke test.
7. Register in `mcp/registry.yaml` and add a `mcp/configs/` snippet.

Quick Reference

Primitive Use for Mental model
tools Side-effectful or arg'd queries RPC the agent decides to invoke
resources Read-only documents addressable by URI Things the agent or user attaches
prompts Pre-baked agent instructions Slash commands the user invokes
Concern Rule
Tool naming verb_object snake_case (get_my_deals)
Input schema JSON Schema, required fields marked, description on every property
Output Text content first; structured JSON in a second content block
Logging stderr only — stdout is reserved for JSON-RPC framing
Auth CLI inheritance (local) or OAuth 2.1 + PKCE (hosted), never tokens in tool args
Pagination Every list tool has limit (default ≤50) and cursor
Idempotency Mutations accept a client-provided idempotency key
Versioning Bump serverInfo.version on schema changes

Read the full file on GitHub · 149 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 · 149 lines · 17 tokens per session scan A 442e557c964e

Subscribe to this mod's changes

building-mcp-servers is a skill published in the GitHub repository andreaswasita/copilot-agents-dojo (53 stars, last pushed 4d ago), licensed MIT. It adds 17 tokens to every session and 1,568 once invoked, about $0.0001 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

fastapi

Use when building, reviewing, testing, securing or shipping a FastAPI / async Python service — routers, Pydantic v2 schemas, dependency injection, async SQLAlchemy 2.0, OAuth2/JWT, ASGITransport tests, production wiring. NOT language-level Python or packaging (that is python), NOT engine-level SQL (that is…

ericrisco/rsc-harness · 94 tokens

csharp-dotnet

Use when writing, reviewing, testing, or shipping C# / .NET code — ASP.NET Core APIs (minimal APIs vs controllers), EF Core data access, async correctness, solution layout in .cs/.csproj/.sln. NOT a Java/Spring backend (that is spring-boot), NOT a Node/TypeScript backend (that is nestjs), NOT framework-neutral REST…

ericrisco/rsc-harness · 89 tokens

firebase

Use when building on Firebase — Firestore data modeling, Security Rules, Auth and custom claims, Cloud Functions, Storage, modular Web/Admin SDK imports — including symptoms like a database open to the internet, a query rejected by rules, or a doc stuck at 1 write/sec. NOT managed-Postgres BaaS with SQL and RLS (that…

ericrisco/rsc-harness · 77 tokens

gamedev-multiplayer

Use when adding multiplayer or netcode to a game — client-server vs P2P, server authority and anti-cheat, state replication vs RPCs, prediction and reconciliation, lag compensation, plus Godot 4 / Unity NGO / Unreal wiring. NOT single-player gameplay (that is godot, unity, unreal), NOT matchmaking or server hosting…

ericrisco/rsc-harness · 86 tokens

gcp-essentials

Use when running a small product on core Google Cloud via the gcloud CLI: a project, Cloud Run deploys, a locked-down Cloud Storage bucket, managed Cloud SQL, and least-privilege IAM wiring them together. NOT AWS (that is aws-essentials), NOT the CI pipeline that ships the image (that is deployment), NOT Postgres…

ericrisco/rsc-harness · 91 tokens

go

Use when writing, reviewing, testing, or shipping Go code and HTTP services: idioms, %w error wrapping, goroutine/context/errgroup concurrency, net/http 1.22 routing, log/slog, project layout, table-driven tests, Go hardening. NOT language-agnostic threat modeling (that is secure-coding), NOT Dockerfile/CI shipping…

ericrisco/rsc-harness · 86 tokens