Skip to content

MCP Server Patterns

Guides building Node/TypeScript MCP servers with tools, resources, prompts, and Zod validation

Repository
affaan-m/ECC
Stars
295,127
Licence
MIT
Files
2 files

What it does

MCP (Model Context Protocol) is a standard that lets AI assistants call tools, read data and use prompt templates from a server you build. With this skill installed, the agent follows a set of guidelines for creating such a server in Node/TypeScript: 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 (via Context7 or the official MCP docs) because the API changes between versions. It provides guidance and code snippets; it does not run anything by itself.

Great for

  • Developers starting a new MCP server in TypeScript
  • Teams debugging tool registration or transport problems in an existing MCP server
  • Developers upgrading the @modelcontextprotocol/sdk package and needing to check API changes

Skip it if

  • Non-developers who just want to use an existing MCP integration; the skill is for building servers, not using them
  • Projects in Go or C# — the skill's detailed guidance covers only Node/TypeScript, with other SDKs merely named
  • Relying on the code snippets without verification: the skill itself warns the SDK signatures vary by version and may produce copy-paste errors

Try asking

  • “Help me build an MCP server in TypeScript that exposes a tool for searching my internal docs”
  • “My MCP server tools aren't showing up in Claude Desktop — help me debug the registration”
  • “Should I use stdio or Streamable HTTP for a server that needs to be reachable from Cursor?”
  • “Add Zod input validation and structured error responses to my existing MCP tools”
Step-by-step guide: how to use MCP Server PatternsInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 2 original files, the MIT licence and an attribution note.

    mcp-server-patterns.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip mcp-server-patterns.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip mcp-server-patterns.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Pin your @modelcontextprotocol/sdk version in package.json and have the agent check the matching docs before writing registration code
  • Ask the agent to verify method signatures against current documentation rather than trusting the examples
  • Keep tool logic separate from transport so you can switch between stdio and HTTP later

What's inside

  • agents/openai.yaml
  • SKILL.md

Redistributed unmodified from affaan-m/ECC under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.