Логотип Tailscale MCP Server

Tailscale MCP Server

Сообщество
HexSleeves

server that provides seamless integration with Tailscale's CLI commands and REST API, enabling automated network management and monitoring through a standardized interface

ИздательHexSleeves
Репозиторийtailscale-mcp
ЯзыкTypeScript
Форки
24
Звёзды
135
Доступные инструменты
18
Тип транспортаstdio
Категории
ЛицензияMIT
Ссылки
  • Подключайте инструменты к рабочим процессам с ИИ

    Tailscale MCP Server предоставляет возможности MCP, доступные совместимым ИИ-клиентам и агентам.

  • Доступные инструменты: 18

    Ниже представлены доступные для вызова действия с названиями и описаниями, если сервер их предоставляет.

  • Готовая конфигурация для копирования

    Используйте примеры конфигурации, чтобы настроить этот сервер в предпочитаемом MCP-клиенте.

  • Показатели интереса к открытому проекту

    Звёзды: 135, форки: 24 — в связанном репозитории.

Tailscale MCP Server

A Model Context Protocol (MCP) server for operating Tailscale from any MCP client. Supports local stdio for desktop clients and an authenticated HTTP transport for private tailnet deployments. Defaults to read-only access, localhost binding, and short-lived OAuth credentials where available.


Table of Contents


Features

  • Device management — list, authorize, deauthorize, delete, expire keys, manage routes.
  • Network operations — connect/disconnect host, ping peers, get CLI status and version.
  • Administration — tailnet info, file sharing, exit nodes, webhooks, device tags, server version.
  • ACL and policy — read/validate/update ACL, DNS settings, auth keys, policy file, network lock.
  • Read-only resources — tailnet summary, device list, per-device detail, current ACL.
  • Prompts — guided connectivity diagnosis and ACL change review.
  • Risk-gated tools — read, write, and admin levels via TAILSCALE_ALLOWED_TOOL_RISK.
  • OAuth + API key — OAuth client credentials (preferred) or legacy API key.
  • Private HTTP mode — bearer auth, Host validation, request size limits, health check endpoint.
  • Docker support — pre-built images on Docker Hub and GHCR; sidecar deployment with Tailscale Serve.

Requirements

One of:

  • Node.js 20+ — run via npx or install globally (no extra runtime needed).
  • Bun 1.3+ — used for development; also works as a production runtime.
  • Docker — use the pre-built image (no local runtime required).

Plus one auth method:

  • OAuth client credentials: TAILSCALE_OAUTH_CLIENT_ID + TAILSCALE_OAUTH_CLIENT_SECRET (preferred).
  • Legacy API key: TAILSCALE_API_KEY.

The local Tailscale CLI is optional. It is only required for CLI-backed tools: get_network_status, connect_network, disconnect_network, ping_peer, get_version, and manage_exit_nodes (set/clear operations).


Quick Start

Claude Desktop

Edit ~/.claude/claude_desktop_config.json (create if absent).

OAuth credentials (recommended)

json
{
  "mcpServers": {
    "tailscale": {
      "command": "npx",
      "args": ["-y", "@hexsleeves/tailscale-mcp-server"],
      "env": {
        "TAILSCALE_OAUTH_CLIENT_ID": "your-client-id",
        "TAILSCALE_OAUTH_CLIENT_SECRET": "your-client-secret",
        "TAILSCALE_TAILNET": "-"
      }
    }
  }
}

API key

json
{
  "mcpServers": {
    "tailscale": {
      "command": "npx",
      "args": ["-y", "@hexsleeves/tailscale-mcp-server"],
      "env": {
        "TAILSCALE_API_KEY": "tskey-api-...",
        "TAILSCALE_TAILNET": "-"
      }
    }
  }
}

Enable write/admin tools

Add TAILSCALE_ALLOWED_TOOL_RISK to the env block:

json
"TAILSCALE_ALLOWED_TOOL_RISK": "write"

Set to "admin" to unlock destructive operations (delete, deauthorize, connect/disconnect, key mutation).

Docker Hub

json
{
  "mcpServers": {
    "tailscale": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "TAILSCALE_API_KEY=tskey-api-...",
        "-e", "TAILSCALE_TAILNET=your-tailnet",
        "hexsleeves/tailscale-mcp-server:latest"
      ]
    }
  }
}

Claude Code (CLI)

bash
claude mcp add tailscale \
  -e TAILSCALE_API_KEY=tskey-api-... \
  -e TAILSCALE_TAILNET=- \
  -- npx -y @hexsleeves/tailscale-mcp-server

