drio
Open app

NATS MCP Server

Source

MCP server for NATS messaging system using NATS CLI - enabling AI agents to interact with NATS messaging

Catalog onlyCatalog onlySTDIO

Overview

NATS MCP Server is a Model Context Protocol (MCP) server that enables AI agents to interact with the NATS messaging system using the NATS CLI.

To use the NATS MCP Server, install the NATS CLI, then install the MCP server via npm or by cloning the repository. Configure the server using environment variables and utilize the provided tools to publish, subscribe, or request messages.

  • Publish messages with advanced options (headers, templates, reply subjects) - Subscribe to subjects with configurable timeouts and message counts - Request-reply pattern support with headers - Full NATS CLI integration - Robust error handling and cleanup
  1. Enabling AI agents to communicate through a messaging system.
  2. Building real-time applications that require message publishing and subscribing.
  3. Facilitating complex workflows that involve multiple services communicating via messages.

Add to your AI client

Use these steps to connect NATS MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "nats-mcp-server-bmorphism": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-nats-mcp-server-bmorphism"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "nats-mcp-server-bmorphism": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-nats-mcp-server-bmorphism"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "nats-mcp-server-bmorphism": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-nats-mcp-server-bmorphism"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "nats-mcp-server-bmorphism": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-nats-mcp-server-bmorphism"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "nats-mcp-server-bmorphism": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-nats-mcp-server-bmorphism"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "nats-mcp-server-bmorphism": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-nats-mcp-server-bmorphism"
      ]
    }
  }
}

FAQ

What is the minimum requirement to run NATS MCP Server?

Node.js version 14.0.0 or higher and NATS CLI are required.

Is there a graphical interface for NATS MCP Server?

No, it operates through the command line interface.

Can I contribute to the NATS MCP Server project?

Yes! Contributions are welcome; please follow the contributing guidelines in the repository.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":1116,"uuid":"367230fd-6a54-4610-90fb-e616bd88dca4","name":"nats-mcp-server","title":"NATS MCP Server","description":"MCP server for NATS messaging system using NATS CLI - enabling AI agents to interact with NATS messaging","avatar_url":"https://avatars.githubusercontent.com/u/1236584?v=4","created_at":"2025-01-28T02:32:37.789+00:00","updated_at":"2025-02-23T07:12:47.84+00:00","status":"created","author_name":"bmorphism","author_avatar_url":"https://avatars.githubusercontent.com/u/1236584?v=4","tags":"nats,mcp,messaging,ai-agents","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/bmorphism/nats-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":null,"user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]