{"slug": "a-model-context-protocol-mcp-server-for-nats-messaging-system-integration", "title": "A Model Context Protocol (MCP) server for NATS messaging system integration", "summary": "Developer Sinadarbouy released mcp-nats, a Model Context Protocol (MCP) server that connects AI models and applications to NATS messaging systems through a standardized interface, certified by MCP Review. The Go 1.25-based server exposes tools for read-only NATS server and stream inspection, object store and key-value operations, message publishing, and multi-account support, and is compatible with MCP clients such as Claude Desktop. Tagged releases publish the ghcr.io/sinadarbouy/mcp-nats container image and sign the multi-arch index with Sigstore Cosign via keyless GitHub OIDC, with Helm chart version 0.1.4 installable from OCI.", "body_md": "A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for [NATS](https://nats.io/) messaging system integration\n\n**This MCP server is certified by [MCP Review](https://mcpreview.com/mcp-servers/sinadarbouy/mcp-nats).**\n\nThis 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.\n\nThe 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:\n\n- Interact with NATS messaging systems in a standardized way\n- Safely inspect and monitor NATS servers and streams\n- Perform read-only operations through a secure interface\n- Integrate with other MCP-compatible clients and hosts\n\n- Server Management (Read-only Operations)\n  - List and inspect NATS servers\n  - Server health monitoring and ping\n  - Server information retrieval\n  - Round-trip time (RTT) measurement\n- Stream Operations (Read-only Operations)\n  - View and inspect NATS streams\n  - Stream state and information queries\n  - Message viewing and retrieval\n  - Subject inspection\n- Object Store Operations\n  - Create and manage object store buckets\n  - Put and get files from object stores\n  - List buckets and their contents\n  - Delete objects and buckets\n  - Watch buckets for changes\n  - Seal buckets to prevent updates\n- Key-Value Operations\n  - Create and manage KV buckets\n  - Store and retrieve key-value pairs\n  - Watch for KV updates\n  - Delete keys and buckets\n- Publish Operations\n  - Publish messages to NATS subjects\n  - Support for different message formats\n  - Asynchronous message publishing\n- Account Operations\n  - View account information and metrics\n  - Generate account reports (connections and statistics)\n  - Create and restore account backups\n  - Inspect TLS chain for connected servers\n- Multi-Account Support\n  - Handle multiple NATS accounts simultaneously\n  - Secure credential management\n- MCP Integration\n  - Implements MCP server specification\n  - Compatible with MCP clients like Claude Desktop\n  - Standardized tool definitions for LLM interaction\n  - Safe, read-only operations for AI interaction with NATS\n\n- Go 1.25 or later\n- NATS server (accessible via URL)\n- NATS credentials for authentication\n- MCP-compatible client (e.g., Claude Desktop, or other MCP clients)\n\n```\ngo install github.com/sinadarbouy/mcp-nats/cmd/mcp-nats@latest\ngit clone https://github.com/sinadarbouy/mcp-nats.git\ncd mcp-nats\ngo build -o mcp-nats ./cmd/mcp-nats\n```\n\nThe chart is in [`deploy/charts/mcp-nats`](https://github.com/sinadarbouy/mcp-nats/blob/main/deploy/charts/mcp-nats). Install guides (including **OCI / GHCR** and umbrella-chart `dependencies`), values overview, probes, and the **HashiCorp Vault Agent Injector** example are in **[deploy/charts/mcp-nats/README.md](https://github.com/sinadarbouy/mcp-nats/blob/main/deploy/charts/mcp-nats/README.md)**.\n\nQuick start from the repository root:\n\n```\nhelm install mcp-nats ./deploy/charts/mcp-nats --namespace mcp-nats --create-namespace\n```\n\nPublished releases are also installable from OCI, for example:\n\n```\nhelm install mcp-nats oci://ghcr.io/sinadarbouy/charts/mcp-nats --version \"0.1.4\" --namespace mcp-nats --create-namespace\n```\n\nSee the chart README for `Chart.yaml` dependency snippets and registry login.\n\nTagged releases push `ghcr.io/sinadarbouy/mcp-nats` and sign the multi-arch index (and each platform manifest) with [Sigstore Cosign](https://docs.sigstore.dev/cosign/signing/overview/) using keyless GitHub OIDC.\n\nVerify a published tag:\n\n```\ncosign verify ghcr.io/sinadarbouy/mcp-nats:0.1.4 \\\n  --certificate-identity-regexp 'https://github.com/sinadarbouy/mcp-nats/.github/workflows/(release\\.yml@refs/tags/v.*|sign-image\\.yml@refs/heads/main)' \\\n  --certificate-oidc-issuer https://token.actions.githubusercontent.com\n```\n\nHistorical tags published before signing was added can be signed from **Actions → sign-image** (run from `main`).\n\nUse Tilt to deploy both official NATS and the local `mcp-nats` chart for end-to-end auth testing.\n\nPrerequisites:\n\n- Tilt installed\n- Helm installed\n- Docker Desktop Kubernetes enabled\n- Current kube context set to `docker-desktop`\n\nStart the integration stack:\n\n```\ntilt up\n```\n\nThis uses:\n\n- `Tiltfile`\n- `deploy/tilt/nats-values.yaml`\n- `deploy/tilt/mcp-nats-values.yaml`\n- a local image build with `deploy/tilt/Dockerfile.tilt` before Helm deploy\n\nStop and clean up:\n\n```\ntilt down\nhelm uninstall -n mcp-nats-tilt nats mcp-nats\nkubectl delete namespace mcp-nats-tilt --ignore-not-found\n```\n\nQuick verification commands:\n\n```\nkubectl get pods,svc -n mcp-nats-tilt\nkubectl logs -n mcp-nats-tilt deploy/mcp-nats-mcp-nats\nkubectl logs -n mcp-nats-tilt statefulset/nats\nkubectl port-forward -n mcp-nats-tilt svc/mcp-nats-mcp-nats 8000:8000\n```\n\nAuth smoke test:\n\n- NATS is configured with `mcpuser` /`mcppassword` in`deploy/tilt/nats-values.yaml` .\n- `mcp-nats` uses the same credentials via chart-managed secret in`deploy/tilt/mcp-nats-values.yaml` .\n- If credentials mismatch, `mcp-nats` logs will show connection/authentication failures.\n\n- `NATS_URL` : The URL of your NATS server (e.g.,`localhost:4222` )\n- `NATS_<ACCOUNT>_CREDS` : Base64 encoded NATS credentials for each account\n  - Example: `NATS_SYS_CREDS` ,`NATS_A_CREDS`\n- Example: \n- `NATS_NO_AUTHENTICATION` : Set to \"true\" to enable anonymous connections (no credentials required)\n- `NATS_USER` : Username or token for user/password authentication\n- `NATS_PASSWORD` : Password for user/password authentication\n\n- `--transport` : Transport type (stdio, sse, or streamable-http), default: streamable-http\n- `--address` : Address for HTTP transport to listen on, default: 0.0.0.0:8000\n- `--endpoint-path` : Endpoint path for streamable-http transport, default: /mcp\n- `--sse-address` : Deprecated alias of`--address`\n- `--log-level` : Log level (debug, info, warn, error), default: info\n- `--json-logs` : Output logs in JSON format, default: false\n- `--no-authentication` : Allow anonymous connections without credentials\n- `--user` : NATS username or token (can also be set via NATS_USER env var)\n- `--password` : NATS password (can also be set via NATS_PASSWORD env var)\n\n- `GET /livez` : process liveness check (does not validate NATS dependency)\n- `GET /readyz` : readiness check (validates TCP connectivity to`NATS_URL` )\n- `GET /healthz` : compatibility alias for liveness\n\nThese endpoints are available when running with `sse` or `streamable-http` transport.\n\nDefault probes and `lifecycle.preStop` are documented in [deploy/charts/mcp-nats/README.md](https://github.com/sinadarbouy/mcp-nats/blob/main/deploy/charts/mcp-nats/README.md).\n\nThe MCP NATS server supports three authentication methods:\n\n1. \n**Credentials-based Authentication** (default): Uses NATS credentials files\n  - Set `NATS_<ACCOUNT>_CREDS` environment variables\n  - Requires `account_name` parameter in all tools\n2. Set \n3. \n**User/Password Authentication** : Uses username and password\n  - Set `NATS_USER` and`NATS_PASSWORD` environment variables or use`--user` and`--password` flags\n4. Set \n5. \n**Anonymous Authentication** : No authentication required\n  - Set `NATS_NO_AUTHENTICATION=true` environment variable or use`--no-authentication` flag\n6. Set \n\n```\n# Run with Streamable HTTP transport (default) and debug logging\n./mcp-nats --log-level debug\n\n# Run with custom Streamable HTTP endpoint path\n./mcp-nats --transport streamable-http --address localhost:9000 --endpoint-path /mcp\n\n# Run with JSON logging\n./mcp-nats --json-logs\n\n# Run with SSE transport\n./mcp-nats --transport sse --address localhost:9000\n\n# Run with anonymous authentication\n./mcp-nats --no-authentication\n\n# Run with user/password authentication\n./mcp-nats --user myuser --password mypass\n\n# Run with environment variables for authentication\nNATS_NO_AUTHENTICATION=true ./mcp-nats\nNATS_USER=myuser NATS_PASSWORD=mypass ./mcp-nats\n```\n\nMake sure your .vscode/settings.json includes:\n\n```\n\"mcp\": {\n  \"servers\": {\n    \"nats\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"http://localhost:8000/mcp\"\n    }\n  }\n}\n```\n\n**Cursor** (`mcpServers`):\n\n```\n{\n  \"mcpServers\": {\n    \"nats\": {\n      \"env\": {\n        \"NATS_URL\": \"nats://localhost:4222\",\n        \"NATS_SYS_CREDS\": \"<base64 of SYS account creds>\",\n        \"NATS_A_CREDS\": \"<base64 of A account creds>\"\n      },\n      \"url\": \"http://localhost:8000/mcp\"\n    }\n  }\n}\n```\n\n**Anonymous Authentication:**\n\n```\n{\n  \"mcpServers\": {\n    \"nats\": {\n      \"env\": {\n        \"NATS_URL\": \"nats://localhost:4222\",\n        \"NATS_NO_AUTHENTICATION\": \"true\"\n      },\n      \"url\": \"http://localhost:8000/mcp\"\n    }\n  }\n}\n```\n\n**User/Password Authentication:**\n\n```\n{\n  \"mcpServers\": {\n    \"nats\": {\n      \"env\": {\n        \"NATS_URL\": \"nats://localhost:4222\",\n        \"NATS_USER\": \"myuser\",\n        \"NATS_PASSWORD\": \"mypass\"\n      },\n      \"url\": \"http://localhost:8000/mcp\"\n    }\n  }\n}\n```\n\nIf using the binary:\n\n```\n{\n  \"mcpServers\": {\n    \"nats\": {\n      \"command\": \"mcp-nats\",\n      \"args\": [\n        \"--transport\",\n        \"stdio\"\n      ],\n      \"env\": {\n        \"NATS_URL\": \"nats://localhost:4222\",\n        \"NATS_SYS_CREDS\": \"<base64 of SYS account creds>\",\n        \"NATS_A_CREDS\": \"<base64 of A account creds>\"\n      }\n    }\n  }\n}\n```\n\n**Anonymous Authentication with Binary:**\n\n```\n{\n  \"mcpServers\": {\n    \"nats\": {\n      \"command\": \"mcp-nats\",\n      \"args\": [\n        \"--transport\",\n        \"stdio\",\n        \"--no-authentication\"\n      ],\n      \"env\": {\n        \"NATS_URL\": \"nats://localhost:4222\"\n      }\n    }\n  }\n}\n```\n\n**User/Password Authentication with Binary:**\n\n```\n{\n  \"mcpServers\": {\n    \"nats\": {\n      \"command\": \"mcp-nats\",\n      \"args\": [\n        \"--transport\",\n        \"stdio\",\n        \"--user\",\n        \"myuser\"\n      ],\n      \"env\": {\n        \"NATS_URL\": \"nats://localhost:4222\",\n        \"NATS_PASSWORD\": \"mypass\"\n      }\n    }\n  }\n}\n```\n\n**Docker Configuration:**\n\n```\n{\n  \"mcpServers\": {\n    \"nats\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"--init\",\n        \"-e\",\n        \"NATS_URL\",\n        \"-e\",\n        \"NATS_SYS_CREDS\",\n        \"ghcr.io/sinadarbouy/mcp-nats:0.1.4\",\n        \"--transport\",\n        \"stdio\"\n      ],\n      \"env\": {\n        \"NATS_SYS_CREDS\": \"<base64 of SYS account creds>\",\n        \"NATS_URL\": \"<nats url>\"\n      }\n    }\n  }\n}\n```\n\n- Go 1.25+\n- Docker (optional)\n- NATS CLI\n- Understanding of MCP specification\n\n```\nmake help      # Print help message\nmake build     # Build the binary\nmake run       # Run in stdio mode\nmake run-sse   # Run with SSE transport\nmake lint      # Run linters\n```\n\nFor detailed instructions on how to test the MCP server using stdio transport, please refer to our [Stdio Example Guide](https://github.com/sinadarbouy/mcp-nats/blob/main/docs/stdio/stdio_example.md).", "url": "https://wpnews.pro/news/a-model-context-protocol-mcp-server-for-nats-messaging-system-integration", "canonical_source": "https://github.com/sinadarbouy/mcp-nats", "published_at": "2026-09-25 13:42:50+00:00", "updated_at": "2026-09-25 14:02:49.930313+00:00", "lang": "en", "topics": ["agent-protocols", "ai-agents", "developer-tools", "ai-infrastructure"], "entities": ["Sinadarbouy", "Model Context Protocol", "NATS", "MCP Review", "Claude Desktop", "GitHub", "Sigstore Cosign", "ghcr.io"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/a-model-context-protocol-mcp-server-for-nats-messaging-system-integration", "markdown": "https://wpnews.pro/news/a-model-context-protocol-mcp-server-for-nats-messaging-system-integration.md", "text": "https://wpnews.pro/news/a-model-context-protocol-mcp-server-for-nats-messaging-system-integration.txt", "jsonld": "https://wpnews.pro/news/a-model-context-protocol-mcp-server-for-nats-messaging-system-integration.jsonld"}}