affaan-m avatar

Mcp Server Patterns

Covers the practical patterns for building MCP servers with the Node/TypeScript SDK: registering tools, resources, and prompts, choosing between stdio for local clients like Claude Desktop and Streamable HTTP for remote ones, and handling Zod validation. The guide is honest about API churn in the SDK, repeatedly nudging you to check Context7 or the official docs for current method signatures rather than blindly copying examples. Use this when you're spinning up a new MCP server or debugging why your tools aren't showing up. The schema-first approach and separation of server logic from transport are solid architectural advice that will save you refactoring pain later.

skills.sh installs
5.6K
GitHub stars
300.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add affaan-m/ecc --skill mcp-server-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

MCP Server Patterns

The Model Context Protocol (MCP) lets AI assistants call tools, read resources, and use prompts from your server. Use this skill when building or maintaining MCP servers. The SDK API evolves; check Context7 (query-docs for "MCP") or the official MCP documentation for current method names and signatures.

For the broader routing decision of when a capability should be a rule, a skill, MCP, or a plain CLI/API workflow, see docs/capability-surface-selection.md.

When to Use

Use when: implementing a new MCP server, adding tools or resources, choosing stdio vs HTTP, upgrading the SDK, or debugging MCP registration and transport issues.

How It Works

Core concepts

Sponsors

Details

Repository
github.com/affaan-m/ecc
Categories
Backend & APIs, DevOps & CI/CD, Documentation, AI & Agent Building
First seen
Jul 14, 2026

More from affaan-m/ecc

All 263
1affaan-m avatarx-apiaffaan-m/eccX/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native co5.4Kskills.sh installs
2wordpress avatarwp-abilities-apiwordpress/agent-skillsUse when working with the WordPress Abilities API (wp_register_ability, wp_register_ability_category, /wp-json/wp-abilities/v1/*, @wordpress/abilities) includin4.6Kskills.sh installs
3agricidaniel avatarads-server-side-trackingagricidaniel/claude-adsAudit server-side paid-media measurement including server-side tag management, platform conversion APIs, event taxonomy, browser/server deduplication, consent, 3.6Kskills.sh installs
4affaan-m avatarpubmed-databaseaffaan-m/eccDirect PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitori3.3Kskills.sh installs
5payloadcms avatarpayloadpayloadcms/payloadUse when working with Payload projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, secur2.7Kskills.sh installs
6mindrally avatarmysql-best-practicesmindrally/skillsMySQL development best practices for schema design, query optimization, and database administration2.7Kskills.sh installs