[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-rekog-labs--MCP-Nest":3,"tool-rekog-labs--MCP-Nest":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":80,"owner_email":80,"owner_twitter":80,"owner_website":80,"owner_url":81,"languages":82,"stars":95,"forks":96,"last_commit_at":97,"license":98,"difficulty_score":99,"env_os":100,"env_gpu":101,"env_ram":101,"env_deps":102,"category_tags":111,"github_topics":112,"view_count":23,"oss_zip_url":80,"oss_zip_packed_at":80,"status":16,"created_at":120,"updated_at":121,"faqs":122,"releases":152},2491,"rekog-labs\u002FMCP-Nest","MCP-Nest","A NestJS module to effortlessly create Model Context Protocol (MCP) servers for exposing AI tools, resources, and prompts.","MCP-Nest 是一个专为 NestJS 框架设计的模块，旨在帮助开发者轻松构建基于模型上下文协议（MCP）的服务器。它的核心目标是让现有的 NestJS 应用能够无缝地向 AI 系统暴露工具、资源和提示词模板，从而打通传统后端服务与大语言模型之间的连接壁垒。\n\n对于正在使用 NestJS 构建企业级应用的开发者而言，MCP-Nest 解决了将业务逻辑转化为 AI 可调用的标准化接口的难题。你无需重写代码或学习全新的架构模式，只需通过熟悉的装饰器和依赖注入机制，即可将现有的 Service 方法快速封装为 MCP 工具。这不仅降低了开发门槛，还确保了代码的可维护性和复用性。\n\n在技术特性上，MCP-Nest 展现了强大的灵活性与安全性。它支持 HTTP+SSE、Streamable HTTP 和 STDIO 多种传输协议，适应不同的部署环境。借助 Zod 库，它能自动处理参数验证，并支持细粒度的权限控制及 OAuth 认证，甚至集成了内置或外部的授权服务器以保障数据安全。此外，它还允许开发者访问完整的请求上下文，实现更复杂的交互逻辑。\n\nMCP-Nest 非常适合后端工程师、全栈开发","MCP-Nest 是一个专为 NestJS 框架设计的模块，旨在帮助开发者轻松构建基于模型上下文协议（MCP）的服务器。它的核心目标是让现有的 NestJS 应用能够无缝地向 AI 系统暴露工具、资源和提示词模板，从而打通传统后端服务与大语言模型之间的连接壁垒。\n\n对于正在使用 NestJS 构建企业级应用的开发者而言，MCP-Nest 解决了将业务逻辑转化为 AI 可调用的标准化接口的难题。你无需重写代码或学习全新的架构模式，只需通过熟悉的装饰器和依赖注入机制，即可将现有的 Service 方法快速封装为 MCP 工具。这不仅降低了开发门槛，还确保了代码的可维护性和复用性。\n\n在技术特性上，MCP-Nest 展现了强大的灵活性与安全性。它支持 HTTP+SSE、Streamable HTTP 和 STDIO 多种传输协议，适应不同的部署环境。借助 Zod 库，它能自动处理参数验证，并支持细粒度的权限控制及 OAuth 认证，甚至集成了内置或外部的授权服务器以保障数据安全。此外，它还允许开发者访问完整的请求上下文，实现更复杂的交互逻辑。\n\nMCP-Nest 非常适合后端工程师、全栈开发者以及希望将现有业务系统接入 AI Agent 生态的技术团队。如果你正计划开发支持 ChatGPT 插件的应用，或希望构建安全、规范的企业级 AI 中间件，MCP-Nest 提供了一个成熟且高效的解决方案，让你能专注于业务创新，而非底层协议的实现细节。","# NestJS MCP Server Module\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frekog-labs_MCP-Nest_readme_88941f8da897.png\" height=\"200\">\n\n[![CI][ci-image]][ci-url]\n[![Code Coverage][code-coverage-image]][code-coverage-url]\n[![NPM Version][npm-version-image]][npm-url]\n[![NPM Downloads][npm-downloads-image]][npm-url]\n[![NPM License][npm-license-image]][npm-url]\n\n\u003C\u002Fdiv>\n\nA NestJS module to effortlessly expose tools, resources, and prompts for AI, from your NestJS applications using the **Model Context Protocol (MCP)**.\n\nWith `@rekog\u002Fmcp-nest` you define tools, resources, and prompts in a way that's familiar in NestJS and leverage the full power of dependency injection to utilize your existing codebase in building complex enterprise ready MCP servers.\n\n## Features\n\n- 🚀 **[Multi-Transport Support](docs\u002Fserver-examples.md#multiple-transport-types)**: HTTP+SSE, Streamable HTTP, and STDIO\n- 🔧 **[Tools](docs\u002Ftools.md)**: Expose NestJS methods as MCP tools with automatic discovery and Zod validation\n  - 🛠️ **[Elicitation](docs\u002Ftools.md#interactive-tool-calls)**: Interactive tool calls with user input elicitation\n  - 🌐 **[HTTP Request Access](docs\u002Ftools.md#understanding-tool-method-parameters)**: Full access to request context within MCP handlers\n  - 🔐 **[Per-Tool Authorization](docs\u002Fper-tool-authorization.md)**: Implement fine-grained authorization for tools\n- 📁 **[Resources](docs\u002Fresources.md)**: Serve content and data through MCP resource system\n- 📚 **[Resource Templates](docs\u002Fresource-templates.md)**: Dynamic resources with parameterized URIs\n- 💬 **[Prompts](docs\u002Fprompts.md)**: Define reusable prompt templates for AI interactions\n- 🔐 **[Guard-based Authentication](docs\u002Fserver-examples.md#server-with-authentication)**: Guard-based security with OAuth support\n- 🏠 **[Built-in Authorization Server](docs\u002Fbuilt-in-authorization-server.md)** — Using the built-in Authorization Server for easy setups. **(Beta)**\n- 🌐 **[External Authorization Server](docs\u002Fexternal-authorization-server\u002FREADME.md)** — Securing your MCP server with an external authorization server (Keycloak, Auth0, etc).\n- 💉 **[Dependency Injection](docs\u002Fdependency-injection.md)**: Leverage NestJS DI system throughout MCP components\n- 🔍 **[Server mutation and instrumentation](docs\u002Fserver-mutation.md)** — Mutate the underlying mcp server for custom logic or instrumentation purposes.\n\n**Are you interested to build ChatGPT widgets (with the OpenAI SDK) or MCP apps?**\nFind out how to do that with `@rekog\u002FMCP-Nest` in this repository [MCP-Nest-Samples](https:\u002F\u002Fgithub.com\u002Frinormaloku\u002FMCP-Nest-Samples)\n\n\n> [!TIP]\n> You can easily learn about this package using the `chat` tab in [Context7](https:\u002F\u002Fcontext7.com\u002Frekog-labs\u002Fmcp-nest?tab=chat). Better yet, connect the [Context7 MCP server](https:\u002F\u002Fgithub.com\u002Fupstash\u002Fcontext7#installation) to allow your AI agents to access the documentation and implement MCP-Nest for you.\n\n## Installation\n\n```bash\nnpm install @rekog\u002Fmcp-nest @modelcontextprotocol\u002Fsdk zod@^4\n```\n\n### Optional dependencies\n\nIf you use the built-in authorization server with the TypeORM store, install the following optional peer dependencies:\n\n```bash\nnpm install @nestjs\u002Ftypeorm typeorm\n```\n\n## Quick Start\n\n```typescript\n\u002F\u002F app.module.ts\nimport { Module } from '@nestjs\u002Fcommon';\nimport { McpModule } from '@rekog\u002Fmcp-nest';\nimport { GreetingTool } from '.\u002Fgreeting.tool';\n\n@Module({\n  imports: [\n    McpModule.forRoot({\n      name: 'my-mcp-server',\n      version: '1.0.0',\n    }),\n  ],\n  providers: [GreetingTool],\n})\nexport class AppModule {}\n```\n\n```typescript\n\u002F\u002F greeting.tool.ts\nimport { Injectable } from '@nestjs\u002Fcommon';\nimport { Tool, Context } from '@rekog\u002Fmcp-nest';\nimport { z } from 'zod';\n\n@Injectable()\nexport class GreetingTool {\n  @Tool({\n    name: 'greeting-tool',\n    description: 'Returns a greeting with progress updates',\n    parameters: z.object({\n      name: z.string().default('World'),\n    }),\n  })\n  async sayHello({ name }, context: Context) {\n    await context.reportProgress({ progress: 50, total: 100 });\n    return `Hello, ${name}!`;\n  }\n}\n```\n\n## Documentation\n\n- **[Tools Guide](docs\u002Ftools.md)** - Define and expose NestJS methods as MCP tools\n- **[Discovery and Registration of Tools](docs\u002Ftool-discovery-and-registration.md)** - Automatic discovery and manual registration of tools\n- **[Dynamic Capabilities Guide](docs\u002Fdynamic-capabilities.md)** - Register tools, resources, and prompts programmatically at runtime\n- **[Resources Guide](docs\u002Fresources.md)** - Serve static and dynamic content\n- **[Resource Templates Guide](docs\u002Fresource-templates.md)** - Create parameterized resources\n- **[Prompts Guide](docs\u002Fprompts.md)** - Build reusable prompt templates\n- **[Built-in Authorization Server](docs\u002Fbuilt-in-authorization-server.md)** - Secure your MCP server with built-in OAuth\n- **[External Authorization Server](docs\u002Fexternal-authorization-server\u002FREADME.md)** - Securing your MCP server with an external authorization server (Keycloak, Auth0, etc)\n- **[Server examples](docs\u002Fserver-examples.md)** - MCP servers examples (Streamable HTTP, HTTP, and STDIO) and with Fastify support\n\n## Playground\n\nThe `playground` directory contains working examples for all features.\nRefer to [`playground\u002FREADME.md`](playground\u002FREADME.md) for details.\n\n\u003C!-- Badges -->\n[ci-url]: https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Factions\u002Fworkflows\u002Fpipeline.yml\n[ci-image]: https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Factions\u002Fworkflows\u002Fpipeline.yml\u002Fbadge.svg\n[npm-url]: https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@rekog\u002Fmcp-nest\n[npm-version-image]: https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@rekog\u002Fmcp-nest\n[npm-downloads-image]: https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fd18m\u002F@rekog\u002Fmcp-nest\n[npm-license-image]: https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fl\u002F@rekog\u002Fmcp-nest\n[code-coverage-url]: https:\u002F\u002Fcodecov.io\u002Fgh\u002Frekog-labs\u002Fmcp-nest\n[code-coverage-image]: https:\u002F\u002Fcodecov.io\u002Fgh\u002Frekog-labs\u002Fmcp-nest\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg\n","# NestJS MCP 服务器模块\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frekog-labs_MCP-Nest_readme_88941f8da897.png\" height=\"200\">\n\n[![CI][ci-image]][ci-url]\n[![代码覆盖率][code-coverage-image]][code-coverage-url]\n[![NPM 版本][npm-version-image]][npm-url]\n[![NPM 下载量][npm-downloads-image]][npm-url]\n[![NPM 许可证][npm-license-image]][npm-url]\n\n\u003C\u002Fdiv>\n\n一个 NestJS 模块，用于通过 **模型上下文协议 (MCP)**，轻松地从您的 NestJS 应用程序中公开 AI 工具、资源和提示。\n\n借助 `@rekog\u002Fmcp-nest`，您可以以 NestJS 熟悉的方式定义工具、资源和提示，并充分利用依赖注入的强大功能，将您现有的代码库应用于构建复杂的、企业级的 MCP 服务器。\n\n## 特性\n\n- 🚀 **[多传输支持](docs\u002Fserver-examples.md#multiple-transport-types)**：HTTP+SSE、流式 HTTP 和 STDIO\n- 🔧 **[工具](docs\u002Ftools.md)**：将 NestJS 方法作为 MCP 工具公开，具备自动发现和 Zod 验证功能\n  - 🛠️ **[引导式交互](docs\u002Ftools.md#interactive-tool-calls)**：通过用户输入引导的交互式工具调用\n  - 🌐 **[HTTP 请求访问](docs\u002Ftools.md#understanding-tool-method-parameters)**：在 MCP 处理程序中完全访问请求上下文\n  - 🔐 **[按工具授权](docs\u002Fper-tool-authorization.md)**：为工具实现细粒度的授权\n- 📁 **[资源](docs\u002Fresources.md)**：通过 MCP 资源系统提供内容和数据\n- 📚 **[资源模板](docs\u002Fresource-templates.md)**：使用参数化 URI 的动态资源\n- 💬 **[提示](docs\u002Fprompts.md)**：定义可重用的 AI 交互提示模板\n- 🔐 **[基于守卫的身份验证](docs\u002Fserver-examples.md#server-with-authentication)**：基于守卫的安全机制，支持 OAuth\n- 🏠 **[内置授权服务器](docs\u002Fbuilt-in-authorization-server.md)** — 使用内置授权服务器进行简单部署。（测试版）\n- 🌐 **[外部授权服务器](docs\u002Fexternal-authorization-server\u002FREADME.md)** — 使用外部授权服务器（Keycloak、Auth0 等）保护您的 MCP 服务器。\n- 💉 **[依赖注入](docs\u002Fdependency-injection.md)**：在整个 MCP 组件中利用 NestJS 的依赖注入系统\n- 🔍 **[服务器变更与监控](docs\u002Fserver-mutation.md)** — 修改底层 MCP 服务器以实现自定义逻辑或监控目的。\n\n**您是否有兴趣构建 ChatGPT 小部件（使用 OpenAI SDK）或 MCP 应用程序？**\n请参阅此仓库 [MCP-Nest-Samples](https:\u002F\u002Fgithub.com\u002Frinormaloku\u002FMCP-Nest-Samples)，了解如何使用 `@rekog\u002FMCP-Nest` 实现这一目标。\n\n\n> [!TIP]\n> 您可以使用 [Context7](https:\u002F\u002Fcontext7.com\u002Frekog-labs\u002Fmcp-nest?tab=chat) 中的 `chat` 选项卡轻松了解本包。更好的是，连接 [Context7 MCP 服务器](https:\u002F\u002Fgithub.com\u002Fupstash\u002Fcontext7#installation)，让您的 AI 代理能够访问文档并为您实现 MCP-Nest。\n\n## 安装\n\n```bash\nnpm install @rekog\u002Fmcp-nest @modelcontextprotocol\u002Fsdk zod@^4\n```\n\n### 可选依赖项\n\n如果您使用内置授权服务器和 TypeORM 存储，请安装以下可选的对等依赖项：\n\n```bash\nnpm install @nestjs\u002Ftypeorm typeorm\n```\n\n## 快速入门\n\n```typescript\n\u002F\u002F app.module.ts\nimport { Module } from '@nestjs\u002Fcommon';\nimport { McpModule } from '@rekog\u002Fmcp-nest';\nimport { GreetingTool } from '.\u002Fgreeting.tool';\n\n@Module({\n  imports: [\n    McpModule.forRoot({\n      name: 'my-mcp-server',\n      version: '1.0.0',\n    }),\n  ],\n  providers: [GreetingTool],\n})\nexport class AppModule {}\n```\n\n```typescript\n\u002F\u002F greeting.tool.ts\nimport { Injectable } from '@nestjs\u002Fcommon';\nimport { Tool, Context } from '@rekog\u002Fmcp-nest';\nimport { z } from 'zod';\n\n@Injectable()\nexport class GreetingTool {\n  @Tool({\n    name: 'greeting-tool',\n    description: '返回带有进度更新的问候语',\n    parameters: z.object({\n      name: z.string().default('World'),\n    }),\n  })\n  async sayHello({ name }, context: Context) {\n    await context.reportProgress({ progress: 50, total: 100 });\n    return `Hello, ${name}!`;\n  }\n}\n```\n\n## 文档\n\n- **[工具指南](docs\u002Ftools.md)** — 定义并公开 NestJS 方法作为 MCP 工具\n- **[工具发现与注册](docs\u002Ftool-discovery-and-registration.md)** — 工具的自动发现与手动注册\n- **[动态能力指南](docs\u002Fdynamic-capabilities.md)** — 在运行时以编程方式注册工具、资源和提示\n- **[资源指南](docs\u002Fresources.md)** — 提供静态和动态内容\n- **[资源模板指南](docs\u002Fresource-templates.md)** — 创建参数化的资源\n- **[提示指南](docs\u002Fprompts.md)** — 构建可重用的提示模板\n- **[内置授权服务器](docs\u002Fbuilt-in-authorization-server.md)** — 使用内置 OAuth 保护您的 MCP 服务器\n- **[外部授权服务器](docs\u002Fexternal-authorization-server\u002FREADME.md)** — 使用外部授权服务器（Keycloak、Auth0 等）保护您的 MCP 服务器\n- **[服务器示例](docs\u002Fserver-examples.md)** — 包括流式 HTTP、HTTP 和 STDIO 示例，以及对 Fastify 的支持\n\n## 演示环境\n\n`playground` 目录包含所有功能的可运行示例。\n有关详细信息，请参阅 [`playground\u002FREADME.md`](playground\u002FREADME.md)。\n\n\u003C!-- 徽章 -->\n[ci-url]: https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Factions\u002Fworkflows\u002Fpipeline.yml\n[ci-image]: https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Factions\u002Fworkflows\u002Fpipeline.yml\u002Fbadge.svg\n[npm-url]: https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@rekog\u002Fmcp-nest\n[npm-version-image]: https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@rekog\u002Fmcp-nest\n[npm-downloads-image]: https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fd18m\u002F@rekog\u002Fmcp-nest\n[npm-license-image]: https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fl\u002F@rekog\u002Fmcp-nest\n[code-coverage-url]: https:\u002F\u002Fcodecov.io\u002Fgh\u002Frekog-labs\u002Fmcp-nest\n[code-coverage-image]: https:\u002F\u002Fcodecov.io\u002Fgh\u002Frekog-labs\u002Fmcp-nest\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg","# MCP-Nest 快速上手指南\n\nMCP-Nest 是一个 NestJS 模块，旨在帮助开发者利用 **模型上下文协议 (Model Context Protocol, MCP)**，轻松地将 NestJS 应用中的工具（Tools）、资源（Resources）和提示词（Prompts）暴露给 AI。它充分利用了 NestJS 的依赖注入特性，适合构建企业级 MCP 服务器。\n\n## 环境准备\n\n在开始之前，请确保你的开发环境满足以下要求：\n\n*   **Node.js**: 建议安装 LTS 版本。\n*   **NestJS**: 已有的 NestJS 项目或熟悉 NestJS 基础结构。\n*   **包管理器**: npm、yarn 或 pnpm。\n\n**前置依赖说明：**\n*   `zod`: 用于参数验证，必须安装版本 4 (`zod@^4`)。\n*   **可选依赖**: 如果你计划使用内置的授权服务器并配合 TypeORM 存储，还需要安装 `@nestjs\u002Ftypeorm` 和 `typeorm`。\n\n## 安装步骤\n\n在你的 NestJS 项目根目录下，运行以下命令安装核心依赖：\n\n```bash\nnpm install @rekog\u002Fmcp-nest @modelcontextprotocol\u002Fsdk zod@^4\n```\n\n*(可选) 如果使用内置授权服务器与 TypeORM：*\n\n```bash\nnpm install @nestjs\u002Ftypeorm typeorm\n```\n\n> **提示**：如果国内网络访问 npm 官方源较慢，建议使用淘宝镜像或其他国内加速源进行安装，例如：\n> `npm install @rekog\u002Fmcp-nest @modelcontextprotocol\u002Fsdk zod@^4 --registry=https:\u002F\u002Fregistry.npmmirror.com`\n\n## 基本使用\n\n以下是创建一个简单 MCP 服务器的最小化示例，包含模块配置和一个简单的问候工具。\n\n### 1. 定义 MCP 工具\n\n创建一个名为 `greeting.tool.ts` 的文件。使用 `@Tool` 装饰器将方法暴露为 MCP 工具，并使用 Zod 定义参数架构。\n\n```typescript\n\u002F\u002F greeting.tool.ts\nimport { Injectable } from '@nestjs\u002Fcommon';\nimport { Tool, Context } from '@rekog\u002Fmcp-nest';\nimport { z } from 'zod';\n\n@Injectable()\nexport class GreetingTool {\n  @Tool({\n    name: 'greeting-tool',\n    description: 'Returns a greeting with progress updates',\n    parameters: z.object({\n      name: z.string().default('World'),\n    }),\n  })\n  async sayHello({ name }, context: Context) {\n    \u002F\u002F 模拟进度报告\n    await context.reportProgress({ progress: 50, total: 100 });\n    return `Hello, ${name}!`;\n  }\n}\n```\n\n### 2. 配置 AppModule\n\n在 `app.module.ts` 中导入 `McpModule` 并进行初始化配置，同时将定义好的 Tool 添加为提供者。\n\n```typescript\n\u002F\u002F app.module.ts\nimport { Module } from '@nestjs\u002Fcommon';\nimport { McpModule } from '@rekog\u002Fmcp-nest';\nimport { GreetingTool } from '.\u002Fgreeting.tool';\n\n@Module({\n  imports: [\n    McpModule.forRoot({\n      name: 'my-mcp-server',\n      version: '1.0.0',\n    }),\n  ],\n  providers: [GreetingTool],\n})\nexport class AppModule {}\n```\n\n完成上述配置后，启动你的 NestJS 应用。MCP-Nest 会自动发现注册的 Tool，并根据配置的传输协议（如 STDIO、HTTP+SSE 等）暴露服务，供 AI 客户端调用。\n\n更多高级功能（如资源模板、提示词、权限控制等）请参考官方文档中的 [Tools Guide](docs\u002Ftools.md) 和 [Server examples](docs\u002Fserver-examples.md)。","某电商企业的后端团队正致力于将现有的 NestJS 订单管理系统升级为支持 AI 助手调用的智能服务，以便让客服 AI 能够实时查询订单状态并处理退款请求。\n\n### 没有 MCP-Nest 时\n- **重复开发成本高**：团队需要手动搭建独立的 MCP Server，重新编写 API 接口层来暴露业务逻辑，导致与现有 NestJS 代码严重割裂，维护两套相似逻辑。\n- **安全鉴权复杂**：难以复用现有的 Guard 鉴权机制，必须为 MCP 协议单独实现 OAuth 或 Token 验证流程，增加了安全漏洞风险及开发工作量。\n- **参数校验繁琐**：缺乏自动化的类型检查，开发者需手动解析和验证 AI 传入的参数，容易因格式错误导致服务崩溃，且无法利用 Zod 进行高效校验。\n- **依赖注入失效**：无法直接使用 NestJS 强大的依赖注入（DI）系统，调用数据库服务或外部 API 时需重新实例化类，破坏了原有的架构优雅性。\n\n### 使用 MCP-Nest 后\n- **无缝集成现有代码**：只需在现有的 Service 或 Controller 上添加 `@Tool` 装饰器，即可直接将业务方法暴露为 MCP 工具，无需重写任何底层逻辑。\n- **原生安全支持**：直接复用 NestJS 的 Guard 机制实现细粒度的工具级授权，支持 OAuth 及内置\u002F外部认证服务器，确保只有合法请求能访问敏感数据。\n- **自动化参数处理**：结合 Zod  schema 自动完成参数定义与校验，AI 传入的数据会自动映射为 TypeScript 类型，大幅减少运行时错误。\n- **充分利用 DI 系统**：在 MCP 工具中直接注入 Repository 或其他 Service，像编写普通 NestJS 代码一样处理业务，保持了架构的一致性和可测试性。\n\nMCP-Nest 的核心价值在于让开发者无需离开熟悉的 NestJS 生态，即可通过声明式方式快速构建企业级、安全且标准的 AI 交互接口，极大降低了 AI 集成的门槛与维护成本。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frekog-labs_MCP-Nest_88941f8d.png","rekog-labs","Rekog Labs","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Frekog-labs_6abc61df.png","",null,"https:\u002F\u002Fgithub.com\u002Frekog-labs",[83,87,91],{"name":84,"color":85,"percentage":86},"TypeScript","#3178c6",95.5,{"name":88,"color":89,"percentage":90},"JavaScript","#f1e05a",4.3,{"name":92,"color":93,"percentage":94},"Shell","#89e051",0.2,615,104,"2026-04-02T08:42:51","MIT",4,"Linux, macOS, Windows","未说明",{"notes":103,"python":104,"dependencies":105},"这是一个基于 Node.js\u002FNestJS 的库，而非 Python 项目。主要依赖包括 @rekog\u002Fmcp-nest、@modelcontextprotocol\u002Fsdk 和 zod (版本需为 ^4)。如果需要使用内置授权服务器配合 TypeORM 存储，还需安装 @nestjs\u002Ftypeorm 和 typeorm 作为可选对等依赖。","不需要 Python",[106,107,108,109,110],"@rekog\u002Fmcp-nest","@modelcontextprotocol\u002Fsdk","zod@^4","@nestjs\u002Ftypeorm (可选)","typeorm (可选)",[26,13],[113,114,115,116,117,118,119],"llm","llms","mcp","modelcontextprotocol","nestjs","model-context-protocol","mcp-nest","2026-03-27T02:49:30.150509","2026-04-06T07:16:15.184141",[123,128,133,138,143,148],{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},11482,"为什么 MCP Inspector 或 Postman 客户端没有列出任何工具，并报错 \"Invalid literal value, expected \\\"object\\\"\"？","这通常是由于 Zod 版本不兼容导致的。请检查你的 `package.json`，如果使用的是 Zod v4（例如 `^4.0.5`），可能会引发此错误。解决方案是将 Zod 降级到 v3 版本（例如 `^3.0.5`）：\n\n```bash\nnpm install zod@^3.0.5\n```\n降级后，工具应该能正常被发现和列出。","https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fissues\u002F92",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},11483,"如何限制工具发现的范围，防止递归扫描导入不相关模块中的工具？","从版本 1.9.3 开始，可以通过配置 `scanSubtree` 选项来控制此行为。在 `McpModule.forRoot` 中设置 `scanSubtree: false` 可以限制扫描仅包含当前根模块中定义的提供者和控制器，而不会递归遍历整个依赖树。\n\n示例配置：\n```typescript\nMcpModule.forRoot({\n  name: \"my-mcp\",\n  version: \"1.0.0\",\n  scanSubtree: false, \u002F\u002F 禁用递归扫描\n  \u002F\u002F ...其他配置\n})\n```","https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fissues\u002F151",{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},11484,"如何在非根模块中使用 `McpModule.forFeature` 进行动态工具注册，同时避免依赖注入错误？","在非根模块中使用 `forFeature` 时，如果遇到 `UnknownDependenciesException`（例如无法解析 `McpRegistryService`），建议将 MCP 服务器配置分离到其独立的模块中。确保 `McpModule.forRoot` 在根模块或共享模块中正确初始化，而在功能模块中使用 `forFeature` 时，注意依赖关系的隔离。根据社区反馈，将服务器逻辑分离到独立模块可以避免此类依赖问题，且能与自动发现机制共存。","https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fissues\u002F183",{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},11485,"是否支持异步配置（例如使用 `@nestjs\u002Fconfig` 加载环境变量）？","是的，现在支持异步配置。你可以使用 `forRootAsync` 方法。需要注意的是，使用异步配置时通常需要配合自定义控制器。\n\n示例代码：\n```typescript\nMcpModule.forRootAsync({\n  useFactory: async (configService: ConfigService) => {\n    return {\n      name: configService.get\u003Cstring>('MCP_NAME'),\n      version: configService.get\u003Cstring>('MCP_VERSION'),\n      \u002F\u002F 其他配置\n    };\n  },\n  inject: [ConfigService],\n});\n```\n具体实现可参考官方示例中的 `advanced-server` 分支。注意：目前 `McpAuthModule` 可能尚不支持异步配置。","https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fissues\u002F105",{"id":144,"question_zh":145,"answer_zh":146,"source_url":147},11486,"如何在单个 NestJS 应用中运行多个独立的 MCP 服务器？","虽然可以在一个 Nest 实例中托管多个 MCP 服务器（例如通过不同的端点路径），但默认情况下它们可能会共享工具注册表，导致所有服务器都宣布所有工具。为了实现隔离，建议：\n1. 为每个服务器创建独立的模块。\n2. 使用 `scanSubtree: false` 选项（v1.9.3+）来限制每个服务器只扫描其直接关联的模块，防止工具泄露到其他服务器。\n3. 确保每个 `McpModule.forRoot` 调用或配置针对特定的服务器实例进行隔离。","https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fissues\u002F69",{"id":149,"question_zh":150,"answer_zh":151,"source_url":132},11487,"有没有更直观的方式来定义 MCP 工具，类似于 NestJS 的 HTTP 控制器？","除了标准的 Service 注入方式，社区讨论了一种基于装饰器的方法，使其更像 HTTP 控制器。虽然这可能不是库的默认唯一方式，但你可以采用类似以下的结构来组织代码，以提高可读性：\n\n```typescript\n@McpController('my-server') \u002F\u002F 类似于 @Controller()\nexport class UserTools {\n  @Tool()\n  async getUser() { \n    \u002F\u002F ...\n  }\n}\n```\n这种方式旨在让不同功能模块的工具注册到特定的 MCP 服务器更加直观。请留意库的最新文档以确认推荐的最终实现模式，以避免破坏性变更。",[153,158,163,168,173,178,183,188,192,197,202,207,212,217,222,227,232,237,242,247],{"id":154,"version":155,"summary_zh":156,"released_at":157},61969,"v1.9.9","## 变更内容\n* 杂项（开发依赖）：由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F196 中将 handlebars 从 4.7.8 升级至 4.7.9\n\n## 新贡献者\n* @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F196 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.9.8...v1.9.9","2026-03-29T11:17:28",{"id":159,"version":160,"summary_zh":161,"released_at":162},61970,"v1.9.8","## 变更内容\n* 修复（工具守卫）：由 @freakness 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F192 中实现，将请求体和参数传递给守卫的执行上下文。\n\n## 新贡献者\n* @freakness 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F192 中完成了首次贡献。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.9.7...v1.9.8","2026-03-19T06:14:16",{"id":164,"version":165,"summary_zh":166,"released_at":167},61971,"v1.9.7","## 变更内容\n* chore：为动态能力的功能模块添加了测试和文档。由 @gotenxds 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F185 中完成。\n* 添加元数据支持，由 @rinormaloku 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F187 中完成。\n* fix(tools)：在 formatToolResult 中使用经过验证的数据来处理 structuredContent，由 @ropiteaux 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F189 中完成。\n\n## 新贡献者\n* @ropiteaux 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F189 中完成了首次贡献。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.9.6...v1.9.7","2026-03-11T09:45:20",{"id":169,"version":170,"summary_zh":171,"released_at":172},61972,"v1.9.6","修复 stdio 传输中的 bug","2026-02-26T06:38:57",{"id":174,"version":175,"summary_zh":176,"released_at":177},61973,"v1.9.5","## 变更内容\n* 功能：@gotenxds 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F182 中添加了动态资源提示生成器。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.9.4...v1.9.5","2026-02-26T04:30:03",{"id":179,"version":180,"summary_zh":181,"released_at":182},61974,"v1.9.4","## 变更内容\n* 功能新增：通过 @gotenxds 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F178 中添加了异常过滤器支持。\n* 为工具定义添加 `@Guards`，以使用 NestJS 的守卫来控制可见性和访问权限。由 @mm-zacharydavison 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F150 中完成。\n* 调整消息和可变参数的位置，由 @Skylli202 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F181 中完成。\n\n## 新贡献者\n* @mm-zacharydavison 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F150 中完成了首次贡献。\n* @Skylli202 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F181 中完成了首次贡献。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.9.3...v1.9.4","2026-02-18T06:13:07",{"id":184,"version":185,"summary_zh":186,"released_at":187},61975,"v1.9.3","## 变更内容\n\n### 新特性\n* **模块化工具注册** (#166) - 使用 `McpModule.forFeature()` 将来自独立功能模块的工具注册到特定的 MCP 服务器，从而实现更好的代码组织。详情请参阅 [docs\u002Ftool-discovery-and-registration.md](docs\u002Ftool-discovery-and-registration.md)。\n* **动态工具注册** (#169) - 使用 `McpToolBuilder` 在运行时以编程方式注册 MCP 工具，非常适合基于数据库的工具、插件或动态模式生成。详情请参阅 [docs\u002Fdynamic-tools.md](docs\u002Fdynamic-tools.md)。\n* **MCP 服务器变异函数** (#162) - 通过自定义变异器扩展服务器行为，用于监控、中间件或框架集成（例如 Sentry）。详情请参阅 [docs\u002Fserver-mutation.md](docs\u002Fserver-mutation.md)。\n\n### Bug 修复\n* @ArcherGu 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F158 中改进了 zod 与 `toJsonScheme` 的兼容性。\n* @ArcherGu 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F163 中更新了 README 中的文档路径。\n* @rinormaloku 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F164 中确保路径参数和查询参数对资源可用。\n* bug：增强工具授权以支持未认证访问…，由 @rinormaloku 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F165 中修复。\n* 根据 MCP 规范进行工具参数验证，由 @rinormaloku 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F170 中完成。\n\n### 生活质量提升\n* @rinormaloku 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F160 中使用 Bun 运行测试，将测试时间缩短至 10 秒以下。\n\n\n## 新贡献者\n* @gotenxds 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F162 中做出了首次贡献。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.9.0...v1.9.3","2026-02-01T08:24:49",{"id":189,"version":190,"summary_zh":80,"released_at":191},61976,"v1.9.3-alpha.3","2026-01-18T00:50:24",{"id":193,"version":194,"summary_zh":195,"released_at":196},61977,"v1.9.0","## ⚠️ 重大变更\n\n### 作用域内工具发现\n\n工具发现现在仅限于**本地模块作用域**。此前，导入模块中的工具会以递归方式被发现；但为了确保更好的隔离性和可预测性，这一行为已不再适用。\n\n* **影响：** 如果您依赖 `McpNest` 自动查找导入模块内的工具，这些工具将不再被注册。\n* **需采取的措施：** 您必须显式地将工具提供者添加到配置了 `McpNest` 的模块中，或者在 NestJS 提供者作用域内正确地导出\u002F导入它们。\n\n**示例：**\n\n```typescript\n@Module({\n  providers: [ToolsABC],\n})\nclass ModuleABC {}\n\n@Module({\n  imports: [\n    ModuleABC,\n    McpModule.forRoot({...});\n  ],\n  providers: [\n    ToolsXYZ, \n    ToolsABC \u002F\u002F \u003C--- 显式在此处添加 ToolsABC，以使其对 ModuleXYZ 的 MCP 服务器可用\n  ],\n})\nclass ModuleXYZ {}\n```\n\n*参考：#154，作者 @rinormaloku*\n\n---\n\n## 🚀 新特性与改进\n\n* **按工具授权：** 增加了针对单个工具级别的细粒度授权支持。#137\n* **元数据支持：** * 向工具暴露了 `_meta` 字段。#126\n* 为 `Resource` 和 `ResourceTemplate` 装饰器增加了 `_meta` 支持。#129\n\n\n* **可配置的日志记录：** 现在可以为 MCP 模块设置自定义日志级别。#155\n* **Zod 升级：** 添加了对 **Zod v4** 的支持。#156\n* **减少 Token 使用：** 实现了 JSON 压缩，以减少 Token 的使用量。#131\n\n## 🐞 错误修复\n\n* **认证隔离：** 修复了在同时运行多个服务器实例时，`McpAuthModule` 配置隔离方面的问题。#139\n\n---\n\n## 🏗️ 新贡献者\n\n热烈欢迎我们的新晋贡献者！\n\n* **@jurrchen** 在 #126 中完成了首次贡献。\n* **@ArcherGu** 在 #131 中完成了首次贡献。","2026-01-11T21:07:49",{"id":198,"version":199,"summary_zh":200,"released_at":201},61978,"v1.8.3","## 变更内容\n* 功能：新增 Azure AD OAuth 提供者支持，由 @eduoncode 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F113 中实现\n* 功能：使 TypeORM 成为可选配置，由 @rinormaloku 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F116 中实现\n* 功能：增强 JWT 配置，支持刷新令牌，并扩展…，由 @rinormaloku 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F122 中实现\n\n## 新贡献者\n* @eduoncode 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F113 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.8.1...v1.8.3","2025-09-13T12:06:16",{"id":203,"version":204,"summary_zh":205,"released_at":206},61979,"v1.8.1","## 变更内容\n* 功能(mcp)：在 McpRegistryService 中暴露 getMcpModuleIds 方法，由 @adnaneh 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F104 中实现。\n* 对于会话 ID 未被服务器缓存的客户端，返回 404 错误，由 @rinormaloku 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F107 中实现。\n* 更新 server-examples.md 文件，由 @DinkoTontchev 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F108 中完成。\n* 支持自定义控制器，由 @rinormaloku 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F109 中实现。\n\n**注意**：请阅读 [高级 MCP 服务器](https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Ftree\u002Fmain\u002Fplayground\u002Fservers\u002Fadvanced)，了解如何通过定义自己的自定义控制器来处理高级用例。这对于添加拦截器、中间件等非常有用。\n\n## 新贡献者\n* @adnaneh 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F104 中完成了首次贡献。\n* @DinkoTontchev 在 https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F108 中完成了首次贡献。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.8.0...v1.8.1","2025-08-16T14:26:26",{"id":208,"version":209,"summary_zh":210,"released_at":211},61980,"v1.8.0","## What's Changed\r\n* added input schema validation by @rinormaloku in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F100\r\n* Enhance OAuth endpoints with resource and server metadata configurations by @rinormaloku in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F101\r\n* return the expected headers for token endpoint by @rinormaloku in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F102\r\n* hardened the data layer of the MCP authorization package.\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.7.1...v1.8.0","2025-08-10T22:00:22",{"id":213,"version":214,"summary_zh":215,"released_at":216},61981,"v1.7.1","Fix auth flow to propagate resource and scope\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.7.0...v1.7.1","2025-07-29T09:42:07",{"id":218,"version":219,"summary_zh":220,"released_at":221},61982,"v1.7.0","## What's Changed\r\n* Implements MCP Authorization by @rinormaloku  in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F93 ([example](https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fblob\u002Fmain\u002Fdocs\u002Fserver-examples.md#fastify-server))\r\n* Add support for ResourceTemplates by @freakness  in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F97 ([example](https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fblob\u002Fmain\u002Fdocs\u002Fserver-examples.md#fastify-server))\r\n* Add support for Fastify by @freakness in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F98 ([example](https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fblob\u002Fmain\u002Fdocs\u002Fserver-examples.md#fastify-server))\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.6.3...v1.7.0","2025-07-27T23:36:12",{"id":223,"version":224,"summary_zh":225,"released_at":226},61983,"v1.6.3","## What's Changed\r\n*  **Intelligent Tool Result Wrapping:** The `McpToolsHandler` now automatically formats tool results to be MCP-compliant, simplifying tool implementation. by @ddewaele in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F88\r\n* fix: resolve default outputSchema handling bug by @november11th in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F77\r\n* fix: set strict mode to true when resolving McpExecutorService for re… by @november11th in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F76\r\n* Fix mcp server resolution for SSE by @sportnak in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F78\r\n* Documents how to use MCP Authorization with mcp-nest by @rinormaloku in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F81\r\n* Allowing to bring back globalPrefix by @janhommes in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F83\r\n* Update zod dependency version in package.json to use caret notation by @alxwrd-gelt in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F89\r\n\r\n\r\n## New Contributors\r\n* @november11th made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F76\r\n* @sportnak made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F78\r\n* @janhommes made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F83\r\n* @alxwrd-gelt made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F89\r\n* @ddewaele made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F88\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.6.0...v1.6.3","2025-07-17T04:56:26",{"id":228,"version":229,"summary_zh":230,"released_at":231},61984,"v1.6.0","## What's Changed\r\n* feat(tool): add outputSchema support to Tool decorator and related handlers by @luannhq in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F59\r\n* Support for Tool Annotations by @rinormaloku in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F63\r\n* Respect `app.setGlobalPrefix()` instead of custom prop by @gurisko in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F67\r\n* Scope discovery to subtree of module that imports McpServer by @david-sabata in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F73\r\n* [Fix resource capabilities handling in buildMcpCapabilities function](https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcommit\u002F15ba4780862e8abec26b67c53efa49dae71ac7a5)\r\n\r\n## New Contributors\r\n* @luannhq made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F59\r\n* @haruelrovix made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F66\r\n* @gurisko made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F67\r\n* @david-sabata made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F73\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.5.2...v1.6.0","2025-06-15T07:53:18",{"id":233,"version":234,"summary_zh":235,"released_at":236},61985,"v1.5.2","## What's Changed\r\n\r\n* Add zod-to-json-schema to peer dependencies by @jshao-brex in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F51\r\n* Honor globalApiPrefix in Streamable HTTP Controller by @jshao-brex in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F52\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.5.1...v1.5.2","2025-05-12T09:58:31",{"id":238,"version":239,"summary_zh":240,"released_at":241},61986,"v1.5.1","## What's Changed\r\n* Pass `sessionIdGenerator` as `undefined` for stateless mode by @chiragjn in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F46\r\n* Add zod to peer dependency by @jshao-brex in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F48\r\n* add mcpServer and mcpRequest to context by @lp6moon in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F45\r\n\r\n## New Contributors\r\n* @chiragjn made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F46\r\n* @jestersimpps made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F47\r\n* @jshao-brex made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F48\r\n* @lp6moon made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F45\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.5.0...v1.5.1","2025-05-03T14:47:12",{"id":243,"version":244,"summary_zh":245,"released_at":246},61987,"v1.5.0","## What's Changed\r\n* Adds support for stateless mode by @rinormaloku in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F37, https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F40\r\n* Adds support for stdio MCP Servers by @raphaelkieling in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F38\r\n* using methodName as default name by @Diluka in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F42\r\n\r\n## New Contributors\r\n* @Diluka made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F42\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.4.0...v1.5.0","2025-04-26T06:41:03",{"id":248,"version":249,"summary_zh":250,"released_at":251},61988,"v1.4.0","## What's Changed\r\n* feat: adding prompt support by @raphaelkieling in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F17\r\n* Fix: Set default parameters for Tool decorator if undefined by @gylove1994 in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F19\r\n* Fix: Remove potential double slashes from the path by @gylove1994 in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F21\r\n* fix(sse): implement ping mechanism to prevent connection timeouts by @davidsuarezcdo in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F24\r\n* adds support for streamable HTTP by @rinormaloku in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F27\r\n* feat: adding support for version neutral by @raphaelkieling in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F29\r\n* chore: add SSE ping to README by @mattgrothmove in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F28\r\n* feat: add custom decorators support by @gylove1994 in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F32\r\n* updated mcp sdk to 1.10.0 and prepared for 1.4.0 release by @rinormaloku in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F35\r\n\r\n## New Contributors\r\n* @gylove1994 made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F19\r\n* @davidsuarezcdo made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F24\r\n* @mattgrothmove made their first contribution in https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fpull\u002F28\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Frekog-labs\u002FMCP-Nest\u002Fcompare\u002Fv1.3.1...v1.4.0","2025-04-17T22:47:10"]