Best fit
- 使用Node/TypeScript SDK构建MCP服务器——工具、资源、提示、Zod验证、stdio与可流式HTTP对比。使用Context7或官方MCP文档获取最新API信息。
affaan-m/ECC
使用Node/TypeScript SDK构建MCP服务器——工具、资源、提示、Zod验证、stdio与可流式HTTP对比。使用Context7或官方MCP文档获取最新API信息。
npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/mcp-server-patterns"Source checked Jul 28, 2026·Refresh due Oct 26, 2026
Reorganized from the pinned upstream SKILL.md
According to the pinned SKILL.md from affaan-m/ECC: 模型上下文协议(MCP)允许 AI 助手调用工具、读取资源和使用来自服务器的提示。在构建或维护 MCP 服务器时使用此技能。SDK API 会演进;请查阅 Context7(查询文档 "MCP")或官方 MCP 文档以获取当前的方法名称和签名。
npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/mcp-server-patterns"Best fit
Bring this context
Expected outputs
Key source sections
Sections are extracted automatically from the pinned SKILL.md and link back to the source.
在以下情况时使用:实现新的 MCP 服务器、添加工具或资源、选择 stdio 与 HTTP、升级 SDK,或调试 MCP 注册和传输问题。
工具:模型可以调用的操作(例如搜索、运行命令)。根据 SDK 版本,使用 registerTool() 或 tool() 注册。 资源:模型可以获取的只读数据(例如文件内容、API 响应)。根据 SDK 版本,使用 registerResource() 或 resource() 注册。处理程序通常接收一个 uri 参数。 提示:客户端可以呈现的可重用参数化提示模板(例如在 Claude Desktop 中)。使用 registerPrompt() 或等效方法注册。 传输:stdio 用于本地客户端(例如 Claude Desktop);可流式 HTTP…
工具:模型可以调用的操作(例如搜索、运行命令)。根据 SDK 版本,使用 registerTool() 或 tool() 注册。 资源:模型可以获取的只读数据(例如文件内容、API 响应)。根据 SDK 版本,使用 registerResource() 或 resource() 注册。处理程序通常接收一个 uri 参数。 提示:客户端可以呈现的可重用参数化提示模板(例如在 Claude Desktop 中)。使用 registerPrompt() 或等效方法注册。 传输:stdio 用于本地客户端(例如 Claude Desktop);可流式 HTTP…
对于本地客户端,创建一个 stdio 传输并将其传递给服务器的连接方法。确切的 API 因 SDK 版本而异(例如构造函数与工厂函数)。请参阅官方 MCP 文档或查询 Context7 中的 "MCP stdio server" 以获取当前模式。
对于 Cursor、云端或其他远程客户端,使用可流式 HTTP(根据当前规范,每个 MCP HTTP 端点)。仅在需要向后兼容性时支持传统 HTTP/SSE。
SkillSignal prompt templates
These prompts were written by SkillSignal from the source structure; they are not upstream text.
Task-start prompt
Confirm source fit, inputs, and outputs before acting.
Use mcp-server-patterns to help me with: [specific task]. Context: [files, data, or background]. Constraints: [environment, scope, and prohibited actions]. Before acting, check the pinned SKILL.md and explain which sections apply, what inputs are still missing, and what you will deliver.
Source-guided execution
Make the Agent explicitly follow the key extracted sections.
Apply the pinned mcp-server-patterns source to [task]. Pay particular attention to these source sections: “何时使用”, “工作原理”, “核心概念”, “使用 stdio 连接”, “远程(可流式 HTTP)”. Preserve the important decision at each step. Mark facts not covered by the source as “needs confirmation” instead of inventing them. Then verify the result against my acceptance criteria: [criteria].
Result-review prompt
Check omissions, permissions, and source drift before delivery.
Review the current mcp-server-patterns result: (1) does it satisfy the original task; (2) were any applicable steps or limits in the pinned SKILL.md missed; (3) did it perform any unauthorized file, command, network, or data action; and (4) which conclusions remain unverified? List issues first, then fix only what the source or user authorization supports.
Output checklist
The task matches the purpose documented in the SKILL.md.
The source section “何时使用” has been checked.
The source section “工作原理” has been checked.
The source section “核心概念” has been checked.
The source section “使用 stdio 连接” has been checked.
Inputs, constraints, and acceptance criteria are explicit.
Unverified facts, compatibility, and outcome claims are clearly marked.
Any file, command, network, or data action has been reviewed.
Choose a different workflow
Build MCP servers with Node/TypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest API.
A separate implementation from affaan-m/ECC; compare its source, maintenance signals, and permission requirements.
Open source detailBuild MCP servers with Node/TypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest API.
A separate implementation from affaan-m/ECC; compare its source, maintenance signals, and permission requirements.
Open source detail日本語翻訳:このファイルは mcp-server-patterns 用の日本語翻訳が必要です
A separate implementation from affaan-m/ECC; compare its source, maintenance signals, and permission requirements.
Open source detailFAQ
模型上下文协议(MCP)允许 AI 助手调用工具、读取资源和使用来自服务器的提示。在构建或维护 MCP 服务器时使用此技能。SDK API 会演进;请查阅 Context7(查询文档 "MCP")或官方 MCP 文档以获取当前的方法名称和签名。
The catalog detected this source-specific install command: npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/mcp-server-patterns". Inspect the command and pinned source before running it.
No dedicated Agent platform is declared in the pinned source record.
Quality breakdown
Based on traceable docs and repository signals; stars are not treated as quality.
Compare before choosing
These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.
Build MCP servers with Node/TypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest API.
Build MCP servers with Node/TypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest API.
日本語翻訳:このファイルは mcp-server-patterns 用の日本語翻訳が必要です
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
Grounded design brief from the adopted corpus — style, WCAG-checked color tokens, typography, layout pattern, anti-patterns. Use on ui-design-brief or any which-style/palette/font/chart decision.
模型上下文协议(MCP)允许 AI 助手调用工具、读取资源和使用来自服务器的提示。在构建或维护 MCP 服务器时使用此技能。SDK API 会演进;请查阅 Context7(查询文档 "MCP")或官方 MCP 文档以获取当前的方法名称和签名。
在以下情况时使用:实现新的 MCP 服务器、添加工具或资源、选择 stdio 与 HTTP、升级 SDK,或调试 MCP 注册和传输问题。
registerTool() 或 tool() 注册。registerResource() 或 resource() 注册。处理程序通常接收一个 uri 参数。registerPrompt() 或等效方法注册。Node/TypeScript SDK 可能暴露 tool() / resource() 或 registerTool() / registerResource();官方 SDK 已随时间变化。请始终根据当前 MCP 文档 或 Context7 进行验证。
对于本地客户端,创建一个 stdio 传输并将其传递给服务器的连接方法。确切的 API 因 SDK 版本而异(例如构造函数与工厂函数)。请参阅官方 MCP 文档或查询 Context7 中的 "MCP stdio server" 以获取当前模式。
保持服务器逻辑(工具 + 资源)独立于传输,以便您可以在入口点中插入 stdio 或 HTTP。
对于 Cursor、云端或其他远程客户端,使用可流式 HTTP(根据当前规范,每个 MCP HTTP 端点)。仅在需要向后兼容性时支持传统 HTTP/SSE。
npm install @modelcontextprotocol/sdk zod
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
const server = new McpServer({ name: "my-server", version: "1.0.0" });
使用您的 SDK 版本提供的 API 注册工具和资源:某些版本使用 server.tool(name, description, schema, handler)(位置参数),其他版本使用 server.tool({ name, description, inputSchema }, handler) 或 registerTool()。资源同理——当 API 提供时,在处理程序中包含一个 uri。请查阅官方 MCP 文档或 Context7 以获取当前的 @modelcontextprotocol/sdk 签名,避免复制粘贴错误。
使用 Zod(或 SDK 首选的模式格式)进行输入验证。
@modelcontextprotocol/sdk (npm)。使用库名 "MCP" 的 Context7 以获取当前的注册和传输模式。modelcontextprotocol/go-sdk)。