Guide · Agent skill
How to use the MCP Server Patterns agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The mcp-server-patterns skill is a set of guidelines that helps an AI agent build or debug a Model Context Protocol (MCP) server written in Node/TypeScript. MCP is a standard that lets AI assistants call tools, read data and use prompt templates from a server you build. This guide explains what the skill does, how to install it, how to trigger it, and what to check before trusting its code.
Quick start
- 1Download and unzip the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. Alternatively, upload it in the Claude apps under Settings → Capabilities → Skills.
- 2Install Node.js and the npm packages. Make sure Node.js and npm are available, then install @modelcontextprotocol/sdk and zod in your server project.
- 3Describe your task in plain language. Ask for help building, extending or debugging an MCP server, for example adding a tool or choosing a transport. The agent will pick up the skill from the request.
- 4Choose the transport. Use stdio for local clients such as Claude Desktop, and Streamable HTTP for remote clients such as Cursor or cloud.
- 5Verify the API signatures. Have the agent check the current SDK method names with Context7 (library "MCP") or the official MCP docs before writing registration code.
- 6Test with a real client. Connect your server to the client you plan to use and confirm tools and resources appear and respond correctly.
What is an agent skill and what does this one do?
An agent skill is a folder containing a SKILL.md file with instructions that an AI agent reads when a task matches the skill's description. This skill covers the core MCP concepts: tools (actions the model can invoke), resources (read-only data it can fetch), and prompts (reusable, parameterised templates the client can surface).
With the skill installed, the agent follows guidance for defining tools and resources, validating inputs with Zod, and choosing between local stdio and remote Streamable HTTP transport. It also tells the agent to check current SDK documentation through Context7 or the official MCP docs, because the API changes between versions. The skill provides guidance and code snippets; it does not run anything by itself.
Install the MCP Server Patterns skill
Download the ZIP from this page and unzip it. Then place the resulting folder in one of two locations: ~/.claude/skills/ to make it available for your user account, or a project's .claude/skills/ folder to make it available only inside that project.
You can also upload the skill in the Claude apps under Settings → Capabilities → Skills.
- Personal install: unzip into ~/.claude/skills/
- Project install: unzip into .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills, then upload
Prepare your project before using the skill
The skill assumes you have Node.js and npm. It also expects the @modelcontextprotocol/sdk and zod npm packages. The source shows this install command for server setup:
npm install @modelcontextprotocol/sdk zodHow to trigger the skill with natural requests
You don't need a special command. Describe the task in plain language that matches the skill's scope: building a new MCP server, adding tools or resources, choosing a transport, upgrading the SDK, or debugging registration or transport problems.
The skill's own list of uses covers implementing a new MCP server, adding tools or resources, choosing stdio vs HTTP, upgrading the SDK, and debugging MCP registration and transport issues.
- Build a new MCP server in TypeScript that exposes a tool for searching our docs.
- Add a resource that returns the contents of a config file to my existing MCP server.
- Should my MCP server use stdio or Streamable HTTP if Cursor will connect to it remotely?
- My tools are not showing up in the client after I registered them. Help me debug this.
- I'm upgrading @modelcontextprotocol/sdk. What API changes do I need to handle?
Understand the transport choice
Stdio is for local clients such as Claude Desktop. Streamable HTTP is preferred for remote clients such as Cursor or cloud setups, using a single MCP HTTP endpoint per the current spec. Legacy HTTP/SSE should only be used when backward compatibility is required.
The skill advises keeping tool and resource logic independent of transport, so you can plug in stdio or HTTP in the entrypoint.
- stdio: local clients (for example Claude Desktop)
- Streamable HTTP: remote clients (for example Cursor or cloud)
- Legacy HTTP/SSE: only for backward compatibility
Check the current API before you copy code
The skill's example creates a server with new McpServer({ name, version }) and imports it from @modelcontextprotocol/sdk/server/mcp.js. The skill warns that the way tools and resources are registered depends on SDK version: some versions use positional arguments, others take an object or a registerTool() call.
Before pasting any registration code, ask the agent to verify signatures against the official MCP documentation at modelcontextprotocol.io or query Context7 with the library name "MCP".
- Pin the SDK version in package.json and check release notes when upgrading.
- Ask the agent to confirm the registration signature for your installed version.
- Test each tool with a real client before relying on it.
const server = new McpServer({ name: "my-server", version: "1.0.0" });Follow the best practices the skill recommends
The skill asks for a schema for every tool, with parameters and return shape documented. It recommends returning structured errors the model can interpret rather than raw stack traces, and preferring idempotent tools so retries are safe.
For tools that call external APIs, the skill suggests considering rate limits and cost and documenting them in the tool description.
- Define an input schema (Zod or the SDK's preferred format) for every tool
- Return readable, structured errors
- Prefer idempotent tools
- Document rate and cost limits in tool descriptions
- Pin the SDK version
What people use it for
- Building a new TypeScript MCP server that exposes search or lookup tools to an AI assistant.
- Exposing read-only resources such as file contents or API responses to a client.
- Adding reusable prompt templates that a client like Claude Desktop can surface.
- Deciding whether a server should run locally over stdio or remotely over Streamable HTTP.
- Debugging why registered tools or resources do not appear in a client.
- Checking what changed when upgrading the @modelcontextprotocol/sdk package.
Frequently asked questions
Is the MCP Server Patterns skill free?
The skill is published under the MIT licence, as stated on this page. The MIT licence allows use, modification and distribution, subject to its terms. Check the licence file in the source repository for the full text.
What do I need to use the mcp-server-patterns skill?
You need Node.js and npm, plus the @modelcontextprotocol/sdk and zod npm packages. Access to Context7 or the internet is optional, but useful for checking current API signatures in the official MCP documentation.
Where do I put the skill folder?
Unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder for one project. You can also upload it in the Claude apps under Settings → Capabilities → Skills.
Does the skill run scripts or access the network?
According to this listing, the skill does not run scripts and does not use the network. It provides guidance and code snippets only, so any code it suggests must be run and tested by you.
Can I use this skill for Go or C# MCP servers?
The detailed guidance covers only Node/TypeScript. The skill names the official Go and C# SDKs, but it does not give detailed patterns for them, so you should check their own documentation.
Why does the generated code fail to compile or register tools?
The MCP SDK signatures change between versions, and the skill warns that copy-pasted code may contain errors. Confirm the method names for your installed version in the official MCP docs or through Context7 before running it.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits developers starting a new MCP server in TypeScript, or debugging tool registration and transport choice in an existing one. It is not useful for people who only want to use an existing MCP integration, and it gives detailed help only for Node/TypeScript. Treat its code snippets as a starting point and verify them against your installed SDK version.
Download the skill