Tailscale

io.github.tailscale-mcp由 GitHub 帳號 tailscale-mcp 發布v2.0.5更新於 Oct 26, 2026

Drive a Tailscale node and its tailnet through the CLI and the control-plane API

概覽

AI 產生的概覽

讓助理透過本機 CLI 與控制平面 API 檢視並管理 Tailscale 節點與 tailnet 的 MCP 伺服器。

可以做什麼
  • 檢視本機節點:狀態、IP、whois、版本、ping、netcheck、路由與 DNS 檢查、偏好設定、設定檔
  • 管理 tailnet 裝置:列出、授權、重新命名、設定路由與標籤、讓金鑰過期、刪除
  • 管理控制平面:原則檔、DNS、驗證金鑰、OAuth 用戶端、使用者、邀請、Webhook、設定、日誌
  • 操作本機服務:serve 與 funnel、Taildrive、檔案傳輸、憑證、kubeconfig
  • 提供九個唯讀資源,以及三個引導式提示:連線診斷、原則變更審查、存取稽核
適用情境
適合需要助理回答 Tailscale 網路問題或完成日常 tailnet 管理時使用,例如排查某台裝置為何無法連線、審查原則變更,而不必切換到管理後台。
執行需求
以 stdio 在本機執行(npm 套件、容器、Homebrew、bundle 或 cargo)。本機工具需要機器上裝有 tailscale 指令,macOS 上需使用應用程式安裝的 /usr/local/bin 下的 shim。tailnet 工具需要憑證:TAILSCALE_API_KEY,或 TAILSCALE_OAUTH_CLIENT_ID 搭配 TAILSCALE_OAUTH_CLIENT_SECRET,或 OAuth JWT 檔案。可用 TAILSCALE_TAILNET 指定 tailnet。
安裝前請注意
預設唯讀;寫入與破壞性工具需分別開啟 TAILSCALE_MCP_ALLOW_WRITE 和 TAILSCALE_MCP_ALLOW_DESTRUCTIVE,部分破壞性呼叫還需 confirm: true。層級作用於整個伺服器而非個別呼叫者,真正的界線是憑證的權限範圍。唯讀輸出也會暴露真實網路拓撲:節點名稱、位址、使用者和原則。本機工具以執行伺服器的使用者權限執行,且有四個工具會寫入檔案。長期使用建議用 OAuth 用戶端而非長期 API 權杖。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Tailscale,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

tailscale-mcp

An MCP server for Tailscale. The node it runs on is driven through the tailscale command-line interface; the tailnet behind it is driven through the control-plane REST API.

186 tools, one per verb, with real parameters and honest annotations. Tailscale's own JSON comes back unmodified, so anything you learned from Tailscale's documentation still applies. When something fails you get a fixed error code and a hint, not a wall of standard error.

Both surfaces are optional and neither is fatal. No tailscale binary means the tools that drive this node are not offered; no control-plane credential means the tools that drive the tailnet are not. tailscale-mcp diagnose says which of the two this machine has.

On macOS that binary is the tailscale shim the Tailscale application installs into /usr/local/bin. The executable inside the application bundle is not a substitute and is not accepted as one: run outside a login shell it starts the GUI rather than answering, so the local tools would be offered and then fail on every call.

Install

ChannelHow
npmnpx -y @tailscale-mcp/tailscale-mcp — downloads the release binary for your machine and refuses to run it unless the release's own SHA256SUMS vouches for it
Containerdocker run -i --rm -e TAILSCALE_API_KEY ghcr.io/tailscale-mcp/tailscale-mcp
Homebrewbrew trust tailscale-mcp/tap && brew install tailscale-mcp/tap/tailscale-mcp — Homebrew 6 will not load a third-party tap until it is trusted, and reports that as an Invalid formula error once per platform it knows
BundleDownload the .mcpb for your platform from the releases and open it — for MCP clients that install bundles, such as Claude Desktop
From sourcecargo install tailscale-mcp

