NATS

v1.0.0Cloud Servicesstable

A Model Context Protocol (MCP) server for NATS messaging system integration

mcp-servernatsnats-io
Share:
45
Stars
0
Downloads
0
Weekly
0/5

What is NATS?

NATS is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) server for nats messaging system integration

A Model Context Protocol (MCP) server for NATS messaging system integration

This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A Model Context Protocol (MCP) server for NATS messaging sys

Use Cases

Integrate with NATS messaging system through MCP
Enable pub/sub and event-driven architectures for agents
sinadarbouy

Maintainer

LicenseApache-2.0
Languagego
Versionv1.0.0
UpdatedApr 12, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-nats

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use NATS

mcp-nats is a Go-based MCP server that exposes NATS messaging system operations to AI assistants, covering server health monitoring, JetStream stream inspection, object storage, key-value store management, and asynchronous message publishing. It supports multiple authentication methods (anonymous, username/password, and credential files) and multi-account configurations, making it suitable for both development environments and production NATS deployments. Developers and DevOps engineers can use it to let AI agents query stream state, inspect subjects, and manage NATS infrastructure through natural language.

Prerequisites

  • Go 1.20 or later (for building from source) OR Docker
  • A running NATS server (accessible via NATS URL, e.g., nats://localhost:4222)
  • NATS credentials or username/password if authentication is required
  • An MCP client such as Claude Desktop, VS Code, or Cursor
1

Install mcp-nats via Go

Install the mcp-nats binary directly using the Go toolchain. This places the binary in your GOPATH/bin.

go install github.com/sinadarbouy/mcp-nats/cmd/mcp-nats@latest
2

Verify the installation

Confirm the binary is installed and accessible on your PATH.

mcp-nats --help
3

Choose your authentication method

Set the appropriate environment variables based on your NATS server's authentication configuration. Use NATS_NO_AUTHENTICATION for local dev servers without auth.

# No authentication (local dev):
export NATS_URL=nats://localhost:4222
export NATS_NO_AUTHENTICATION=true

# Username/password:
export NATS_URL=nats://localhost:4222
export NATS_USER=myuser
export NATS_PASSWORD=mypassword
4

Configure Claude Desktop

Add the mcp-nats server to your claude_desktop_config.json using stdio transport for direct process communication.

{
  "mcpServers": {
    "nats": {
      "command": "mcp-nats",
      "args": ["--transport", "stdio"],
      "env": {
        "NATS_URL": "nats://localhost:4222",
        "NATS_NO_AUTHENTICATION": "true"
      }
    }
  }
}
5

Restart Claude Desktop

Fully quit and relaunch Claude Desktop to pick up the new NATS server configuration.

NATS Examples

Client configuration

Complete claude_desktop_config.json for mcp-nats with username/password authentication.

{
  "mcpServers": {
    "nats": {
      "command": "mcp-nats",
      "args": ["--transport", "stdio"],
      "env": {
        "NATS_URL": "nats://localhost:4222",
        "NATS_USER": "myuser",
        "NATS_PASSWORD": "mypassword"
      }
    }
  }
}

Prompts to try

Example prompts for monitoring and interacting with NATS infrastructure.

- "What is the health status of my NATS server?"
- "List all JetStream streams and their message counts"
- "Show me all subjects available on the orders stream"
- "Publish a message 'hello world' to the subject test.events"
- "Create a new key-value bucket called config-store"

Troubleshooting NATS

Connection refused to NATS server

Verify NATS_URL is correct and the NATS server is running. Test connectivity with 'nats server ping' using the NATS CLI. Ensure no firewall is blocking port 4222.

Authentication failed error on startup

Confirm NATS_USER and NATS_PASSWORD match the credentials configured on your NATS server. If using credential files, encode them in base64 and set NATS_<ACCOUNT>_CREDS accordingly.

mcp-nats binary not found after 'go install'

Ensure your GOPATH/bin directory is on your PATH. Run 'export PATH=$PATH:$(go env GOPATH)/bin' and add this line to your shell profile (~/.zshrc or ~/.bashrc).

Frequently Asked Questions about NATS

What is NATS?

NATS is a Model Context Protocol (MCP) server that model context protocol (mcp) server for nats messaging system integration It connects AI assistants to external tools and data sources through a standardized interface.

How do I install NATS?

Follow the installation instructions on the NATS GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with NATS?

NATS works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is NATS free to use?

Yes, NATS is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Cloud Services MCP Servers

Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-nats": { "command": "npx", "args": ["-y", "mcp-nats"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use NATS?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides