Tailscale MCP (tailscale-mcp-server)

MCP开发工具

提供方 HexSleeves

开发工具 HTTP · 远程 API Key 社区 / 第三方
查看接入方式

Provides seamless integration with Tailscale's CLI commands and REST API, enabling automated network management and monitoring through a standardized Model Context Protocol interface.

一句话选型结论

按资料字段整理

Tailscale MCP (tailscale-mcp-server) 属于开发工具类 MCP 服务器,HTTP · 远程,API Key,有可直接复制的远程端点配置。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类开发工具 传输方式HTTP · 远程 鉴权API Key 部署方式远程部署
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

开发工具
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

安装与配置

HTTP · 远程 API Key
连远程 HTTPS 端点,通常为 Streamable HTTP
npx --package=@hexsleeves/tailscale-mcp-server tailscale-mcp-server

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    确认你的客户端支持远程端点,并拿到服务地址。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
代码与仓库操作

在对话里直接查代码、提 issue、走 PR,省掉来回切工具。

本地命令与脚本

把构建、测试、格式化这类重复命令交给模型执行。

接口联调与测试

让模型调你的接口、跑一遍用例,快速定位问题。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。

先想清楚的地方

  • 远程端点依赖网络与服务方可用性,注意密钥与调用额度。
  • 使用前要准备好API Key对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Tailscale MCP (tailscale-mcp-server)当前 未标注 HTTP · 远程 远程部署 有 2026-05-17
Git 838e2ec1 12 stdio · 本地进程 本地部署 有 2026-05-17
Markitdown MCP 2c653a5f 1 stdio · 本地进程 本地部署 有 2026-05-17
JavaGuide 未标注 stdio · 本地进程 本地部署 有 2026-04-11
awesome-claude-skills 未标注 stdio · 本地进程 本地部署 有 2026-04-26
Context7 831acf40 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

开发工具
字段来自项目仓库与公开索引,中文说明由本站标注
提供方HexSleeves上游标注的维护方 HexSleeves
分类开发工具本站按上游分类展示
连接方式HTTP · 远程连远程 HTTPS 端点,通常为 Streamable HTTP
鉴权方式API Key远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · Node.js本地安装时用到的包标识与运行时
部署类型远程部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

10.7 KB
来自项目仓库与上游目录的原文,未做删改

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
  • Requirements
  • Quick Start
  • Claude Desktop
  • Claude Code (CLI)
  • Cursor
  • Tool Reference
  • Resources and Prompts
  • Configuration
  • HTTP Transport
  • Docker
  • Example Prompts
  • Development
  • Contributing

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

| Tool | Description | Min risk |
|------|-------------|----------|
| `list_devices` | List all devices in the configured tailnet | `read` |
| `device_action` | Authorize or expire a device key (`write`); deauthorize or delete (`admin`) | `write` / `admin` |
| `manage_routes` | Enable or disable advertised routes for a device | `write` |

### Network

| Tool | Description | Min risk |
|------|-------------|----------|
| `get_network_status` | Get current Tailscale network status via local CLI | `read` |
| `connect_network` | Connect this host to Tailscale with optional CLI flags | `admin` |
| `disconnect_network` | Disconnect this host from Tailscale | `admin` |
| `ping_peer` | Ping a Tailscale peer through the local CLI | `read` |
| `get_version` | Get local Tailscale CLI version information | `read` |

### Administration

| Tool | Description | Min risk |
|------|-------------|----------|
| `get_tailnet_info` | Get detailed information about the configured tailnet | `read` |
| `manage_file_sharing` | Read (`read`) or update (`write`) tailnet file sharing settings | `read` / `write` |
| `manage_exit_nodes` | List exit nodes (`read`); set, clear, advertise, or stop advertising (`admin`) | `read` / `admin` |
| `manage_webhooks` | List webhooks (`read`); create, delete, or test webhooks (`write`) | `read` / `write` |
| `manage_device_tags` | Read (`read`) or update (`write`) tags for a device | `read` / `write` |
| `get_version_info` | Return server version identifier | `read` |

### ACL and Policy

| Tool | Description | Min risk |
|------|-------------|----------|
| `manage_acl` | Read (`read`), validate, or update (`write`) the tailnet ACL policy | `read` / `write` |
| `manage_dns` | Read (`read`) or update (`write`) Tailscale DNS settings | `read` / `write` |
| `manage_keys` | List auth keys (`read`); create or delete (`admin`) | `read` / `admin` |
| `manage_policy_file` | Read (`read`) or update (`write`) the tailnet policy file | `read` / `write` |
| `manage_network_lock` | Network lock status (`read`) and mutation operations (`admin`) | `read` / `admin` |

---

## Resources and Prompts

### Resources (read-only)

| URI | Description |
|-----|-------------|
| `tailscale://tailnet/summary` | High-level tailnet summary |
| `tailscale://devices` | All devices in the tailnet |
| `tailscale://devices/{deviceId}` | Detail for a single device |
| `tailscale://acl/current` | Current ACL policy |

### Prompts

| Name | Description |
|------|-------------|
| `diagnose_tailnet_connectivity` | Guided diagnostic for connectivity issues |
| `review_acl_change` | Structured review workflow for ACL policy changes |

---

## Configuration

| Variable | Default | Description |
|----------|---------|-------------|
| `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_URL` | `https://api.tailscale.com` | Tailscale API base URL (https required except for localhost) |
| `TAILSCALE_ALLOWED_TOOL_RISK` | `read` | Maximum allowed tool risk: `read`, `write`, or `admin` |
| `TAILSCALE_CLI_PATH` | `tailscale` | Path to the local Tailscale CLI binary |
| `MCP_TRANSPORT` | `stdio` | Transport mode: `stdio` or `http` |
| `MCP_HTTP_BIND_HOST` | `127.0.0.1` | Host to bind in HTTP mode |
| `MCP_HTTP_PORT` | `3000` | Port 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_LEVEL` | `info` | Log 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.

  • CONTRIBUTING.md — development setup, commit conventions, PR process.
  • SECURITY.md — responsible disclosure policy.
  • LICENSE — MIT.

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
Tailscale MCP (tailscale-mcp-server) 怎么安装?

在客户端按下面的安装命令接入:npx --package=@hexsleeves/tailscale-mcp-server tailscale-mcp-server。装完在客户端配置里引用同一个包或端点。

Tailscale MCP (tailscale-mcp-server) 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

Tailscale MCP (tailscale-mcp-server) 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Tailscale MCP (tailscale-mcp-server) 需要 API Key 吗?

资料标注需要API Key认证,使用前准备好对应凭据,并按最小权限配置。

Tailscale MCP (tailscale-mcp-server) 能提供哪些能力?

资料显示能力标签包括 安全协议、设备控制、JavaScript、网络管理、自动化。具体工具清单以官方文档为准。

Tailscale MCP (tailscale-mcp-server) 需要什么运行环境?

运行时为 Node.js;属于远程端点,不需要在本地装运行时。

Tailscale MCP (tailscale-mcp-server) 是本地还是远程?

它是远程端点,连服务地址即可。传输方式为HTTP · 远程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。