Zenoh Plugin MCP
Zenoh plugin exposing an MCP (Model Context Protocol) server over SSE/HTTP
Ask AI about Zenoh Plugin MCP
Powered by Claude Β· Grounded in docs
I know everything about Zenoh Plugin MCP. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
zenoh-plugin-mcp
A zenoh plugin that exposes an MCP (Model Context Protocol) server, allowing LLM agents to interact with a live zenoh network.
Features
- 29 MCP tools for pub/sub, queries, subscriptions, queryables, network discovery, liveliness, and key expression utilities
- 3 MCP prompts for guided network discovery, topic monitoring, and request/response workflows
- MCP resources exposing session info, subscription buffers, and queryable queues
- SSE transport β multiple MCP clients can connect concurrently with isolated state
- Per-client lifecycle β subscriptions, queryables, and liveliness tokens auto-cleanup on disconnect
- Access control β configurable allow/deny regex filters on key expressions
- Scope prefix β optional key expression prefix applied to all operations
- Dual mode β runs as a
zenohdplugin or as a standalone bridge binary
Screenshots
Claude Code connected to zenoh network, using the discover_network prompt
Querying a zenoh queryable through MCP tools
Subscribing to zenoh topics and receiving real-time messages
Viewing network topology with zenoh_get_topology
Quick Start
Bridge mode (standalone)
# Build
cargo build --release
# Start with a zenoh router
zenoh-bridge-mcp -e tcp/127.0.0.1:7447 --mcp-listen 0.0.0.0:8808
Plugin mode (inside zenohd)
Add to your zenoh config:
{
plugins: {
mcp: {
listen: "0.0.0.0:8808"
}
}
}
Then start zenohd with the plugin library in its search path.
Connect an MCP client
The MCP server listens on the configured address (default 0.0.0.0:8808) using the Streamable HTTP transport (SSE). Configure your MCP client to connect to http://<host>:8808/mcp.
Using with AI Coding Tools
Once the bridge or plugin is running, configure your AI tool to connect to it as a remote MCP server.
Claude Code (CLI)
claude mcp add zenoh --transport http http://localhost:8808/mcp
This registers the zenoh MCP server for all future Claude Code sessions. To verify:
claude mcp list
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"zenoh": {
"url": "http://localhost:8808/mcp"
}
}
}
Restart Claude Desktop. The zenoh tools will appear in the tool picker (hammer icon).
Cursor
Open Cursor Settings > MCP, click "Add new MCP server", and configure:
- Name:
zenoh - Type:
http - URL:
http://localhost:8808/mcp
Or edit .cursor/mcp.json in your project root (or ~/.cursor/mcp.json globally):
{
"mcpServers": {
"zenoh": {
"type": "http",
"url": "http://localhost:8808/mcp"
}
}
}
VS Code (GitHub Copilot)
Add to your VS Code settings.json (user or workspace):
{
"mcp": {
"servers": {
"zenoh": {
"type": "http",
"url": "http://localhost:8808/mcp"
}
}
}
}
Or add a .vscode/mcp.json file to your project:
{
"servers": {
"zenoh": {
"type": "http",
"url": "http://localhost:8808/mcp"
}
}
}
Windsurf
Edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"zenoh": {
"serverUrl": "http://localhost:8808/mcp"
}
}
}
Any MCP-compatible client
The server endpoint is:
POST http://<host>:8808/mcp
Headers:
Content-Type: application/json
Accept: application/json, text/event-stream
The server follows the MCP Streamable HTTP transport spec:
POST /mcpβ send JSON-RPC requests, receive SSE responsesGET /mcpβ open SSE stream for server-initiated notifications (requiresMcp-Session-Id)DELETE /mcpβ close a session
Remote access
If the bridge runs on a different machine, replace localhost with the host's IP or hostname. There is no built-in authentication, so restrict access at the network level (firewall, VPN, etc.).
Verifying the connection
Once connected, ask your AI assistant:
"Use the zenoh_info tool to show me the session information"
If the connection works, you'll see the zenoh session ID and any connected routers/peers. Then try:
"Discover the zenoh network" (this triggers the
discover_networkprompt)
MCP Tools
Core Pub/Sub/Query
| Tool | Description |
|---|---|
zenoh_put | Publish a value to a key expression |
zenoh_delete | Delete a key expression (tombstone) |
zenoh_get | Send a query and collect replies |
zenoh_subscribe | Subscribe to a key expression (buffered) |
zenoh_unsubscribe | Remove a subscription |
zenoh_poll_subscription | Drain buffered samples |
Queryables
| Tool | Description |
|---|---|
zenoh_declare_queryable | Register a queryable (queries buffered) |
zenoh_poll_queries | Drain pending queries |
zenoh_reply | Reply to a query |
zenoh_reply_err | Reply with an error |
zenoh_undeclare_queryable | Remove a queryable |
Discovery & Network Introspection
| Tool | Description |
|---|---|
zenoh_scout | Discover routers/peers via multicast |
zenoh_info | Get session ZID, connected routers/peers |
zenoh_list_publishers | List declared publishers |
zenoh_list_subscribers | List declared subscribers |
zenoh_list_queryables | List declared queryables |
zenoh_list_transports | List connected transports with link details |
zenoh_get_topology | Get linkstate graph (DOT format) |
zenoh_get_node_info | Get node version, locators, sessions, plugins |
zenoh_get_metrics | Get OpenMetrics statistics |
zenoh_get_plugins | List loaded plugins |
zenoh_admin_query | Raw admin space query |
Liveliness
| Tool | Description |
|---|---|
zenoh_liveliness_get | Query alive tokens |
zenoh_liveliness_declare | Declare a token |
zenoh_liveliness_subscribe | Subscribe to changes |
zenoh_liveliness_undeclare | Undeclare a token |
Key Expression Utilities
| Tool | Description |
|---|---|
zenoh_key_expr_check | Validate and canonize |
zenoh_key_expr_intersects | Check intersection |
zenoh_key_expr_includes | Check inclusion |
Configuration
{
plugins: {
mcp: {
// HTTP listen address for SSE transport
listen: "0.0.0.0:8808",
// Optional key expression prefix for all operations
// scope: "factory-1",
// Buffer sizes
subscription_buffer_size: 1000,
queryable_buffer_size: 100,
// Defaults
default_get_timeout_ms: 5000,
default_encoding: "text/plain",
// Access control (regex)
// allow: "^demo/.*",
// deny: "^internal/.*",
// Admin space access
admin_space_access: true,
}
}
}
Building
cargo build --release
Artifacts:
target/release/libzenoh_plugin_mcp.dylib(or.so) β plugin for zenohdtarget/release/zenoh-bridge-mcpβ standalone bridge
Testing
cargo test -- --test-threads=1
Architecture
zenohd / bridge
βββ zenoh-plugin-mcp
βββ MCP Server (SSE/HTTP, multi-client)
β βββ Per-client McpSessionState
β β βββ Subscriptions (ring buffers)
β β βββ Queryables (pending query buffers)
β β βββ Liveliness tokens
β βββ 29 Tools
β βββ 3 Prompts
β βββ Resources
βββ Zenoh Session (from runtime)
