NATS MCP Server
@bmorphism
About NATS MCP Server
MCP server for NATS messaging system using NATS CLI - enabling AI agents to interact with NATS messaging
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"nats": {
"command": "node",
"args": [
"/path/to/nats-mcp-server/build/index.js"
],
"env": {
"NATS_URL": "nats://localhost:4222"
}
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is NATS MCP Server?
NATS MCP Server is a Model Context Protocol server that provides access to NATS, a cloud-native messaging system, through the NATS CLI. It enables AI models to publish, subscribe to, and request-reply over NATS subjects.
How to use NATS MCP Server?
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.
Key features of NATS MCP Server
- 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
Use cases of NATS MCP Server
- AI assistants sending commands or events via NATS subjects
- Implementing request-reply service calls (e.g., asking a service for the time)
- Broadcasting messages to multiple subscribers with templates or headers
- Testing and debugging NATS messaging patterns from an MCP client
FAQ from NATS MCP Server
What are the required dependencies?
Node.js >= 14.0.0 and the NATS CLI (nats) installed on the system.
How do I install the NATS CLI?
Installation varies by OS: Homebrew on macOS (brew install nats), snap install nats on Linux, Chocolatey or Scoop on Windows, or build from source with Go.
How do I configure the NATS server URL?
Set the NATS_URL environment variable before starting the MCP server. Default is nats://localhost:4222.
What MCP tools does the server offer?
Three tools: publish (send messages with optional headers, templates, and reply subjects), subscribe (receive messages with timeout and count limits), and request (send a request and wait for a reply with optional headers).
Can I use templates in messages?
Yes. When template: true is set on publish, the message can use functions like {{Count}}, {{Time}}, {{Random min max}}, and others.
Frequently asked questions
What are the required dependencies?
Node.js >= 14.0.0 and the NATS CLI (`nats`) installed on the system.
How do I install the NATS CLI?
Installation varies by OS: Homebrew on macOS (`brew install nats`), `snap install nats` on Linux, Chocolatey or Scoop on Windows, or build from source with Go.
How do I configure the NATS server URL?
Set the `NATS_URL` environment variable before starting the MCP server. Default is `nats://localhost:4222`.
What MCP tools does the server offer?
Three tools: `publish` (send messages with optional headers, templates, and reply subjects), `subscribe` (receive messages with timeout and count limits), and `request` (send a request and wait for a reply with optional headers).
Can I use templates in messages?
Yes. When `template: true` is set on `publish`, the message can use functions like `{{Count}}`, `{{Time}}`, `{{Random min max}}`, and others.
Basic information
More Other MCP servers
Reactive Resume
amruthpillaiA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.

Figs, Relationship Expert
Figs O'Sullivan, LMFTCouples therapist Figs O'Sullivan (LMFT, 17 years, endorsed by Sue Johnson, creator of EFT) inside your AI. Ask relationship questions answered from his clinical writing, name the pattern in a fight, get a three-step rep
Inbox Zero AI
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.

Lemon.io
lemon-ioRequest dedicated senior developers to work on your project, write job descriptions, and prep technical interviews — all without leaving your Claude chat. Just describe what you need, and Lemon.io MCP does the rest. 1–3
Comments