Skip to main content
Glama

NestJS MCP Server Module

by rekog-labs
MIT License
41,144
420
  • Apple
  • Linux

NestJS MCP Server Module

A NestJS module to effortlessly expose tools, resources, and prompts for AI, from your NestJS applications using the Model Context Protocol (MCP).

With @rekog/mcp-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.

Features

Installation

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

Quick Start

// app.module.ts import { Module } from '@nestjs/common'; import { McpModule } from '@rekog/mcp-nest'; import { GreetingTool } from './greeting.tool'; @Module({ imports: [ McpModule.forRoot({ name: 'my-mcp-server', version: '1.0.0', }), ], providers: [GreetingTool], }) export class AppModule {}
// greeting.tool.ts import { Injectable } from '@nestjs/common'; import { Tool, Context } from '@rekog/mcp-nest'; import { z } from 'zod'; @Injectable() export class GreetingTool { @Tool({ name: 'greeting-tool', description: 'Returns a greeting with progress updates', parameters: z.object({ name: z.string().default('World'), }), }) async sayHello({ name }, context: Context) { await context.reportProgress({ progress: 50, total: 100 }); return `Hello, ${name}!`; } }

Documentation

Playground

The playground directory contains working examples for all features. Refer to playground/README.md for details.

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Server-Sent Events トランスポートを備えた MCP サーバーとしてサービスを公開し、クライアントによるツールの検出と実行を容易にする NestJS モジュール。

  1. 特徴
    1. インストール
      1. クイックスタート
        1. 1. モジュールのインポート
        2. 2. ツールとリソースを定義する
      2. STDIO のクイックスタート
        1. APIエンドポイント
          1. ヒント
        2. 認証
          1. 1. ガードを作成する
          2. 2. ガードをつける
        3. 遊び場
          1. 構成

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              A demonstration server that implements the Model Context Protocol (MCP) SDK, providing tools and endpoints for server-sent events and message handling.
              Last updated -
              19
              10
              MIT License
            • -
              security
              F
              license
              -
              quality
              A server for Model Context Protocol (MCP) that uses Server-Sent Events (SSE) for streaming communication, enabling tools like the HackerNews API to be accessed through a secure HTTP+SSE transport.
              Last updated -
              23
            • -
              security
              A
              license
              -
              quality
              A TypeScript framework for building MCP servers with features for client sessions, authentication, image/audio content, and typed server events.
              Last updated -
              MIT License
            • -
              security
              F
              license
              -
              quality
              An MCP server that enables interaction with Nexmo's Messages API, allowing agents to send and manage messages across various channels via natural language commands.
              Last updated -

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/rekog-labs/MCP-Nest'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server