基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/rudderjs/rudder --skill mcp-servers命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Setting up authentication with guards, sessions, registration, password reset, gates/policies, and vendor views in Rudder
Creating Eloquent-style models, queries, relationships, casts, factories, and API resources in Rudder
Creating controller-returned views with route overrides, multi-framework support, and the html tagged template in Rudder
| name | mcp-servers |
| description | Building MCP servers with tools, resources, prompts, decorators, and HTTP/stdio transports in Rudder |
| license | MIT |
| appliesTo | ["@rudderjs/mcp"] |
| trigger | building an MCP server, using `@McpServer` / `@Tool` decorators, exposing tools or resources, or choosing HTTP vs stdio transport |
| skip | consuming an external MCP server from an Agent — use `mcpClientTools()` and load `ai-tools` instead |
| metadata | {"author":"rudderjs"} |
Load when you're building a Model Context Protocol (MCP) server — exposing tools, resources, or prompts to AI coding assistants. If you're consuming an external MCP server inside an Agent, load ai-tools instead and use mcpClientTools().
| Task | Open |
|---|---|
Tools — McpTool, schema, outputSchema, name derivation, McpResponse helpers | rules/tools.md |
Resources + Prompts — McpResource with URI templates, McpPrompt with arguments | rules/resources-and-prompts.md |
Assemble + register a server — McpServer base class, decorators, Mcp facade | rules/server-assembly.md |
Transports — stdio (Mcp.local) vs HTTP/SSE (Mcp.web), middleware | rules/transports.md |
Test + DI — McpTestClient, DI-injected tool classes | rules/testing-and-di.md |
McpServer — base class. Declares protected tools, resources, prompts arrays of classes.McpTool / McpResource / McpPrompt — base classes. Implement handle() + schema() (tools) / uri() (resources) / arguments() (prompts).@Name, @Version, @Instructions, @Description write metadata via reflect-metadata.WeatherTool → weather. PascalCase → kebab-case, minus Tool suffix.McpResponse — return helper: McpResponse.text(s), .json(obj), .error(msg). Errors thrown from handle() are auto-wrapped.new T().McpTestClient — in-memory client for testing servers without spinning up a transport.See packages/mcp/src/index.test.ts for end-to-end tests and playground/app/Mcp/ for a working server (EchoMcpServer + secured variant).