Query Netbird Network Configuration and Status
Netbird MCP Server gives AI assistants read-only access to Netbird peers, groups, policies, and network configuration.
Maintainer of this project? Claim this page to edit the listing.
1.0.0Add to Favorites
Why it matters
Enable LLMs to understand and analyze your Netbird network by providing read-only access to its configuration and status. Gain insights into peers, groups, policies, and more.
Outcomes
What it gets done
List all Netbird peers, groups, and networks.
Retrieve details on Netbird policies and posture checks.
Examine nameserver configurations and port allocations.
Provide structured data for LLM analysis of network status.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-netbird | bash Capabilities
Tools your agent gets
List all network peers
List all inbound ports for a specific peer ID
List all groups
List all policies
List all posture checks
List all networks
List all nameserver groups
Overview
Netbird MCP Server
Netbird MCP Server gives AI assistants read-only access to Netbird network configuration through seven tools covering peers, groups, policies, posture checks, networks, and nameservers. Use it when you want an AI assistant to inspect and explain your Netbird network's peers, groups, and policies through natural-language questions.
What it does
Netbird MCP Server gives LLMs read access to your Netbird network configuration and status via a 1:1 mapping of select read-only Netbird API resources to MCP tools: all peers, all ingress port allocations for a peer, all groups, all policies, all posture checks, all networks, and all nameserver groups. It is derived from the MCP Server for Grafana project (licensed under the same Apache License 2.0) and built on MCP Go by Mark III Labs, and is explicitly noted as still in development.
When to use - and when NOT to
Use this connector when you want an AI assistant to answer questions about your Netbird network - for example, "explain my Netbird peers, groups, and policies" - by reading live configuration and status through the Netbird API.
It only exposes read-only resources, so it is not a fit for making changes to your Netbird network - only for inspecting and explaining its current state through natural-language queries.
Capabilities
Seven read-only tools, each a direct mapping to a Netbird API endpoint: list_netbird_peers, list_netbird_port_allocations, list_netbird_groups, list_netbird_policies, list_netbird_posture_checks, list_netbird_networks, and list_netbird_nameservers.
npx -y @smithery/cli install @aantti/mcp-netbird --client claude
How to install
Install automatically for Claude via Smithery with the command above, or install from source (clone the repository and run make install), or via go install github.com/aantti/mcp-netbird/cmd/mcp-netbird@latest. Configure with two environment variables: NETBIRD_API_TOKEN (required, obtained from the Netbird management console) and NETBIRD_HOST (optional, defaults to api.netbird.io). Once installed, make sure the mcp-netbird binary is on your PATH and add the server to your MCP client's configuration file - the project shows a Codeium Windsurf example, and notes that a spawn mcp-netbird ENOENT error in Claude Desktop logs means the client needs the binary's full path instead of just its name.
For containerized deployment, build the Docker image with docker build -t mcp-netbird-sse:v1 -f Dockerfile.sse . and run it with the NETBIRD_API_TOKEN environment variable set, or deploy it via ToolHive (thv) - store the token as a thv secret, then thv run the SSE image with a specified transport and port, and thv stop to tear it down. For local development, the server is written in Go and can be run directly with go run cmd/mcp-netbird/main.go, in stdio or SSE mode; the MCP Inspector tool can test either transport during setup. Contributors can add new tools by creating a file under tools/, wiring the API route and response handling, and registering the tool in newServer().
Who it's for
Netbird administrators and platform teams who want an AI assistant to inspect and explain their network's peers, groups, policies, posture checks, and DNS configuration through natural-language questions, without running separate Netbird API calls or dashboard lookups by hand. The project is licensed under Apache License 2.0 and includes software developed at Grafana Labs and Mark III Labs.
Source README
Netbird MCP Server
A Model Context Protocol (MCP) server for Netbird.
This project is derived from the MCP Server for Grafana by Grafana Labs and is licensed under the same Apache License 2.0.
It also uses MCP Go by Mark III Labs.
Note: this project is still in development.
Installing
Installing from source
Clone the repository
git clone https://github.com/aantti/mcp-netbird
Build and install
cd mcp-netbird && \
make install
Installing from GitHub
go install github.com/aantti/mcp-netbird/cmd/mcp-netbird@latest
Installing via Smithery
To install Netbird MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @aantti/mcp-netbird --client claude
Configuration
The server requires the following environment variables:
NETBIRD_API_TOKEN: Your Netbird API tokenNETBIRD_HOST(optional): The Netbird API host (default isapi.netbird.io)
Features
This server uses the Netbird API to provide LLMs information about Netbird network. Currently it's a 1:1 mapping of select read-only Netbird API resources to tools.
- Uses Netbird API to access configuration and status
- Configurable API endpoint
- Secure token-based authentication for Netbird API
Tools
| Tool | Description | Netbird API |
|---|---|---|
list_netbird_peers |
All peers | List all Peers |
list_netbird_port_allocations |
All ingress ports for peerId |
List all Port Allocations |
list_netbird_groups |
All groups | List all Groups |
list_netbird_policies |
All policies | List all Policies |
list_netbird_posture_checks |
All posture checks | List all Posture Checks |
list_netbird_networks |
All networks | List all Networks |
list_netbird_nameservers |
All nameserver groups | List all Nameserver Groups |
Adding tools
To add new tools:
- Create a new file in
tools(e.g.,tools/users.go), possibly use existing code as a template - Add API route and response specifics to the new file
- Add the tool to
func newServer()incmd/main.go
Usage
Get your Netbird API token from the Netbird management console.
Install the
mcp-netbirdbinary using one of the installation methods above. Make sure the binary is in your PATH.Add the server configuration to your client configuration file. E.g., for Codeium Windsurf add the following to
~/.codeium/windsurf/mcp_config.json:{ "mcpServers": { "netbird": { "command": "mcp-netbird", "args": [], "env": { "NETBIRD_API_TOKEN": "<your-api-token>" } } } }
For more information on how to add a similar configuration to Claude Desktop, see here.
Note: if you see something along the lines of
[netbird] [error] spawn mcp-netbird ENOENTin Claude Desktop logs, you need to specify the full path tomcp-netbird. On macOS Claude Logs are in~/Library/Logs/Claude.
- Try asking questions along the lines of "Can you explain my Netbird peers, groups and policies to me?"
Docker
Build an image and tag it:
docker build -t mcp-netbird-sse:v1 -f Dockerfile.sse .
Run the image:
docker run --name mcp-netbird -p 8001:8001 -e NETBIRD_API_TOKEN=<your-api-token> mcp-netbird-sse:v1
ToolHive
ToolHive (thv) is a lightweight utility designed to simplify the deployment and management of MCP servers.
You can use ToolHive to deploy and run Netbird MCP as follows:
Install
thvas described in ToolHive README.Add Netbird API token to
thvsecrets:
thv secret set netbird
Build an SSE image as described in the Docker section above
Start Netbird MCP with
thv runon port 8080:
thv run --secret netbird,target=NETBIRD_API_TOKEN --transport sse --name thv-mcp-netbird --port 8080 --target-port 8001 mcp-netbird-sse:v1
- When you want to stop the server, use:
thv stop thv-mcp-netbird
Development
Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.
This project is written in Go. Install Go following the instructions for your platform.
To run the server manually, use:
export NETBIRD_API_TOKEN=your-token && \
go run cmd/mcp-netbird/main.go
Or in SSE mode:
export NETBIRD_API_TOKEN=your-token && \
go run cmd/mcp-netbird/main.go --transport sse --sse-address :8001
Debugging
The MCP Inspector is an interactive developer tool for testing and debugging MCP servers. Read more about it here.
Here's how to start the MCP Inspector:
export NETBIRD_API_TOKEN=your-token && \
npx @modelcontextprotocol/inspector
Netbird MCP Server can then be tested with either stdio or SSE transport type. For stdio specify the full path to mcp-netbird in the UI.
Testing
TODO: add more tests
Linting
To lint the code, run:
make lint
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.