With write access:

bash
claude mcp add tailscale \
  -e TAILSCALE_API_KEY=tskey-api-... \
  -e TAILSCALE_TAILNET=- \
  -e TAILSCALE_ALLOWED_TOOL_RISK=write \
  -- npx -y @hexsleeves/tailscale-mcp-server

Cursor

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

json
{
  "mcpServers": {
    "tailscale": {
      "command": "npx",
      "args": ["-y", "@hexsleeves/tailscale-mcp-server"],
      "env": {
        "TAILSCALE_API_KEY": "tskey-api-...",
        "TAILSCALE_TAILNET": "-"
      }
    }
  }
}

Tool Reference

Devices

ToolDescriptionMin risk
list_devicesList all devices in the configured tailnetread
device_actionAuthorize or expire a device key (write); deauthorize or delete (admin)write / admin
manage_routesEnable or disable advertised routes for a devicewrite

Network

ToolDescriptionMin risk
get_network_statusGet current Tailscale network status via local CLIread
connect_networkConnect this host to Tailscale with optional CLI flagsadmin
disconnect_networkDisconnect this host from Tailscaleadmin
ping_peerPing a Tailscale peer through the local CLIread
get_versionGet local Tailscale CLI version informationread

Administration

ToolDescriptionMin risk
get_tailnet_infoGet detailed information about the configured tailnetread
manage_file_sharingRead (read) or update (write) tailnet file sharing settingsread / write
manage_exit_nodesList exit nodes (read); set, clear, advertise, or stop advertising (admin)read / admin
manage_webhooksList webhooks (read); create, delete, or test webhooks (write)read / write
manage_device_tagsRead (read) or update (write) tags for a deviceread / write
get_version_infoReturn server version identifierread

ACL and Policy

ToolDescriptionMin risk
manage_aclRead (read), validate, or update (write) the tailnet ACL policyread / write
manage_dnsRead (read) or update (write) Tailscale DNS settingsread / write
manage_keysList auth keys (read); create or delete (admin)read / admin
manage_policy_fileRead (read) or update (write) the tailnet policy fileread / write
manage_network_lockNetwork lock status (read) and mutation operations (admin)read / admin

Resources and Prompts

Resources (read-only)

URIDescription
tailscale://tailnet/summaryHigh-level tailnet summary
tailscale://devicesAll devices in the tailnet
tailscale://devices/{deviceId}Detail for a single device
tailscale://acl/currentCurrent ACL policy

Prompts

NameDescription
diagnose_tailnet_connectivityGuided diagnostic for connectivity issues
review_acl_changeStructured review workflow for ACL policy changes

Configuration

VariableDefaultDescription
TAILSCALE_OAUTH_CLIENT_ID—OAuth client ID (preferred auth method)
TAILSCALE_OAUTH_CLIENT_SECRET—OAuth client secret (required with CLIENT_ID)
TAILSCALE_API_KEY—Legacy API key fallback
TAILSCALE_TAILNET-Tailnet name or - shorthand for the default tailnet
TAILSCALE_API_BASE_URLhttps://api.tailscale.comTailscale API base URL (https required except for localhost)
TAILSCALE_ALLOWED_TOOL_RISKreadMaximum allowed tool risk: read, write, or admin
TAILSCALE_CLI_PATHtailscalePath to the local Tailscale CLI binary
MCP_TRANSPORTstdioTransport mode: stdio or http
MCP_HTTP_BIND_HOST127.0.0.1Host to bind in HTTP mode
MCP_HTTP_PORT3000Port to bind in HTTP mode
MCP_HTTP_BEARER_TOKEN—Required for HTTP mode (minimum 32 characters)
MCP_ALLOWED_HOSTS—Comma-separated additional allowed HTTP Host header values
LOG_LEVELinfoLog verbosity: debug, info, warn, or error
MCP_SERVER_LOG_FILE—Optional file path for log output

Risk levels

  • read — list devices, inspect status, read resources, run diagnostics.
  • write — update ACLs, DNS, routes, policy files, webhooks, tags, and other mutating settings.
  • admin — destructive or host-affecting operations: delete, deauthorize, connect, disconnect, auth key mutation, file sharing changes, exit node control.

HTTP Transport

HTTP mode is intended for private tailnet access. It requires MCP_HTTP_BEARER_TOKEN and binds to 127.0.0.1 by default.

