Labsco
streamnative logo

StreamNative MCP Server

β˜… 24

from streamnative

Integrate AI agents with StreamNative Cloud resources and Apache Kafka/Pulsar messaging systems.

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

StreamNative MCP Server

A Model Context Protocol (MCP) server for integrating AI agents with StreamNative Cloud resources and Apache Kafka/Pulsar messaging systems.

Overview

StreamNative MCP Server provides a standard interface for LLMs (Large Language Models) and AI agents to interact with StreamNative Cloud services, Apache Kafka, and Apache Pulsar. This implementation follows the Model Context Protocol specification, enabling AI applications to access messaging services through a standardized interface.

The server currently negotiates MCP protocol versions 2025-11-25, 2025-06-18, 2025-03-26, and 2024-11-05. The default preference is 2025-11-25, while older clients remain supported through protocol negotiation.

Features

  • StreamNative Cloud Integration:
    • Connect to StreamNative Cloud resources with authentication
    • Switch to clusters available in your organization
    • Describe the status of clusters resources
  • Apache Kafka Support: Interact with Apache Kafka resources including:
    • Kafka Admin operations (topics, partitions, consumer groups)
    • Schema Registry operations
    • Kafka Connect operations (*)
    • Kafka Client operations (producers, consumers)
  • Apache Pulsar Support: Interact with Apache Pulsar resources including:
    • Pulsar Admin operations (topics, namespaces, tenants, schemas, etc.)
    • Pulsar Client operations (producers, consumers)
    • Functions, Sources, and Sinks management
    • Read-only MCP resources for context, catalog, and bounded admin summaries
  • Multiple Connection Options:
    • Connect to StreamNative Cloud with service account authentication
    • Connect directly to external Apache Kafka clusters
    • Connect directly to external Apache Pulsar clusters

*: The Kafka Connect operations are only tested and verified on StreamNative Cloud.

Inspecting the MCP Server

You can use the @modelcontextprotocol/inspector tool to inspect and test your MCP server. This is particularly useful for debugging and verifying your server's configuration.

Installation

npm install -g @modelcontextprotocol/inspector

Usage

# Inspect a stdio server
mcp-inspector stdio --command "bin/snmcp stdio --organization my-org --key-file /path/to/key-file.json"

# Inspect an SSE server
mcp-inspector sse --url "http://localhost:9090/mcp"

The inspector provides a web interface where you can:

  • View available tools and their schemas
  • Test tool invocations
  • Monitor server responses
  • Debug connection issues

Integration with MCP Clients

This server can be used with any MCP-compatible client, such as:

  • Claude Desktop
  • Other AI assistants supporting the MCP protocol
  • Custom applications built with MCP client libraries

⚠️ Reminder: Please ensure you have an active paid plan with your LLM provider to fully utilize the MCP server. Without it, you may encounter the error: message will exceed the length limit for this chat.

Usage with Claude Desktop

Using stdio Server

{
  "mcpServers": {
    "mcp-streamnative": {
      "command": "${PATH_TO_SNMCP}/bin/snmcp",
      "args": [
        "stdio",
        "--organization",
        "${STREAMNATIVE_CLOUD_ORGANIZATION_ID}",
        "--key-file",
        "${STREAMNATIVE_CLOUD_KEY_FILE}"
      ]
    }
  }
}

Please remember to replace ${PATH_TO_SNMCP} with the actual path to the snmcp binary and ${STREAMNATIVE_CLOUD_ORGANIZATION_ID} and ${STREAMNATIVE_CLOUD_KEY_FILE} with your StreamNative Cloud organization ID and key file path, respectively.

Optionally, you can use docker image to start the stdio server if you have Docker installed.

{
  "mcpServers": {
    "mcp-streamnative": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SNMCP_ORGANIZATION",
        "-e",
        "SNMCP_KEY_FILE",
        "-v",
        "${STREAMNATIVE_CLOUD_KEY_FILE}:/key.json",
        "streamnative/snmcp",
        "stdio"
      ],
      "env": {
        "SNMCP_ORGANIZATION": "${STREAMNATIVE_CLOUD_ORGANIZATION_ID}",
        "SNMCP_KEY_FILE": "/key.json"
      }
    }
  }
}

Using SSE Server

First, install the mcp-proxy tool:

pip install mcp-proxy

Then configure Claude Desktop to use the SSE server:

{
  "mcpServers": {
    "mcp-streamnative-proxy": {
      "command": "mcp-proxy",
      "args": [
        "http://localhost:9090/mcp/sse"
      ]
    }
  }
}

Note: If mcp-proxy is not in your system PATH, you'll need to provide the full path to the executable. For example:

  • On macOS: /Library/Frameworks/Python.framework/Versions/3.11/bin/mcp-proxy
  • On Linux: /usr/local/bin/mcp-proxy
  • On Windows: C:\Python311\Scripts\mcp-proxy.exe

Please remember to replace http://localhost:9090/mcp/sse with the right URL.

About Model Context Protocol (MCP)

The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to LLMs. MCP helps build agents and complex workflows on top of LLMs by providing:

  • A growing list of pre-built integrations that your LLM can directly plug into
  • The flexibility to switch between LLM providers and vendors
  • Best practices for securing your data within your infrastructure

For more information, visit modelcontextprotocol.io.

Release

This section describes how to release a new version of snmcp.

  1. Generate a tag for the new version (see Versioning, below):
git tag -a v0.0.1 -m "v0.0.1"
  1. Push the tag to the git repository:
git push origin refs/tags/v0.0.1

The release workflow will:

  • build Go binaries for supported platforms
  • archive the binaries
  • publish a release to the github repository (ref)

Versioning

This project uses semver semantics.

  • Stable: vX.Y.Z
  • Pre-release: vX.Y.Z-rc.W
  • Snapshot: vX.Y.Z-SNAPSHOT-commit

License

Licensed under the Apache License Version 2.0: http://www.apache.org/licenses/LICENSE-2.0