Release archives are on the releases page with a SHA256SUMS beside them: macOS and Linux on x86_64 and arm64, and Windows on x86_64.

Point a client at it

sh
tailscale-mcp setup claude-code

prints the snippet for your client — claude-code, claude-desktop, vscode, cursor or zed — and says where it goes. It writes nothing: the snippet is yours to paste, and it leaves the credential out, for the reason in the next section.

Installed through npm there is nothing to install first, and the client can carry the settings:

jsonc
{  "mcpServers": {    "tailscale": {      "command": "npx",      "args": ["-y", "@tailscale-mcp/tailscale-mcp"],      "env": {        "TAILSCALE_MCP_ALLOW_WRITE": "true"      }    }  }}

That much is enough to start it. Without a credential it offers the tools that drive this node and hides the ones that act on the tailnet, and tailscale-mcp diagnose says which of the two you have.

Authenticate

setup prints no credential of its own, because the file it prints into is one people paste into issues and chats without rereading. Adding one is a separate, deliberate step. Two shapes go in the env block above — an API access token:

jsonc
"env": {  "TAILSCALE_API_KEY": "tskey-api-…",  "TAILSCALE_MCP_ALLOW_WRITE": "true"}

or an OAuth client:

jsonc
"env": {  "TAILSCALE_OAUTH_CLIENT_ID": "k123456CNTRL",  "TAILSCALE_OAUTH_CLIENT_SECRET": "tskey-client-…",  "TAILSCALE_MCP_ALLOW_WRITE": "true"}

The credentials table has the other shapes, including the JWT file for federated identity. Every tool is offered with either of these: the choice is not about what you can do with the server, which is why it is worth making on other grounds.

Prefer the OAuth client for anything you keep. The reason is what a client configuration is: a file somebody writes once and then forgets, holding a secret for as long as the tool is installed.

An API access token suits that badly on three counts. It belongs to a person and carries everything that person can do, so what leaks with the file is their whole account rather than the tools you turned on. It expires — which in a file nobody has looked at since they wrote it does not present as an expired credential, but as a server that has stopped working for no reason. And it is itself the bearer token, so the thing at rest is the thing that opens the door.

An OAuth client inverts each of those. It belongs to the tailnet, so it outlives whoever set it up and is revoked without touching that person's access. Its scopes narrow it to what the toolsets you enabled actually call. It does not expire on its own, and what sits in the file is not a key but the means of minting one — the token it hands this server lasts an hour, so a copy taken from a backup or a screen share is worth very little by the time it is used.

The API access token is what the control plane offers you first, and is the quicker thing to try this out with. It is worth replacing once the file is one you are going to keep.

Tiers and presets

Two independent dials decide what a session offers.

The tier is how dangerous a tool is allowed to be. Read tools change nothing and are always offered. Write tools change configuration that can be changed back. Destructive tools remove something or expose something in a way that is not simply undone — deleting a device, revoking a key, publishing a service to the internet. Read is always on; write and destructive are off until they are turned on, and a tool above the permitted tier is not listed, not refused when called.

The preset is how much surface area is offered at all. minimal is what an agent needs to answer questions and fix the common things; core adds the rest of everyday administration; full adds the tailnet-wide and irreversible corners. Two toolsets are in no preset and must be asked for by name: local-debug, which is Tailscale's own diagnostic surface, and local-passthrough, which is one tool that runs an arbitrary tailscale subcommand.

PresetReadWith --allow-writeWith --allow-destructiveToolsets
minimal3751554
core (default)5710612613
full6812615518

Adding --toolsets +local-debug,+local-passthrough to full reaches all 186.

Some destructive tools ask for one more thing: a confirm: true argument. Those are the ones that affect the whole tailnet, or that can cut this server off from the node or tailnet it is driving — logging the node out, deleting its own device, deploying a policy that locks the caller out. The server does not decide they are wrong; it makes the caller say it meant them.

Resources, prompts and completions

