Skip to content
Back to skills

Mcp Spec

ASecurity

Model Context Protocol (MCP) open spec. Use for writing an MCP server or client (any language; TypeScript @modelcontextprotocol/sdk, Python mcp), JSON-RPC framing, initialize handshake, capability negotiation, stdio/streamable HTTP/SSE transports, defining tools/resources/prompts, sampling, roots, completion. Skip: Anthropic's hosted MCP connector (use anthropic-platform-features), Claude Connectors directory (use claude-connectors), Claude Code's .mcp.json (use claude-code → SKILL-mcp).

  • 17 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 30, 2026
ai-agentstypescriptpythongogit

Works with

  • claude code
  • cli
  • mcp

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 30, 2026

npx -y skills add xiaolai/anthropic-docs --skill mcp-spec --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mcp Spec?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mcp Spec
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/xiaolai-mcp-spec/badge)](https://www.skillsdirectory.com/skills/xiaolai-mcp-spec)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mcp-spec
description: |
  Model Context Protocol (MCP) open spec. Use for writing an MCP server or
  client (any language; TypeScript @modelcontextprotocol/sdk, Python mcp),
  JSON-RPC framing, initialize handshake, capability negotiation,
  stdio/streamable HTTP/SSE transports, defining tools/resources/prompts,
  sampling, roots, completion. Skip: Anthropic's hosted MCP connector (use
  anthropic-platform-features), Claude Connectors directory (use
  claude-connectors), Claude Code's .mcp.json (use claude-code →
  SKILL-mcp).
user-invocable: true
---

# Model Context Protocol (MCP) — Router

| Field | Value |
|---|---|
| **Source docs** | [modelcontextprotocol.io](https://modelcontextprotocol.io) |
| **Spec repo** | [modelcontextprotocol/modelcontextprotocol](https://github.com/modelcontextprotocol/modelcontextprotocol) |
| **TypeScript SDK** | [`@modelcontextprotocol/sdk`](https://www.npmjs.com/package/@modelcontextprotocol/sdk) |
| **Python SDK** | [`mcp`](https://pypi.org/project/mcp/) |

> **This skill is auto-updated daily.** A pipeline reads the upstream
> docs and rewrites the per-surface files below. Section structure is
> stable; content drifts to track upstream.

## When to use

Router skill for the Model Context Protocol (MCP) open spec, covering
the protocol itself (JSON-RPC framing, capabilities, lifecycle), the
client and server roles, the transport layers (stdio / streamable
HTTP / SSE), and the core primitives (tools, resources, prompts,
sampling, roots, completion).

Use when the user asks about: writing an MCP server (in any language),
writing an MCP client, the JSON-RPC protocol framing, the
initialize handshake, capability negotiation, the stdio transport,
the streamable HTTP transport, the SSE transport, defining a tool /
resource / prompt, sampling, roots, or completion. Includes the
TypeScript SDK (`@modelcontextprotocol/sdk`) and Python SDK (`mcp`).

Skip: Anthropic's hosted MCP connector (use
anthropic-platform-features), the user-facing Claude Connectors
directory (use claude-connectors), Claude Code's `.mcp.json` config
(use claude-code → SKILL-mcp).

## Dispatch table

| Surface file | Read when the user asks about… |
|---|---|
| [`SKILL-protocol.md`](SKILL-protocol.md) | JSON-RPC framing, the `initialize` handshake, capability negotiation, lifecycle, error codes, versioning |
| [`SKILL-clients.md`](SKILL-clients.md) | implementing an MCP client, calling tools, reading resources, the client-side of sampling |
| [`SKILL-servers.md`](SKILL-servers.md) | implementing an MCP server in TypeScript or Python, server-side capability advertisement, server lifecycle |
| [`SKILL-transport.md`](SKILL-transport.md) | stdio transport, streamable HTTP transport, SSE transport (legacy), choosing a transport |
| [`SKILL-tools-resources-prompts.md`](SKILL-tools-resources-prompts.md) | defining tools (input schema, output schema), defining resources (URI templates, MIME types), defining prompts, sampling, roots, completion |

## Examples

<example>
Context: A developer is building an MCP server in Python.
user: "How do I expose a resource and notify clients when it changes?"
assistant: Uses mcp-spec and reads the resources surface for list, read and change notifications.
</example>

<example>
Context: A developer configures a server for Claude Code.
user: "Where do I add my server so Claude Code loads it?"
assistant: Routes to claude-code instead; .mcp.json is Claude Code configuration.
</example>

---

*This skill is auto-updated daily by a maintainer-run pipeline. File
issues at [xiaolai/anthropic-docs](https://github.com/xiaolai/anthropic-docs).*

Files in this skill

  • CHANGELOG.md14.1 KB
  • README.md2 KB
  • SKILL-clients.md11.9 KB
  • SKILL-known-issues.md1.9 KB
  • SKILL-protocol.md21.3 KB
  • SKILL-servers.md10.7 KB
  • SKILL-tools-resources-prompts.md18.6 KB
  • SKILL-transport.md10.1 KB
  • SKILL.md3.6 KB
  • config.json1.8 KB
  • docs-snapshot/MANIFEST.json30.8 KB
  • reports/2026-05-19.md992 B
  • reports/2026-05-20.md898 B
  • reports/2026-05-21.md1.2 KB
  • reports/2026-05-22.md854 B
  • reports/2026-05-23.md1.2 KB
  • reports/2026-05-24.md1.1 KB
  • reports/2026-05-25.md804 B
  • reports/2026-05-26.md840 B
  • reports/2026-05-27.md1.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…