NATS is an MCP server that connects Model Context Protocol clients to the NATS messaging system, enabling large language models to interact with distributed messaging topologies. Distributed systems engineers, cloud architects, and developers use this server to observe, query, and manage NATS infrastructure through conversational AI interfaces. The server provides tools to inspect server health, measure round-trip times, and examine JetStream streams, subjects, and consumer states using read-only operations. Beyond basic messaging checks, it supports JetStream Object Store and Key-Value store operations, letting operators list buckets, fetch values, track modifications, and inspect configuration parameters directly from an AI client. It also supports publishing messages to NATS subjects asynchronously across multiple formats. With multi-account isolation, TLS certificate inspection, and flexible authentication methods—including base64-encoded account credentials, basic username-password pairs, and anonymous modes—the server integrates with environments ranging from local development containers to Kubernetes deployments. By exposing structured messaging primitives, it bridges AI tools with operational event streams without requiring manual command-line interventions.
Category: Cloud & Infrastructure
Tags: distributed-systems, message-queue, messaging, nats, pubsub
go install github.com/sinadarbouy/mcp-nats/cmd/mcp-nats@latest or build from source with go build -o mcp-nats ./cmd/mcp-nats. 2. Set the connection parameters using environment variables such as NATS_URL (for example, nats://localhost:4222), plus authentication settings like NATS_NO_AUTHENTICATION="true" or NATS_USER and NATS_PASSWORD. 3. Launch the server with your preferred transport, such as ./mcp-nats --transport streamable-http --address 0.0.0.0:8000. 4. Configure your MCP client. For Cursor, add the server to your mcpServers settings: json { "mcpServers": { "nats": { "env": { "NATS_URL": "nats://localhost:4222", "NATS_NO_AUTHENTICATION": "true" }, "url": "http://localhost:8000/mcp" } } } Alternatively, specify stdio as the transport argument when configuring client processes to run the local binary directly.Part of MCP Servers
You can install the server binary directly using Go with the command go install github.com/sinadarbouy/mcp-nats/cmd/mcp-nats@latest. Alternatively, you can clone the repository from source and run go build, deploy it to a Kubernetes cluster using the official Helm chart, or run it in a container image using Docker.
The server allows MCP clients to perform read-only inspections of NATS servers and JetStream streams, evaluate round-trip latency, publish asynchronous messages to subjects, and manage Key-Value stores. It also supports JetStream Object Store operations, multi-account handling, account reporting, and TLS certificate chain inspection.
Any client implementing the Model Context Protocol standard can connect to this server. It explicitly supports tools like Cursor and VS Code through remote streamable HTTP endpoints or standard input and output (stdio) process execution, as well as Claude Desktop and other compliant MCP hosts.
The server supports three authentication mechanisms: credentials-based authentication using base64-encoded NATS credentials files for multi-account isolation, standard user and password authentication via environment variables or command-line flags, and anonymous access for open local or test clusters.
Yes, the NATS MCP server is an open-source project hosted on GitHub. Users can freely inspect the Go source code, build customized binaries, or review Kubernetes Helm charts and Docker deployment configurations under its open-source license.