[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FC4Q9Y1C7B7ADXZTWBVSF3":3,"skill-same:01M7FC4Q9Y1C7B7ADXZTWBVSF3":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M7FC4Q9Y1C7B7ADXZTWBVSF3","mcp-server-patterns",null,"Build MCP servers with Node\u002FTypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest API. Use when building or debugging an MCP server — tools, resources, prompts, validation, or transport choice.","shaikhsarib\u002FDeep","shaikhsarib","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F187104861?v=4","01M7FBPVVHJVH9BRXCMHQ8VJH3","Shaikh Sarib Umer","01M7FBPVW3WGBVSZBRH0ACF278",0,"MIT","https:\u002F\u002Fgithub.com\u002Fshaikhsarib\u002FDeep\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fecc\u002Fupstream\u002F.agents\u002Fskills\u002Fmcp-server-patterns\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: mcp-server-patterns\ndescription: Build MCP servers with Node\u002FTypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest API. Use when building or debugging an MCP server — tools, resources, prompts, validation, or transport choice.\nlicense: MIT\n---\n\n# MCP Server Patterns\n\nThe 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.\n\n## When to Use\n\nUse when: implementing a new MCP server, adding tools or resources, choosing stdio vs HTTP, upgrading the SDK, or debugging MCP registration and transport issues.\n\n## How It Works\n\n### Core concepts\n\n- **Tools**: Actions the model can invoke (e.g. search, run a command). Register with `registerTool()` or `tool()` depending on SDK version.\n- **Resources**: Read-only data the model can fetch (e.g. file contents, API responses). Register with `registerResource()` or `resource()`. Handlers typically receive a `uri` argument.\n- **Prompts**: Reusable, parameterised prompt templates the client can surface (e.g. in Claude Desktop). Register with `registerPrompt()` or equivalent.\n- **Transport**: stdio for local clients (e.g. Claude Desktop); Streamable HTTP is preferred for remote (Cursor, cloud). Legacy HTTP\u002FSSE is for backward compatibility.\n\nThe Node\u002FTypeScript SDK may expose `tool()` \u002F `resource()` or `registerTool()` \u002F `registerResource()`; the official SDK has changed over time. Always verify against the current [MCP docs](https:\u002F\u002Fmodelcontextprotocol.io) or Context7.\n\n### Connecting with stdio\n\nFor local clients, create a stdio transport and pass it to your server’s connect method. The exact API varies by SDK version (e.g. constructor vs factory). See the official MCP documentation or query Context7 for \"MCP stdio server\" for the current pattern.\n\nKeep server logic (tools + resources) independent of transport so you can plug in stdio or HTTP in the entrypoint.\n\n### Remote (Streamable HTTP)\n\nFor Cursor, cloud, or other remote clients, use **Streamable HTTP** (single MCP HTTP endpoint per current spec). Support legacy HTTP\u002FSSE only when backward compatibility is required.\n\n## Examples\n\n### Install and server setup\n\n```bash\nnpm install @modelcontextprotocol\u002Fsdk zod\n```\n\n```typescript\nimport { McpServer } from \"@modelcontextprotocol\u002Fsdk\u002Fserver\u002Fmcp.js\";\nimport { z } from \"zod\";\n\nconst server = new McpServer({ name: \"my-server\", version: \"1.0.0\" });\n```\n\nRegister tools and resources using the API your SDK version provides: some versions use `server.tool(name, description, schema, handler)` (positional args), others use `server.tool({ name, description, inputSchema }, handler)` or `registerTool()`. Same for resources — include a `uri` in the handler when the API provides it. Check the official MCP docs or Context7 for the current `@modelcontextprotocol\u002Fsdk` signatures to avoid copy-paste errors.\n\nUse **Zod** (or the SDK’s preferred schema format) for input validation.\n\n## Best Practices\n\n- **Schema first**: Define input schemas for every tool; document parameters and return shape.\n- **Errors**: Return structured errors or messages the model can interpret; avoid raw stack traces.\n- **Idempotency**: Prefer idempotent tools where possible so retries are safe.\n- **Rate and cost**: For tools that call external APIs, consider rate limits and cost; document in the tool description.\n- **Versioning**: Pin SDK version in package.json; check release notes when upgrading.\n\n## Official SDKs and Docs\n\n- **JavaScript\u002FTypeScript**: `@modelcontextprotocol\u002Fsdk` (npm). Use Context7 with library name \"MCP\" for current registration and transport patterns.\n- **Go**: Official Go SDK on GitHub (`modelcontextprotocol\u002Fgo-sdk`).\n- **C#**: Official C# SDK for .NET.\n","# MCP Server Patterns\n\nThe 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.\n\n## When to Use\n\nUse when: implementing a new MCP server, adding tools or resources, choosing stdio vs HTTP, upgrading the SDK, or debugging MCP registration and transport issues.\n\n## How It Works\n\n### Core concepts\n\n- **Tools**: Actions the model can invoke (e.g. search, run a command). Register with `registerTool()` or `tool()` depending on SDK version.\n- **Resources**: Read-only data the model can fetch (e.g. file contents, API responses). Register with `registerResource()` or `resource()`. Handlers typically receive a `uri` argument.\n- **Prompts**: Reusable, parameterised prompt templates the client can surface (e.g. in Claude Desktop). Register with `registerPrompt()` or equivalent.\n- **Transport**: stdio for local clients (e.g. Claude Desktop); Streamable HTTP is preferred for remote (Cursor, cloud). Legacy HTTP\u002FSSE is for backward compatibility.\n\nThe Node\u002FTypeScript SDK may expose `tool()` \u002F `resource()` or `registerTool()` \u002F `registerResource()`; the official SDK has changed over time. Always verify against the current [MCP docs](https:\u002F\u002Fmodelcontextprotocol.io) or Context7.\n\n### Connecting with stdio\n\nFor local clients, create a stdio transport and pass it to your server’s connect method. The exact API varies by SDK version (e.g. constructor vs factory). See the official MCP documentation or query Context7 for \"MCP stdio server\" for the current pattern.\n\nKeep server logic (tools + resources) independent of transport so you can plug in stdio or HTTP in the entrypoint.\n\n### Remote (Streamable HTTP)\n\nFor Cursor, cloud, or other remote clients, use **Streamable HTTP** (single MCP HTTP endpoint per current spec). Support legacy HTTP\u002FSSE only when backward compatibility is required.\n\n## Examples\n\n### Install and server setup\n\n```bash\nnpm install @modelcontextprotocol\u002Fsdk zod\n```\n\n```typescript\nimport { McpServer } from \"@modelcontextprotocol\u002Fsdk\u002Fserver\u002Fmcp.js\";\nimport { z } from \"zod\";\n\nconst server = new McpServer({ name: \"my-server\", version: \"1.0.0\" });\n```\n\nRegister tools and resources using the API your SDK version provides: some versions use `server.tool(name, description, schema, handler)` (positional args), others use `server.tool({ name, description, inputSchema }, handler)` or `registerTool()`. Same for resources — include a `uri` in the handler when the API provides it. Check the official MCP docs or Context7 for the current `@modelcontextprotocol\u002Fsdk` signatures to avoid copy-paste errors.\n\nUse **Zod** (or the SDK’s preferred schema format) for input validation.\n\n## Best Practices\n\n- **Schema first**: Define input schemas for every tool; document parameters and return shape.\n- **Errors**: Return structured errors or messages the model can interpret; avoid raw stack traces.\n- **Idempotency**: Prefer idempotent tools where possible so retries are safe.\n- **Rate and cost**: For tools that call external APIs, consider rate limits and cost; document in the tool description.\n- **Versioning**: Pin SDK version in package.json; check release notes when upgrading.\n\n## Official SDKs and Docs\n\n- **JavaScript\u002FTypeScript**: `@modelcontextprotocol\u002Fsdk` (npm). Use Context7 with library name \"MCP\" for current registration and transport patterns.\n- **Go**: Official Go SDK on GitHub (`modelcontextprotocol\u002Fgo-sdk`).\n- **C#**: Official C# SDK for .NET.\n",{"name":5,"license":15,"description":7},"main","08be1051c10948e2802b58608c7a2ef9f410a4b6",".agents\u002Fskills\u002Fecc\u002Fupstream\u002F.agents\u002Fskills\u002Fmcp-server-patterns","https:\u002F\u002Fgithub.com\u002Fshaikhsarib\u002FDeep","https:\u002F\u002Fgithub.com\u002Fshaikhsarib","I want use this platform for education purpose only. i am student currently  pursue bachelor in software development in TISS (SSE - School Skill Education). ","2026-11-07 23:13:19",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add shaikhsarib\u002FDeep --skill mcp-server-patterns",{"tool":37,"command":38},"bunx","bunx skills add shaikhsarib\u002FDeep --skill mcp-server-patterns",{"tool":40,"command":41},"pnpm","pnpm dlx skills add shaikhsarib\u002FDeep --skill mcp-server-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fshaikhsarib\u002FDeep\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fecc\u002Fupstream\u002F.agents\u002Fskills\u002Fmcp-server-patterns\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"agents\u002Fopenai.yaml","REFERENCE","参考文档",269,"https:\u002F\u002Fgithub.com\u002Fshaikhsarib\u002FDeep\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fecc\u002Fupstream\u002F.agents\u002Fskills\u002Fmcp-server-patterns\u002Fagents\u002Fopenai.yaml",[52,60,67,74,81,88],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":56,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7FFBPBB683WH30DHN4K2069","energy-procurement","Procure electricity and natural gas for commercial and industrial facilities: tariff and rate-schedule optimization, demand-charge mitigation, supplier RFPs, fixed\u002Findex\u002Fblock-and-index hedging, renewable PPA and REC evaluation, and sustainability reporting. Use when procuring energy, optimizing utility tariffs, managing demand charges, evaluating PPAs, or building energy budgets and hedge strategies.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fshaikhsarib\u002FDeep\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fecc\u002Fupstream\u002Fskills\u002Fenergy-procurement\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7FF764D2RQP4TJCS9FNTMJ7","data-throughput-accelerator","Diagnose and accelerate large data movement — ingestion, backfill, export, ETL, warehouse loading, manifest catch-up, and table synchronization — by isolating the true bottleneck, benchmarking variants, and codifying the fastest path with a hard accounting block proving rows and timestamps cohere. Use when a pipeline or backfill is too slow and must get faster without losing data correctness.","https:\u002F\u002Fgithub.com\u002Fshaikhsarib\u002FDeep\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fecc\u002Fupstream\u002Fskills\u002Fdata-throughput-accelerator\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":56,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7FF6BJD1NMWCV7J0PD5R3WB","customs-trade-compliance","Codified customs and trade compliance expertise — HS\u002FHTS tariff classification with GRI rules, commercial invoices and entry documentation, Incoterms 2020, FTA qualification and duty optimization (USMCA, RCEP, FTZs, drawback), denied-party screening, and penalty mitigation across US, EU, UK, and APAC jurisdictions. Use when classifying goods, preparing import\u002Fexport documentation, screening restricted parties, responding to customs audits or CF-28\u002Fpenalty notices, or optimizing duties.","https:\u002F\u002Fgithub.com\u002Fshaikhsarib\u002FDeep\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fecc\u002Fupstream\u002Fskills\u002Fcustoms-trade-compliance\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":56,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7FF0FJHKPWEXHS3KAN7PAP6","carrier-relationship-management","Manage truckload, LTL, and intermodal carrier portfolios: sourcing and FMCSA vetting, freight rate and fuel-surcharge negotiation, RFPs and routing guides, carrier scorecards, allocation, and renewals. Use when onboarding carriers, running freight RFPs, negotiating rates, evaluating carrier performance, reallocating freight, or building freight strategy.","https:\u002F\u002Fgithub.com\u002Fshaikhsarib\u002FDeep\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fecc\u002Fupstream\u002Fskills\u002Fcarrier-relationship-management\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7FEYXWH7MJ2Z39J3K2NNNYV","benchmark","Measure performance baselines and detect regressions across browser Core Web Vitals (LCP, INP, CLS, page weight), API endpoint latency percentiles, and build\u002Ftest feedback times, with before\u002Fafter comparison stored in git-tracked .ecc\u002Fbenchmarks JSON. Use when checking page speed, responding to 'it feels slow' reports, verifying launch performance targets, or comparing stack alternatives.","https:\u002F\u002Fgithub.com\u002Fshaikhsarib\u002FDeep\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fecc\u002Fupstream\u002Fskills\u002Fbenchmark\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7FEYRS0CC0MG3XKW1BGWGYC","benchmark-optimization-loop","Convert 'make it faster' requests into a bounded measured optimization loop — baseline first, generate one-hypothesis variants, benchmark each against a correctness gate, and promote the fastest safe variant with reproducible commands. Use when asked to speed something up, try many variants, run recursive optimization, benchmark latency\u002Fthroughput\u002Fcost, or pick the best implementation by repeated measured tests.","https:\u002F\u002Fgithub.com\u002Fshaikhsarib\u002FDeep\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fecc\u002Fupstream\u002Fskills\u002Fbenchmark-optimization-loop\u002FSKILL.md",[],[]]