Nine resources — eight fixed and one template addressed by device identifier — give a client the local node's status, preferences, netcheck report and tailnet lock state, and the tailnet's policy file, devices, DNS configuration and settings. They are read-only, they appear only when their surface is on, and there are no subscriptions.

Three prompts steer a sequence of tool calls: diagnose_connectivity, review_policy_change and audit_tailnet_access. They follow the same rule as the resources: each appears only when the surface it needs is on, and diagnose_connectivity, which reads from both, stops at the steps the session can actually take.

Of the four argument slots those two surfaces expose, three are completed, so a client can offer the values rather than leave them to be guessed: the device template's identifier, diagnose_connectivity's peer, and audit_tailnet_access's subject — which offers users, tags and devices, in that order, so that a tailnet of thousands of devices still shows its handful of users within the hundred values the protocol sends. The fourth, review_policy_change's goal, is a sentence about intent, and completing it would be inventing one. Every value offered is one the server will accept back — a device is offered by its MagicDNS name, never by a hostname two machines might share — and a source that cannot answer completes to nothing rather than to an error. The method is rate limited, as the specification asks, because each keystroke is a request.

Note that the protocol completes a prompt argument and a resource template variable, and nothing else: tool arguments cannot be completed, so this helps the four slots above and none of the 186 tools. Client support is uneven — Claude Code completes resource templates, VS Code completes both, and several clients do neither — so this is an improvement where it is read and inert everywhere else.

Transports

Stdio by default. --http serves Streamable HTTP instead, on 127.0.0.1:8449, behind a bearer token in TAILSCALE_MCP_HTTP_TOKEN, with host and origin allow-lists, a body limit, a per-address rate limit and an open health endpoint. Binding anywhere but loopback needs either that token or --http-no-auth said out loud.

Security

What the tiers do. A tool above the permitted tier is not in the tool list, so a caller cannot invoke it by guessing its name, and a model cannot be talked into one that was never offered. The default is read-only. confirm on top of the destructive tier is a second signal for the operations that are worth one. Secrets never reach an argument list, a log line or an error message; a minted key or invite URL is returned once, verbatim, and nothing here keeps a copy. Every tool result and every error goes through the same redaction on the way out.

What the tiers do not do. They are not an authorization system, and they are not a sandbox.

  • A tier is a property of the server, not of the caller. Everyone talking to one server gets the same tools. If two callers should have different powers, run two servers.
  • Permitting a tier permits every tool in it. There is no per-tool switch; --toolsets is the coarser dial for narrowing what a session can reach.
  • The credential is the real boundary. A read-only OAuth client makes the tailnet write tools fail at the control plane whatever this server offers, and that is the boundary to lean on. Scope the credential, and use the tiers to stop honest mistakes.
  • The local tools run as whoever runs this server. Tailscale's own operator check applies — commands refused to a non-operator are refused here, with needs_operator — but a server run as the operator can do what the operator can do.
  • Read is not harmless. The read tier returns real network topology: node names, addresses, users, policy. Anything that can read the tool output can read that.

The server never escalates privileges. It does not use sudo, does not ask for elevation, and does not alter its own permissions or install anything. It runs the tailscale binary as the user it was started as and sends the control-plane credential it was given. Where Tailscale refuses because of who is asking, that refusal is passed through rather than worked around. Four tools do write files: three of them — a certificate, a Taildrop delivery, a metrics file — to the path the call names, and tailscale_configure_kubeconfig to the kubeconfig the client itself would edit. All four write as the user running the server, and so does tailscale_run, which is in no preset and, once asked for by name, can reach those same writes and anything else the tailscale binary does.

Over HTTP the defaults are the cautious ones — loopback, a token required, no browser origin allowed — and each of those is widened by a flag, deliberately.

Compared with the other Tailscale MCP servers

This server is a strict superset of the three that came before it (rtailscale, HexSleeves/tailscale-mcp, YawLabs/tailscale-mcp), with four exceptions listed below the table.

