
Netbird 的 MCP 服务器
概览
一个用于Netbird的模型上下文协议(MCP)服务器。 该项目源自Grafana Labs开发的GrafanaMCP服务器,并采用相同的Apache许可证2.0授权。 通过Smithery自动安装Netbird MCP Server for Claude Desktop: 服务器需要以下环境变量: - NETBIRD_API_TOKEN:您的Netbird API令牌- NETBIRD_HOST(可选):Netbird API主机(默认为 api.netbird.io) 该服务器使用 Netbird API 向 LLM 提供关于 Netbird 网络的信息。目前它是将部分只读 Netbird API 资源与工具进行一对一映射。 - [x] 使用 Netbird API 访问配置和状态 - [x] 可配置 API 端点 - [x] Netbird API 的安全令牌认证 1. 在工具中创建新文件(例如 tools/users.go),可能使用现有代码作为模板 2.向新文件添加 API 路由和响应的具体信息 3.在 cmd/main.go 中将工具添加到 func newServer()
概述(AI 翻译)
一个用于Netbird的模型上下文协议(MCP)服务器。
该项目源自Grafana Labs开发的GrafanaMCP服务器,并采用相同的Apache许可证2.0授权。
它还使用了Mark III Labs的MCP Go。
注:该项目仍在开发中。
安装
从源头安装
克隆仓库
建造并安装
从 GitHub 安装
通过Smithery安装
通过Smithery自动安装Netbird MCP Server for Claude Desktop:
配置
服务器需要以下环境变量:
NETBIRD_API_TOKEN:您的Netbird API令牌NETBIRD_HOST(可选):Netbird API 主机(默认为api.netbird.io)
特色
该服务器使用 Netbird API 向 LLM 提供关于 Netbird 网络的信息。目前它是将部分只读 Netbird API 资源与工具进行一对一映射。
- [x] 使用 Netbird API 访问配置和状态
- [x] 可配置API端点
- [x] Netbird API 的安全令牌认证
工具
| 工具 | 说明 | Netbird API |
|---|---|---|
list_netbird_peers |
所有贵族 | 列出所有贵族 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 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.
- [x] Uses Netbird API to access configuration and status
- [x] Configurable API endpoint
- [x] 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.
安装
npx -y @smithery/cli install @aantti/mcp-netbird --client claude配置
{
"mcpServers": {
"netbird": {
"command": "mcp-netbird",
"args": [],
"env": {
"NETBIRD_API_TOKEN": "<your-api-token>"
}
}
}
}