Skip to main content
Glama
Tailscale MCP Server

Tailscale MCP Server

by HexSleeves

Tailscale MCP 서버

비공개 최소 권한 인터페이스를 통해 Tailscale을 운영하기 위한 Bun 기반 Model Context Protocol 서버입니다.

기본 전송 방식은 로컬 MCP 클라이언트를 위한 stdio입니다. 선택 사항인 HTTP 전송은 기본적으로 127.0.0.1에 바인딩되며, Tailscale Serve 또는 기타 테일넷 전용 프록시를 통해 비공개로 노출되도록 설계되었습니다.

설치

bun install
bun run build

Related 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.ts

HTTP 모드

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.1

Tailscale Serve를 통해 비공개로 노출하세요:

tailscale serve --bg 443 localhost:3000

일반적인 MCP 운영에는 Funnel을 사용하지 마십시오. Funnel은 서비스를 공개적으로 접근 가능하게 만들며 별도의 위협 검토가 필요합니다.

구성

변수

기본값

설명

MCP_TRANSPORT

stdio

stdio 또는 http

MCP_HTTP_BIND_HOST

127.0.0.1

HTTP 바인딩 호스트

MCP_HTTP_PORT

3000

HTTP 바인딩 포트

MCP_HTTP_BEARER_TOKEN

HTTP 모드에서 필수

MCP_ALLOWED_HOSTS

쉼표로 구분된 추가 허용 HTTP 호스트

TAILSCALE_TAILNET

-

테일넷 이름 또는 - 약어

TAILSCALE_API_BASE_URL

https://api.tailscale.com

Tailscale API 기본 URL

TAILSCALE_OAUTH_CLIENT_ID

권장 인증 방식

TAILSCALE_OAUTH_CLIENT_SECRET

권장 인증 방식

TAILSCALE_API_KEY

호환성 인증 방식

TAILSCALE_ALLOWED_TOOL_RISK

read

read, write 또는 admin

TAILSCALE_CLI_PATH

tailscale

로컬 CLI 경로

LOG_LEVEL

info

debug, info, warn 또는 error

MCP_SERVER_LOG_FILE

선택적 파일 로그 경로

위험 수준:

  • read: 읽기 전용 도구 및 리소스.

  • write: ACL/DNS/경로 업데이트와 같은 쓰기 작업.

  • admin: 삭제, 권한 해제, 연결, 연결 해제 및 인증 키 변경과 같은 파괴적이거나 호스트에 영향을 주는 작업.

도구

안정적인 도구 이름:

  • list_devices

  • device_action

  • manage_routes

  • get_network_status

  • connect_network

  • disconnect_network

  • ping_peer

  • get_version

  • get_tailnet_info

  • manage_acl

  • manage_dns

  • manage_keys

  • manage_policy_file

  • manage_file_sharing

  • manage_exit_nodes

  • manage_webhooks

  • manage_device_tags

리소스

  • tailscale://tailnet/summary

  • tailscale://devices

  • tailscale://devices/{deviceId}

  • tailscale://acl/current

프롬프트

  • diagnose_tailnet_connectivity

  • review_acl_change

개발

bun install
bun test
bun run typecheck
bun run lint
bun run build

전체 로컬 게이트:

bun run qa

Docker

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 tools
connect_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

    B3.4/5.0

    Scored across 18 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count4/5

    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.

    Completeness5/5

    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

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    Appeared in Searches