CapabilityrtailscaleHexSleevesYawLabsthis server
Devices: list, getyeslist onlyyesyes, within tailnet-devices below
Devices: authorize, delete, expire, rename, set IP, key expiryauthorize, deleteauthorize, delete, expireyesyes, 15 tools in all
Device routes, tagsroutes getyesyesyes, within tailnet-devices below
Posture attributes——yesyes, within tailnet-devices below
Policy file: get, set, preview, validategetget, set, validateyes, with If-Matchyes, with the version identifier on every write
DNS: nameservers, preferences, search paths, split DNSgetyes11 tools11 tools
Auth keyslistyesyes5 tools
OAuth clients——4 tools5 tools
Userslist—7 tools7 tools
Tailnet settings, contacts—partly5 tools5 tools
Webhooks—yes7 tools7 tools
Posture integrations——5 tools5 tools
Audit and network flow logs, log streaming——9 tools8 tools
Invites: device and user——11 tools11 tools
Services——7 tools7 tools
Organization tailnets——3 tools3 tools
Local status, IP, whois, whoami, version—status, version4 tools25 tools
Ping, netcheck, routecheck, DNS query, exit nodes—ping, exit nodesping, netcheckyes, within local-status above
Preferences, up, down, login, logout, profiles—up, down—8 tools
Serve and funnel———10 tools
Taildrive, file transfer, certificates, kubeconfig———11 tools
Tailnet lock—stub—8 tools, plus status and log
Tailscale's own debug surface———30 tools
Arbitrary tailscale subcommand———1 tool, off by default
Resources1449
Prompts1203
Transportsstdio, HTTPstdio, HTTPstdiostdio, HTTP
Tool count1, with 10 actions19, one of them a stub102186 tools

One row is lower than YawLabs' and no capability is missing behind it: two of their tools are aggregates over endpoints this server exposes one at a time — one that reads both log types' stream configurations in a single call, and one that authorizes a list of devices in a single call. Both are reachable here as repeated calls to the per-item tool. They are counted in their column and not in this one, which is what makes the logging row read 9 against 8.

Four things the others have and this does not, deliberately:

  1. No configuration file. rtailscale reads a config.toml. Everything here is an environment variable or a flag, because that is what an MCP client configuration can set, and a third source of truth is a third place for a setting to hide.
  2. No tool-schema resource. rtailscale serves its own tool schema as a resource. MCP already has tools/list; a second copy is one that can disagree with the first.
  3. No OAuth resource-server mode for browser clients, in this release. rtailscale can act as an OAuth resource server so a browser client can authenticate to it. The HTTP transport here takes a bearer token. This is a deferral, not a refusal.
  4. No extra-enum environment knobs. Several settings in the others accept values outside the documented set, or are read from variables that are not documented at all. Every setting here is in docs/configuration.md, and a value outside the set is a startup error naming the alternatives.

Development

sh
cargo test --workspace --all-targets     # the whole suite, offlinecargo clippy --workspace --all-targets -- -D warningscargo fmt --all --check

The suite needs no tailscale binary, no credential and no network: the tailscale binary is faked and the control plane is a fake HTTP server. The end-to-end tests that do want a real node and tailnet are gated on environment variables and report themselves skipped without them.

docs/tools.md is generated. After adding or changing a tool:

sh
UPDATE_DOCS=1 cargo test -p tailscale-mcp --test docs_are_current

Architecture decisions are in docs/adr/, the vocabulary this codebase holds itself to is in CONTEXT.md, every judgement call made while building it is in DECISIONS.md, and how a release is made is in RELEASING.md.

Licence

Apache-2.0.

來源:README.md,提交 c0ae819

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:伺服器未能啟動。

版本歷史

6
  1. v2.0.5最新Oct 26, 2026
  2. v2.0.4Oct 26, 2026
  3. v2.0.3Oct 10, 2026
  4. v2.0.1Oct 9, 2026
  5. v1.3.2Oct 7, 2026
  6. v1.3.1Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分