NATS
A Model Context Protocol (MCP) server for NATS messaging system integration
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
Maintainer
Works with
Installation
Manual Installation
npx mcp-natsConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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@latestVerify the installation
Confirm the binary is installed and accessible on your PATH.
mcp-nats --helpChoose 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=mypasswordConfigure 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"
}
}
}
}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.
NATS Alternatives — Similar Cloud Services Servers
Looking for alternatives to NATS? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
★ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
★ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
★ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
★ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
★ 26.7k本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
★ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
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.
Set Up NATS in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.