src/web/mcp/bridges/stdio-golang/README.md
This Go bridge converts MCP stdio communication to Netdata's MCP over WebSocket.
The easiest way to build the Go bridge is to use the included build script:
# Make the build script executable (if needed)
chmod +x build.sh
# Run the build script
./build.sh
The script will:
nd-mcpAlternatively, you can build it manually:
# Initialize a new module in this directory (only needed once)
go mod init netdata/nd-mcp-bridge
# Add dependencies
go get github.com/coder/websocket
go mod tidy
# Build the binary
go build -o nd-mcp nd-mcp.go
./nd-mcp ws://<ip>:19999/mcp
Where <ip> is either localhost or the IP address where a Netdata instance is listening.
To use this bridge with Claude Desktop:
/path/to/stdio-golang/nd-mcp ws://localhost:19999/mcp
localhost with the appropriate IP address.The bridge:
This bridge implements robust connection handling:
The reconnection algorithm starts with a 1-second delay and doubles the wait time with each attempt, up to a maximum of 60 seconds. Random jitter is added to prevent connection storms from multiple clients reconnecting simultaneously.
This implementation: