MCP Catalogs
Home

nestjs-mcp

by orbit-codes·11·Score 42

A NestJS integration for MCP that enables building MCP servers using dependency injection and decorators.

developer-toolsai-llm
1
Forks
0
Open issues
1 mo ago
Last commit
2d ago
Indexed

Overview

The nestjs-mcp package provides a seamless way to create MCP servers within the NestJS framework. It leverages NestJS's dependency injection system and decorator-based architecture to expose resources, tools, and prompts through the MCP protocol. The package supports both HTTP/SSE and stdio transports, making it flexible for different deployment scenarios.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Building MCP servers with NestJS's modular architecture
you:Exposing REST APIs as MCP resources and tools
you:Integrating existing NestJS applications with MCP
you:What NestJS versions are supported?
you:Can I use this with non-NestJS Node.js applications?

When to choose this

Choose this if you're already using NestJS and want to build MCP servers while leveraging dependency injection and decorator patterns.

When NOT to choose this

Avoid if you're not using NestJS or prefer a more lightweight MCP implementation without framework dependencies.

Tools this server exposes

1 tool extracted from the README
  • addadd(a: number, b: number): string

    Add two numbers together

Comparable tools

mcp-server@modelcontextprotocol/server-nodenexus-prisma

Installation

npm install @orbit-codes/nestjs-mcp @modelcontextprotocol/sdk zod

In your NestJS application:

import { Module } from '@nestjs/common';
import { MCPModule } from '@orbit-codes/nestjs-mcp';

@Module({
  imports: [
    MCPModule.register({
      name: 'MyMCPServer',
      version: '1.0.0',
      sseEndpoint: '/mcp/sse',
      messagesEndpoint: '/mcp/messages',
    }),
  ],
})
export class AppModule {}

For Claude Desktop, add to config.json:

{
  "mcpServers": {
    "nestjs-mcp": {
      "command": "node",
      "args": ["path/to/your/app.js"]
    }
  }
}

FAQ

What NestJS versions are supported?
The package is designed to work with modern NestJS versions. Check the package documentation for specific version compatibility.
Can I use this with non-NestJS Node.js applications?
While designed specifically for NestJS, the underlying MCP functionality could potentially be adapted for other Node.js frameworks, though this would require additional integration work.

Compare nestjs-mcp with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.