MCP-Nest  by rekog-labs

NestJS module for Model Context Protocol servers

Created 7 months ago
411 stars

Top 71.1% on SourcePulse

GitHubView on GitHub
Project Summary

This NestJS module simplifies the creation of Model Context Protocol (MCP) servers, enabling developers to expose AI tools, resources, and prompts from their existing NestJS applications. It targets developers building AI-powered applications who want to leverage NestJS's robust features like dependency injection and familiar patterns for managing AI functionalities.

How It Works

The module automatically discovers and registers tools, resources, and prompts defined using NestJS decorators (@Tool, @Resource). It leverages Zod for robust parameter validation and supports multiple transport types: Streamable HTTP, HTTP+SSE, and STDIO. This approach allows seamless integration with existing NestJS codebases and provides flexibility in how MCP servers are deployed and consumed.

Quick Start & Requirements

Install via npm:

npm install @rekog/mcp-nest @modelcontextprotocol/sdk zod

Refer to the official quick-start guide for detailed examples and setup.

Highlighted Details

  • Supports Streamable HTTP, HTTP+SSE, and STDIO transport types.
  • Automatic discovery and registration of tools, resources, and prompts.
  • Zod-based validation for tool parameters.
  • NestJS Guard integration for authentication and authorization.
  • Access to HTTP Request information within MCP Resources and Tools.

Maintenance & Community

The project is actively maintained by rekog-labs. Further community engagement details are not explicitly provided in the README.

Licensing & Compatibility

The module is released under the MIT license, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

Stateful mode for the Streamable HTTP transport requires a custom sessionIdGenerator if statelessMode is set to false. The README does not detail specific performance benchmarks or known compatibility issues with older NestJS versions.

Health Check
Last Commit

4 days ago

Responsiveness

1 day

Pull Requests (30d)
10
Issues (30d)
13
Star History
46 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.