NATS MCP Server

by bmorphism

376 downloads
Not rated
GitHub

About

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

Details

Author
bmorphism
Downloads
376
Categories
Other, Communication, AI

- Publish messages with headers, templates, and reply subjects
- Subscribe to subjects with configurable timeouts and message counts
- Request-reply pattern support with optional headers
- Go template functions for dynamic message content
- Full NATS CLI integration and robust error handling

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name NATS MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via npm (npm install @modelcontextprotocol/nats-mcp-server) or build from source. Configure with the NATS_URL environment variable (default nats://localhost:4222). Add the server to your MCP client’s configuration (e.g., Cline or Claude Desktop) and then invoke its tools: publish, subscribe, or request.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "nats mcp server": {
            "nats": {
                "command": "node",
                "args": [
                    "/path/to/nats-mcp-server/build/index.js"
                ],
                "env": {
                    "NATS_URL": "nats://localhost:4222"
                }
            }
        }
    }
}

McpServers

{
    "nats": {
        "command": "node",
        "args": [
            "/path/to/nats-mcp-server/build/index.js"
        ],
        "env": {
            "NATS_URL": "nats://localhost:4222"
        }
    }
}

NATS MCP Server

An MCP (Model Context Protocol) server that provides access to NATS, a cloud native messaging system, through the NATS CLI.

Features

- 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
- Error handling and cleanup

Requirements

- Node.js >= 14.0.0
- NATS CLI (nats)

Installing NATS CLI

macOS

Using Homebrew:

brew tap nats-io/nats-tools
brew install nats-io/nats-tools/nats

Linux

Using snap:

snap install nats

Using apt (Debian/Ubuntu):
```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.