bash
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"
export TAILSCALE_TAILNET="-"

npx -y @hexsleeves/tailscale-mcp-server --http --host 127.0.0.1 --port 3000

Expose privately with Tailscale Serve (recommended for tailnet deployments):

bash
tailscale serve --bg 443 localhost:3000

Do not use Tailscale Funnel for normal MCP operation. Funnel makes the endpoint publicly reachable on the internet.

A GET /health endpoint returns 200 OK when the server is running.

For full Docker sidecar deployment instructions, see docs/docker.md.


Docker

Run with Docker Hub image

bash
docker run --rm \
  -e TAILSCALE_API_KEY="tskey-api-..." \
  -e TAILSCALE_TAILNET="-" \
  -p 127.0.0.1:3000:3000 \
  hexsleeves/tailscale-mcp-server:latest

Run with GHCR image

bash
docker run --rm \
  -e TAILSCALE_API_KEY="tskey-api-..." \
  -e TAILSCALE_TAILNET="-" \
  -p 127.0.0.1:3000:3000 \
  ghcr.io/hexsleeves/tailscale-mcp-server:latest

Build locally

bash
docker build -t tailscale-mcp-server .

For sidecar deployment with Tailscale Serve, see docs/docker.md.


Example Prompts

Once the server is connected to your MCP client, try these:

  • "List my Tailscale devices and show which ones are offline."
  • "What is the current Tailscale network status on this machine?"
  • "Diagnose connectivity to my NAS at 100.64.0.5."
  • "Show me the current ACL policy for my tailnet."
  • "Review this ACL change before I apply it." (attach the new policy)
  • "What DNS nameservers is my tailnet using?"
  • "List all active webhooks in my tailnet."

Development

bash
# Install dependencies (Bun required for development)
bun install

# Type check
bun run typecheck

# Run tests
bun test

# Lint and format
bun run check

# Build
bun run build

# Full verification (typecheck + lint + test + build)
bun run qa:full

# Security audit
bun audit

See CONTRIBUTING.md for the full development workflow, commit conventions, and release process.


Contributing

Contributions are welcome. Please read CONTRIBUTING.md before opening a pull request.

Установка

TypingMind
Требования:

Node.js 18+

{
  "mcpServers": {
    "hexsleeves-tailscale-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@hexsleeves/tailscale-mcp-server"
      ]
    }
  }
}

Доступные инструменты

  • list_devices

    List all devices in the Tailscale network

  • device_action

    Perform actions on a specific device

  • manage_routes

    Enable or disable routes for a device

  • get_network_status

    Get current network status from Tailscale CLI

  • connect_network

    Connect to the Tailscale network

  • disconnect_network

    Disconnect from the Tailscale network

  • ping_peer

    Ping a peer device

  • get_version

    Get Tailscale version information

  • manage_acl

    Manage Tailscale Access Control Lists (ACLs)

  • manage_dns

    Manage Tailscale DNS configuration

  • manage_keys

    Manage Tailscale authentication keys

  • manage_network_lock

    Manage Tailscale network lock (key authority) for enhanced security

  • manage_policy_file

    Manage policy files and test ACL access rules

  • get_tailnet_info

    Get detailed Tailscale network information

  • manage_file_sharing

    Manage Tailscale file sharing settings

  • manage_exit_nodes

    Manage Tailscale exit nodes and routing

  • manage_webhooks

    Manage Tailscale webhooks for event notifications

  • manage_device_tags

    Manage device tags for organization and ACL targeting

Используйте MCP Tailscale MCP Server с разными ИИ-моделями

TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому после подключения Tailscale MCP Server вы можете использовать их с разными моделями ИИ в TypingMind, не настраивая подключение отдельно для каждой модели. Эта интеграция MCP работает локально на вашем устройстве через коннектор MCP TypingMind.

Руководство по настройке локального коннектора

Выберите этот способ, если серверу MCP нужен доступ к локальным файлам, приложениям или закрытым ресурсам на вашем компьютере.

1

Откройте настройки MCP

В TypingMind откройте «Настройки», затем «Расширенные настройки», перейдите в раздел «Протокол контекста модели» и выберите «Настроить коннектор».

  1. Откройте TypingMind в браузере.
  2. Нажмите значок настроек.
  3. Перейдите в «Расширенные настройки».
  4. Откройте раздел «Протокол контекста модели».
  5. Нажмите «Настроить коннектор» и выберите «Это устройство».
Экран настройки коннектора MCP в TypingMind с выбранным вариантом «Это устройство»
2

