Sponsored by Deepsite.site

Netbird MCP Server

Created By
shinycongre8 months ago
MCP Server for Netbird
Content

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/shinycongre/mcp-netbird

Build and install

cd mcp-netbird && \
make install

Installing from GitHub

go install github.com/shinycongre/mcp-netbird/cmd/mcp-netbird@latest

Installing via Smithery

smithery badge

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 token
  • NETBIRD_HOST (optional): The Netbird API host (default is api.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

ToolDescriptionNetbird API
list_netbird_peersAll peersList all Peers
list_netbird_port_allocationsAll ingress ports for peerIdList all Port Allocations
list_netbird_groupsAll groupsList all Groups
list_netbird_policiesAll policiesList all Policies
list_netbird_posture_checksAll posture checksList all Posture Checks
list_netbird_networksAll networksList all Networks
list_netbird_nameserversAll nameserver groupsList all Nameserver Groups

Adding tools

To add new tools:

  1. Create a new file in tools (e.g., tools/users.go), possibly use existing code as a template
  2. Add API route and response specifics to the new file
  3. Add the tool to func newServer() in cmd/main.go

Usage

  1. Get your Netbird API token from the Netbird management console.

  2. Install the mcp-netbird binary using one of the installation methods above. Make sure the binary is in your PATH.

  3. 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 ENOENT in Claude Desktop logs, you need to specify the full path to mcp-netbird. On macOS Claude Logs are in ~/Library/Logs/Claude.

  1. Try asking questions along the lines of "Can you explain my Netbird peers, groups and policies to me?"

claude-desktop-mcp-netbird

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:

  1. Install thv as described in ToolHive README.

  2. Add Netbird API token to thv secrets:

thv secret set netbird
  1. Build an SSE image as described in the Docker section above

  2. Start Netbird MCP with thv run on 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
  1. 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

License

This project is licensed under the Apache License, Version 2.0.

This project includes software developed at Grafana Labs (https://grafana.com/).

This project includes software developed at Mark III Labs (https://github.com/mark3labs/mcp-go).

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor
Amap Maps高德地图官方 MCP Server
DeepChatYour AI Partner on Desktop
Tavily Mcp
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Serper MCP ServerA Serper MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
WindsurfThe new purpose-built IDE to harness magic