MCP.so
登录

NATS MCP Server

@bmorphism

基本信息

分类

其他

传输方式

stdio

作者

bmorphism

关于 NATS MCP Server

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

NATS MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

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

NATS MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

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

常见问题

1

What are the required dependencies?

Node.js >= 14.0.0 and the NATS CLI (`nats`) installed on the system.

2

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.

3

How do I configure the NATS server URL?

Set the `NATS_URL` environment variable before starting the MCP server. Default is `nats://localhost:4222`.

4

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).

5

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.

评论

其他 分类下的更多 MCP 服务器