/saschb2b-skills:mcp-serverfrom saschb2b-skills
Build, extend, and maintain MCP servers across their lifecycle: transport choice (stdio vs Streamable HTTP), tool definitions, versioning, security, testing with MCP Inspector, and publishing to the registry. For exposing CLI, API, or apps to AI agents.
Ships in saschb2b-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Scaffolding an MCP server is the easy 10%. The heavy lifting is everything after init: writing tool definitions the agent reads correctly, extending the surface without breaking agents that already depend on it, defending against tool poisoning and prompt injection, and operating the thing once it is remote. This skill covers the whole lifecycle. The deep reference for each phase is the vendored OKF bundle in references/; SKILL.md is the procedure.
MCP uses date-string protocol revisions. As of 2026-06-21 the current stable revision is 2025-11-25 (it superseded 2025-06-18); a stateless-core revision 2026-07-28 is the imminent next release. Build against 2025-11-25 and let the SDK negotiate older clients. The production SDK is @modelcontextprotocol/sdk (v1.x, TypeScript). The split @modelcontextprotocol/server + /client packages are the unreleased V2 line, not current. Full protocol surface, lifecycle, and result shapes in protocol.md.
| Use | Transport | Why |
|---|---|---|
| Local, client spawns the server as a subprocess, one user | stdio | No auth, no sessions, no scaling. Default for local tools. Log to stderr only. |
| Remote, hosted, multiple clients | Streamable HTTP | Single endpoint (POST + optional SSE upgrade), Mcp-Session-Id, OAuth, you own scaling and ops. |
Prefer stdio until you genuinely need remote multi-client access. The old HTTP+SSE transport is deprecated (replaced by Streamable HTTP in 2025-03-26). Transport mechanics, the stdio-vs-HTTP operational cliff, and sessions are in protocol.md and maintenance.md.
Every server, regardless of target, has the same skeleton:
src/index.ts) — entry point, lifecycle, cleanup, chosen transport.src/tool-definitions.ts) — the contract the agent reads to decide what to call. The single most important file.src/tool-router.ts, src/handlers/*.ts) — dispatch, validation, response shaping.src/executor.ts, scripts/*) — how you actually talk to the target. 80% of the work.src/utils.ts) — input validation, execFile over exec, path checks, tool filtering.Single production dependency: @modelcontextprotocol/sdk (plus zod for schemas). TypeScript, ESLint, and the test runner are dev-only.
Ask how the target lets you automate it:
| Target offers | Bridge pattern | Example |
|---|---|---|
| Scripting API (Lua, GDScript, Python) | Subprocess + script-injection dispatcher in the target's language | Aseprite (Lua), Godot (GDScript) |
| REST / HTTP API | fetch calls from handlers | Any web service |
| Rich CLI | execFile directly | FFmpeg, ImageMagick |
| Socket / TCP / WebSocket server | Persistent connection, state in a shared context | Godot interactive mode |
| Native SDK | Direct import if Node-compatible | SQLite, native modules |
If two patterns apply, prefer the lower-state one (subprocess over persistent socket). State means lifecycle management.
Do not define 50 tools up front. Pick the simplest useful operation (get_version, create_file), wire it through all five layers with the SDK's registerTool(name, { description, inputSchema, annotations }, handler), then watch an agent call it in the Inspector:
npx @modelcontextprotocol/inspector node build/index.js
If the tool list reads as confusing to you, it reads as confusing to the agent. Once one tool works, adding more is mechanical.
The description is the only documentation the agent has, and tool definitions cost tokens on every request before the user speaks. Anthropic's guidance (tool-design.md) in four rules:
list_users + list_events + create_event into one schedule_event. More tools confuse the agent and burn its context.user_id not user), enums over free strings, required vs optional marked and defaults documented.response_format enum (concise/detailed) instead of always dumping everything.readOnlyHint, destructiveHint, idempotentHint, openWorldHint — and surface tool failures as isError: true with an actionable message so the model self-corrects.Adding a tool touches four places: the definition, the handler, the HANDLER_MAP entry, and the bridge operation (if Layer 4 uses one). Document this in CONTRIBUTING.md so contributors don't drift.
Evolving an existing tool is where servers break their consumers. Additive is safe (new tools, new optional params, adding outputSchema). Breaking is not (removing or renaming a tool, adding a required param, narrowing a type, or silently changing semantics). MCP has no formal tool-deprecation flag, so the sanctioned path is name-versioning: ship export_v2, keep export working, mark export deprecated in its description. Fire notifications/tools/list_changed when the set changes. The full versioning, deprecation, _meta, toolsets, pagination, and observability playbook is in maintenance.md.
MCP servers run with real privileges and read agent-influenced, attacker-reachable input. The minimum bar (full threat model and OAuth in security.md):
execFile/spawn, never exec. Args as an array, no shell string interpolation. Allowlist binaries... before passing to the bridge.ps / /proc). stdio servers read credentials from the environment.Origin header (DNS rebinding) and bind local HTTP to 127.0.0.1.npx @modelcontextprotocol/inspector ...), unit-test handlers, and run an eval-driven loop on tool quality. stdio servers must log to stderr — a stray stdout write corrupts the JSON-RPC stream. See testing.md.server.json (reverse-DNS name, immutable version) to the registry, and give consumers the mcpServers config block; MCPB (formerly DXT) packs a one-click local install. See publishing.md.The post-init knowledge lives in references/ as a conformant OKF bundle:
list_changed, toolsets, pagination, observability, ops, pitfalls.server.json, distribution channels, the consumer config block, MCPB.Based on How to Build an MCP Server, widened to the full lifecycle against the MCP 2025-11-25 spec. Reference implementations at godot-mcp and aseprite-mcp.
CARD.manifest.json (opens in a new tab)CARD.md (opens in a new tab)CARD.md.sigstore (opens in a new tab)CARD.svg (opens in a new tab)permissions.yaml (opens in a new tab)references/index.md (opens in a new tab)references/maintenance.md (opens in a new tab)references/protocol.md (opens in a new tab)references/publishing.md (opens in a new tab)references/security.md (opens in a new tab)references/testing.md (opens in a new tab)references/tool-design.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (saschb2b/skills) — no native marketplace selected
npx claudepluginhub p/saschb2b-saschb2b-skills26 skills in this plugin
/android-composeModern Android development with Jetpack Compose as the default UI toolkit and Material 3 Expressive as the default design direction, a dated snapshot. Covers Compose fundamentals (composables, modifiers, state hoisting, side effects, lazy lists, strong skipping, recomposition), Material 3 and Expressive theming and components (MaterialExpressiveTheme, MotionScheme, button groups, split buttons, FAB menu, floating toolbars, wavy progress indicators, shape morphing, dynamic color), architecture (ViewModel, StateFlow, collectAsStateWithLifecycle, Hilt), type-safe Navigation Compose and Navigation 3, data (Room, DataStore, Retrofit, Ktor, Coil), the Gradle Kotlin DSL build with version catalogs and KSP, testing, performance, and View interop. Use when building Android UI in Compose, theming with Material 3 or Expressive, wiring architecture or navigation, configuring the build, or debugging Compose issues. Check the project's versions first; re-verify version facts against the official Android and AndroidX docs./ask-uxForce UX questioning before any UI work, refactor, or redesign. Use when the user asks to design, redesign, restyle, polish, "fix", or "make nicer" a screen, component, page, or flow. Also use when the user describes a problem in UI terms ("the button is hard to find", "this form is confusing", "this page is ugly") and is about to reach for a visual fix, since most UI-shaped complaints have UX-shaped causes./audit-actionsAudit a repository's GitHub Actions workflows for unsafe pull_request_target usage that can lead to supply chain compromise. Use when the user asks to audit workflows, review CI/CD security, check pwn request risk, harden Actions, or after a supply chain incident in a dependency. Also use proactively when reviewing any PR that touches .github/workflows/./autopilotWork autonomously on a project without waiting for direction. On command, survey the codebase, pick one high-value low-risk improvement, do it, verify it, commit it, then pick the next, looping like a self-directed intern. Use when the user hands off open-endedly ("work on your own", "keep improving this", "find something worth doing", "don't wait for me", "go autonomous", "run for a while", "be a passionate intern", "do whatever you think is valuable") or invokes /autopilot, and you have to choose the work yourself rather than wait for instructions or feedback./breadcrumbsHeal codebase understanding gaps exposed during implementation, debugging, or investigation. Use when tracing reveals misleading names, repeated backtracking, disconnected navigation paths, hidden contracts, surprising dependencies, stale documentation, unclear errors, undocumented constraints, false leads, or avoidable complexity. Make the smallest durable improvement at the source through clearer code, types, validation, tests, errors, comments, or existing documentation. Also use when a task was harder to grasp than it should have been or you think "that should have been documented." Do not create a breadcrumb trail, investigation log, freshness system, or separate knowledge store./codegen-apiSet up typesafe API code generation in 2026, preferring framework-agnostic options factories over generated hooks. Walks the decision matrix for REST (OpenAPI via hey-api) and GraphQL (graphql-codegen client preset, gql.tada), wires the minimal config for the chosen stack, and uses fragment masking for component composition. Use when starting an API integration, wiring an OpenAPI spec into a frontend, setting up GraphQL types, asked about useQuery, queryOptions, TypedDocumentNode, or fragment masking, or when seeing legacy patterns like generated useGetX hooks, per-query prop types, or @graphql-codegen/typescript-react-apollo. Counterweight to LLM training corpora that mostly reflect the pre-2024 hooks pattern, biasing default output toward generated hooks.Other plugins' skills for the same job