Tailscale MCP Server
Tailscale MCPサーバー
プライベートかつ最小権限のインターフェースを通じてTailscaleを操作するための、BunベースのModel Context Protocolサーバーです。
デフォルトのトランスポートはローカルMCPクライアント用の stdio です。オプションのHTTPトランスポートはデフォルトで 127.0.0.1 にバインドされ、Tailscale Serveやその他のテールネット専用プロキシを使用してプライベートに公開するように設計されています。
インストール
bun install
bun run buildRelated MCP server: Consul MCP Server
ローカルMCPの使用方法
{
"mcpServers": {
"tailscale": {
"command": "bunx",
"args": ["@hexsleeves/tailscale-mcp-server"],
"env": {
"TAILSCALE_OAUTH_CLIENT_ID": "your-client-id",
"TAILSCALE_OAUTH_CLIENT_SECRET": "your-client-secret",
"TAILSCALE_TAILNET": "-"
}
}
}
}OAuthクライアントは、スコープ付きアクセスと短期間のトークンを使用するため、自動化に適しています。APIキーは互換性のために引き続きサポートされています:
TAILSCALE_API_KEY=tskey-... bun run src/index.tsHTTPモード
HTTPモードではベアラートークンが必要であり、デフォルトではlocalhostまたはテールネットのホストヘッダーのみを受け入れます。
export MCP_TRANSPORT=http
export MCP_HTTP_BEARER_TOKEN="$(openssl rand -base64 32)"
export TAILSCALE_OAUTH_CLIENT_ID="your-client-id"
export TAILSCALE_OAUTH_CLIENT_SECRET="your-client-secret"
bun run src/index.ts --http --port 3000 --host 127.0.0.1Tailscale Serveを使用してプライベートに公開します:
tailscale serve --bg 443 localhost:3000通常のMCP操作にFunnelを使用しないでください。Funnelはサービスを公開状態にするため、別途脅威レビューが必要です。
設定
変数 | デフォルト | 説明 |
|
|
|
|
| HTTPバインドホスト |
|
| HTTPバインドポート |
| HTTPモードで必須 | |
| カンマ区切りの追加許可HTTPホスト | |
|
| テールネット名または |
|
| Tailscale APIベースURL |
| 推奨される認証方法 | |
| 推奨される認証方法 | |
| 互換性のある認証方法 | |
|
|
|
|
| ローカルCLIパス |
|
|
|
| オプションのログファイルパス |
リスクレベル:
read: 読み取り専用のツールとリソース。write: ACL/DNS/ルート更新などの書き込み操作。admin: 削除、認証解除、接続、切断、認証キーの変更など、破壊的またはホストに影響を与えるアクション。
ツール
安定したツール名:
list_devicesdevice_actionmanage_routesget_network_statusconnect_networkdisconnect_networkping_peerget_versionget_tailnet_infomanage_aclmanage_dnsmanage_keysmanage_policy_filemanage_file_sharingmanage_exit_nodesmanage_webhooksmanage_device_tags
リソース
tailscale://tailnet/summarytailscale://devicestailscale://devices/{deviceId}tailscale://acl/current
プロンプト
diagnose_tailnet_connectivityreview_acl_change
開発
bun install
bun test
bun run typecheck
bun run lint
bun run build完全なローカルゲート:
bun run qaDocker
docker build -t tailscale-mcp-server .
docker run --rm \
-e MCP_HTTP_BEARER_TOKEN="$MCP_HTTP_BEARER_TOKEN" \
-e TAILSCALE_OAUTH_CLIENT_ID="$TAILSCALE_OAUTH_CLIENT_ID" \
-e TAILSCALE_OAUTH_CLIENT_SECRET="$TAILSCALE_OAUTH_CLIENT_SECRET" \
-p 127.0.0.1:3000:3000 \
tailscale-mcp-server公開ポートはlocalhostにバインドしたままにし、Tailscale Serveを使用して他のデバイスに公開してください。
プライベートなTailscale Serveエンドポイントの背後でMCPサーバーを実行するサイドカーデプロイメントについては、deploy/README.md を参照してください。
Available Tools
18 toolsconnect_networkC
Connect to the Tailscale network
Inputs: acceptDNS (required), acceptRoutes (required), advertiseRoutes, authKey, +2 more.
device_actionC
Perform actions on a specific device
Inputs: action (required), deviceId (required).
disconnect_networkB
Disconnect from the Tailscale network
Inputs: no named parameters.
get_network_statusC
Get current network status from Tailscale CLI
Inputs: format (required).
get_tailnet_infoC
Get detailed Tailscale network information
Inputs: includeDetails (required).
get_versionB
Get Tailscale version information
Inputs: no named parameters.
list_devicesC
List all devices in the Tailscale network
Inputs: includeRoutes (required).
manage_aclC
Manage Tailscale Access Control Lists (ACLs)
Inputs: operation (required), aclConfig.
manage_device_tagsC
Manage device tags for organization and ACL targeting
Inputs: deviceId (required), operation (required), tags.
manage_dnsC
Manage Tailscale DNS configuration
Inputs: operation (required), magicDNS, nameservers, searchPaths.
manage_exit_nodesC
Manage Tailscale exit nodes and routing
Inputs: operation (required), routes (required), deviceId.
manage_file_sharingC
Manage Tailscale file sharing settings
Inputs: operation (required), deviceId.
manage_keysC
Manage Tailscale authentication keys
Inputs: operation (required), keyConfig, keyId.
manage_network_lockC
Manage Tailscale network lock (key authority) for enhanced security
Inputs: operation (required), keyId, publicKey.
manage_policy_fileC
Manage policy files and test ACL access rules
Inputs: operation (required), policy, testRequest.
manage_routesC
Enable or disable routes for a device
Inputs: action (required), deviceId (required), routes (required).
manage_webhooksC
Manage Tailscale webhooks for event notifications
Inputs: operation (required), config, webhookId.
ping_peerC
Ping a peer device
Inputs: count (required), target (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Each tool has a clearly distinct purpose targeting specific Tailscale functions like network connectivity, device management, ACLs, DNS, and security features. There is no overlap or ambiguity between tools, as each handles a unique aspect of the Tailscale ecosystem.
All tool names follow a consistent verb_noun pattern (e.g., connect_network, list_devices, manage_acl), with verbs like 'connect', 'get', 'list', 'manage', and 'ping' applied uniformly. This predictable naming makes it easy for agents to understand and select tools.
With 18 tools, the count is slightly high but reasonable for a comprehensive Tailscale management server covering network status, devices, ACLs, DNS, security, and more. It feels well-scoped without being excessive, though it borders on the heavier side for typical MCP servers.
The tool set provides complete coverage for Tailscale management, including core operations like network connectivity, device listing and actions, ACL and policy management, DNS configuration, security features, and utilities like pinging. There are no obvious gaps, supporting full lifecycle management of the domain.
Maintenance
Related MCP Connectors
Tailscale device, route, DNS, key, user, and ACL management over MCP and CLI.
Read devices, users, keys, ACLs and DNS for a tailnet; manage devices, routes and auth keys.
Model Context Protocol interface for Yari Infotech engineering & architectural advisory.
Model Context Protocol server for todo.vu task management and time tracking.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceProvides tools for managing Netskope infrastructure, policies, and steering configurations via the Model Context Protocol.34 npm2ISC
- AlicenseBqualityDmaintenanceProvides access to Consul functionality (services, health checks, KV store, sessions, events, queries, etc.) through a standardized Model Context Protocol interface.2418MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with HashiCorp Vault for secret management operations including reading, writing, listing, and deleting secrets through the Model Context Protocol.1MIT
- FlicenseNot gradedqualityNot gradedmaintenanceProvides remote filesystem operations, git repository management, and process execution capabilities for AI agents through the Model Context Protocol.-