Labsco
sinadarbouy logo

NATS

β˜… 47

from sinadarbouy

An MCP server for integrating with the NATS messaging system.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

mcp-nats

Install MCP Server <img alt="Install in VS Code" src="https://img.shields.io/badge/Install%20in%20VS%20Code-007ACC?style=for-the-badge&logo=visualstudiocode&logoColor=white&labelColor=007ACC&color=white&logoWidth=24&logoPadding=8">

A Model Context Protocol (MCP) server for NATS messaging system integration

MCP Review Certified

This MCP server is certified by MCP Review.

Overview

This project provides a Model Context Protocol (MCP) server for NATS, enabling AI models and applications to interact with NATS messaging systems through a standardized interface. It exposes a comprehensive set of tools for interacting with NATS servers, making it ideal for AI-powered applications that need to work with messaging systems.

What is MCP?

The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). This server implements the MCP specification to provide NATS messaging capabilities to LLMs and AI applications, allowing them to:

  • Interact with NATS messaging systems in a standardized way
  • Safely inspect and monitor NATS servers and streams
  • Perform read-only operations through a secure interface
  • Integrate with other MCP-compatible clients and hosts

Features

  • Server Management (Read-only Operations)
    • List and inspect NATS servers
    • Server health monitoring and ping
    • Server information retrieval
    • Round-trip time (RTT) measurement
  • Stream Operations (Read-only Operations)
    • View and inspect NATS streams
    • Stream state and information queries
    • Message viewing and retrieval
    • Subject inspection
  • Object Store Operations
    • Create and manage object store buckets
    • Put and get files from object stores
    • List buckets and their contents
    • Delete objects and buckets
    • Watch buckets for changes
    • Seal buckets to prevent updates
  • Key-Value Operations
    • Create and manage KV buckets
    • Store and retrieve key-value pairs
    • Watch for KV updates
    • Delete keys and buckets
  • Publish Operations
    • Publish messages to NATS subjects
    • Support for different message formats
    • Asynchronous message publishing
  • Account Operations
    • View account information and metrics
    • Generate account reports (connections and statistics)
    • Create and restore account backups
    • Inspect TLS chain for connected servers
  • Multi-Account Support
    • Handle multiple NATS accounts simultaneously
    • Secure credential management
  • MCP Integration
    • Implements MCP server specification
    • Compatible with MCP clients like Claude Desktop
    • Standardized tool definitions for LLM interaction
    • Safe, read-only operations for AI interaction with NATS

Development

Prerequisites

  • Go 1.25+
  • Docker (optional)
  • NATS CLI
  • Understanding of MCP specification

Available Make Commands

Copy & paste β€” that's it
make help      # Print help message
make build     # Build the binary
make run       # Run in stdio mode
make run-sse   # Run with SSE transport
make lint      # Run linters

Testing with stdio Transport

For detailed instructions on how to test the MCP server using stdio transport, please refer to our Stdio Example Guide.

Resources