NATS MCP Server
@bmorphism
关于 NATS MCP Server
MCP server for NATS messaging system using NATS CLI - enabling AI agents to interact with NATS messaging
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"nats": {
"command": "node",
"args": [
"/path/to/nats-mcp-server/build/index.js"
],
"env": {
"NATS_URL": "nats://localhost:4222"
}
}
}
}工具
未检测到工具
工具是从 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
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.
其他 分类下的更多 MCP 服务器
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
Awesome-MCP-ZH
yzflyMCP 资源精选, MCP指南,Claude MCP,MCP Servers, MCP Clients
ghidraMCP
LaurieWiredMCP Server for Ghidra
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
XcodeBuildMCP
cameroncookeA Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
评论