Выполните команду коннектора

Выберите «Это устройство», скопируйте команду из TypingMind и выполните её в терминале. Не останавливайте процесс, пока используете MCP.

  1. Скопируйте команду настройки, показанную в TypingMind.
  2. Откройте «Терминал» в macOS или Windows Terminal в Windows.
  3. Вставьте и выполните команду.
  4. Подтвердите установку пакета, если терминал запросит разрешение продолжить.
  5. Не закрывайте окно терминала и не останавливайте процесс, пока используете инструменты MCP.
3

Добавьте Tailscale MCP Server как сервер

Когда статус коннектора сменится на «Готов», нажмите «Изменить серверы» и вставьте конфигурацию сервера MCP.

  1. Дождитесь, пока статус коннектора сменится на «Готов».
  2. Нажмите «Изменить серверы».
  3. Вставьте конфигурацию сервера MCP для Tailscale MCP Server.
  4. Сохраните список серверов.
  5. Обновите статус, если хотите убедиться, что коннектор по-прежнему готов к работе.
Настройки MCP в TypingMind с активным сервером и кнопкой «Изменить серверы»
{
  "mcpServers": {
    "hexsleeves-tailscale-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@hexsleeves/tailscale-mcp-server"
      ]
    }
  }
}
4

Используйте подключение с разными моделями

Сохраните список серверов, откройте раздел «Плагины», включите инструменты MCP для Tailscale MCP Server, затем выберите любую поддерживаемую модель ИИ в TypingMind и используйте инструменты в чате или назначьте их ИИ-агенту.

  1. Откройте страницу «Плагины» в TypingMind.
  2. Включите инструменты MCP для Tailscale MCP Server.
  3. Начните чат и выберите модель ИИ, которую хотите использовать.
  4. Используйте инструменты MCP в чате или назначьте их ИИ-агенту.
  5. При необходимости переключайтесь на другую модель ИИ без повторного подключения MCP.
Чат TypingMind с включёнными инструментами MCP и выбранной ИИ-моделью
Можете помочь мне с этой задачей с помощью Tailscale MCP Server?
Tailscale MCP Server
Конечно. Я всё прочитал.
Вот что я нашёл с помощью Tailscale MCP Server.

Часто задаваемые вопросы

Для чего используется сервер MCP Tailscale MCP Server?

Tailscale MCP Server — это сервер MCP, который позволяет совместимым ИИ-клиентам подключаться к внешним инструментам и получать контекст. В TypingMind достаточно один раз добавить этот сервер MCP, чтобы его инструменты стали доступны в вашем рабочем пространстве с ИИ.

Можно ли использовать сервер MCP Tailscale MCP Server с несколькими ИИ-моделями в TypingMind?

Да. TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому вы можете использовать Tailscale MCP Server с разными ИИ-моделями, например Claude, ChatGPT, Gemini или другими моделями, настроенными в TypingMind, без отдельной настройки сервера MCP для каждой модели.

Зачем использовать MCP Tailscale MCP Server с TypingMind?

TypingMind — один из лучших интерфейсов для чата с LLM: он объединяет разные ИИ-модели, промпты, плагины, ИИ-агентов, ключи API и инструменты MCP в одном рабочем пространстве. Подключив Tailscale MCP Server, вы сможете использовать его инструменты MCP с предпочитаемыми моделями, сохраняя удобную организацию работы с чатами в TypingMind.

Как подключить сервер MCP Tailscale MCP Server к TypingMind?

Tailscale MCP Server работает через локальный коннектор MCP TypingMind. Этот вариант лучше всего подходит, когда серверу MCP нужен доступ к локальным файлам, настольным приложениям, инструментам командной строки или закрытым ресурсам на вашем компьютере.

Какие инструменты предоставляет сервер MCP Tailscale MCP Server в TypingMind?

Tailscale MCP Server предоставляет инструменты MCP (18), которые можно включить на странице «Плагины» в TypingMind и использовать в чате или назначить ИИ-агентам.

Нужно ли передавать TypingMind свои ключи API для использования сервера MCP Tailscale MCP Server?

Нет. TypingMind ориентирован прежде всего на локальную работу и позволяет вам контролировать выбор провайдеров моделей, ключи API, промпты и конфигурацию MCP. Если Tailscale MCP Server требует аутентификации, при создании подключения добавьте необходимые заголовки, настройки OAuth или локальную конфигурацию для этого сервера MCP.

Похожие серверы MCP

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