tailscale-rmcp
Provides tools for managing Tailscale tailnets, including listing devices, inspecting routes, reading API keys, ACL policy, DNS settings, and users, as well as authorizing and deleting devices.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tailscale-rmcplist all devices on my tailnet"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
tailscale-rmcp
MCP server and CLI for Tailscale: inspect and manage tailnet devices, routes, users, keys, DNS, and ACL policy over stdio or streamable HTTP.
It exposes one MCP tool, tailscale, plus the rtailscale CLI. Agents can
list devices, inspect routes, read API keys, ACL policy, DNS settings, and
users, authorize devices, and delete devices when the destructive gate is
explicitly enabled.
30-second path: set TAILSCALE_API_KEY, then run
npx -y tailscale-rmcp devices --json -> start loopback HTTP with
TAILSCALE_MCP_HOST=127.0.0.1 npx -y tailscale-rmcp serve -> call tools/call
with {"action":"devices"}.
Status: operational RMCP upstream-client server. Write-capable for device
authorization; destructive device deletion requires both server opt-in and
caller confirmation. HTTP MCP supports loopback dev mode, static bearer tokens,
and Google OAuth through lab-auth.
Not for: replacing the Tailscale admin console, bypassing Tailscale account permissions, operating multiple unrelated tailnets from one trust boundary, storing API keys for callers, arbitrary WireGuard control, or passing Tailscale API keys through MCP tool arguments.
Contents
Related MCP server: Tailscale MCP Server
Naming
Surface | This repo |
Repository |
|
Rust crate |
|
Binary / CLI |
|
npm package |
|
npm binary aliases |
|
MCP tool |
|
Config home |
|
Env prefixes |
|
The repo, crate, and npm package use the RMCP family name. The shipped binary is
rtailscale to avoid shadowing the official tailscale CLI.
Capabilities And Boundaries
List devices and inspect a single device by node ID or legacy numeric device ID.
Read subnet routes, API keys, ACL policy, DNS/MagicDNS settings, and tailnet users.
Authorize a device for the tailnet.
Delete a device only when
TAILSCALE_ALLOW_DESTRUCTIVE=trueand the caller also passes explicit confirmation.Provide setup and doctor commands for local plugin/runtime checks.
This repo owns | Tailscale owns | Explicitly out of scope |
MCP/CLI projection, request validation, HTTP MCP auth policy, response shaping, setup checks, and destructive gates. | Tailnet state, device identities, ACL semantics, DNS behavior, API key issuance, user membership, and upstream authorization. | Replacing the admin console, storing caller credentials, multi-tailnet tenancy, arbitrary WireGuard control, policy editing beyond exposed actions, and local Tailscale daemon management. |
Install
Path | Command | Best for | Notes |
npm / npx |
| Local MCP clients and quick trials. | Downloads the matching |
Release installer |
| Host installs without Node. | Installs |
Docker / Compose |
| Shared HTTP MCP deployments. | Reads |
Build from source |
| Development and audits. | Produces |
Plugin |
| Claude Code local plugin setup from this checkout. | Ships the skill, |
npm / npx
Run the stdio MCP server or CLI without a manual binary install:
npx -y tailscale-rmcp --help
npx -y tailscale-rmcp mcp
npx -y tailscale-rmcp devices --jsonThe npm package downloads rtailscale during postinstall. Override download
behavior only when testing packaging:
Variable | Purpose |
| Skip postinstall binary download. |
| Select the GitHub Release tag. |
| Select the GitHub repo used for release downloads. |
| Select a custom release base URL. |
Build From Source
git clone https://github.com/dinglebear-ai/rtailscale
cd rtailscale
cargo build --release
./target/release/rtailscale --helpMinimum supported Rust version: 1.86.
Quickstart
1. Get A Tailscale API Key
Create an API key at https://login.tailscale.com/admin/settings/keys. Use the minimum capability needed for the actions you plan to expose.
2. Configure The Tailnet
export TAILSCALE_API_KEY="tskey-api-..."
export TAILSCALE_TAILNET="-" # personal, or "example.com" for orgsEvery Tailscale account belongs to a tailnet. TAILSCALE_TAILNET=- targets the
default personal tailnet; organization tailnets usually use the org domain.
3. Run A Safe CLI Call
npx -y tailscale-rmcp devices --json4. Start Loopback HTTP MCP
TAILSCALE_MCP_HOST=127.0.0.1 npx -y tailscale-rmcp serveIn another shell:
curl -sf http://127.0.0.1:40040/health5. Make A First MCP Call
curl -s -X POST http://127.0.0.1:40040/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"tailscale","arguments":{"action":"devices"}}}'Client Configuration
Claude Code Stdio
{
"mcpServers": {
"tailscale": {
"command": "npx",
"args": ["-y", "tailscale-rmcp", "mcp"],
"env": {
"TAILSCALE_API_KEY": "tskey-api-...",
"TAILSCALE_TAILNET": "-"
}
}
}
}Claude Code HTTP
{
"mcpServers": {
"tailscale": {
"type": "http",
"url": "http://127.0.0.1:40040/mcp",
"headers": {
"Authorization": "Bearer ${TAILSCALE_MCP_TOKEN}"
}
}
}
}Codex / Labby Gateway
Register Tailscale through Labby as an HTTP upstream when sharing one long-running server, or run it directly as stdio for local-only use.
[mcp_servers.tailscale]
command = "npx"
args = ["-y", "tailscale-rmcp", "mcp"]Generic MCP JSON
{
"command": "rtailscale",
"args": ["mcp"],
"env": {
"TAILSCALE_API_KEY": "tskey-api-...",
"TAILSCALE_TAILNET": "-"
}
}Do not put TAILSCALE_API_KEY, OAuth secrets, passwords, SSH keys, or upstream
bearer tokens in MCP tool arguments. Use env, config files, or the MCP client's
secret storage. MCP callers never provide credentials, tokens, keys, or secrets
as action arguments.
Runtime Surfaces
Surface | Status | Entry point | Purpose |
MCP stdio | Supported |
| Local child-process MCP clients. |
MCP HTTP | Supported |
| Streamable HTTP MCP for local or shared server deployments. |
CLI | Supported |
| Scriptable parity and debugging. |
REST API | Not shipped | N/A | Tailscale already owns the REST API. |
Web UI | Not shipped | N/A | Tailscale already owns the admin console. |
MCP Tool Reference
One MCP tool is exposed: tailscale. Pass the required action argument to
select the operation.
Read Actions
Action | Description | Required params | Optional params |
| List all devices in the tailnet. | none | none |
| Return one device. |
| none |
| Return subnet routes for one device. |
| none |
| List API keys in the tailnet. | none | none |
| Return ACL policy JSON. | none | none |
| Return DNS nameservers, search paths, and MagicDNS preferences. | none | none |
| List tailnet users. | none | none |
| Return built-in action documentation. | none | none |
Write Actions
Action | Description | Required params | Optional params |
| Approve a device for the tailnet. |
| none |
Destructive Actions
Action | Description | Required params | Optional params |
| Permanently remove a device. |
| none |
Device IDs may be stable node IDs such as n1234abc or legacy numeric device
IDs. Use action=devices first to discover IDs.
CLI Reference
The binary calls the same service layer as the MCP tool:
rtailscale devices [--json]
rtailscale device <id> [--json]
rtailscale routes <device-id> [--json]
rtailscale keys [--json]
rtailscale acl [--json]
rtailscale dns [--json]
rtailscale users [--json]
rtailscale authorize <device-id> [--json]
rtailscale delete-device <device-id> --confirm [--json]
rtailscale doctor [--json]
rtailscale setup check [--json]
rtailscale setup repair [--json]
rtailscale setup plugin-hook [--no-repair] [--json]
rtailscale serve # HTTP MCP (also the no-argument default)
rtailscale mcp # stdio MCPAll commands currently print JSON. --json is accepted for parity with the rest
of the RMCP family.
Configuration
Host installs read ~/.tailscale-mcp/.env before loading config. Containers
read /data/.env. Process environment overrides both.
Variable | Default | Purpose |
| unset | Tailscale API key. |
|
| Tailnet: org domain or |
|
| Enable |
|
| HTTP bind host. |
|
| HTTP bind port. |
|
| Advertised MCP server name. |
|
| Disable auth only for loopback development. |
| unset | Static bearer token for HTTP MCP. |
|
| Trust an upstream gateway to enforce auth. |
|
|
|
| unset | Public URL for OAuth discovery. |
| unset | Google OAuth client ID. |
| unset | Google OAuth client secret. |
| unset | Admin email for OAuth bootstrap. |
| unset | Extra accepted Host header values. |
| unset | Extra accepted CORS origins. |
| platform appdata | Override the config/log home used by |
The Tailscale API base URL is not configurable; it is fixed at
https://api.tailscale.com/api/v2 in src/tailscale.rs.
Authentication
Stdio MCP runs as a local trusted child process and does not use HTTP auth.
HTTP MCP auth policy:
State | Condition | Behavior |
Loopback dev |
| Local unauthenticated development is allowed. |
Mounted bearer | Non-loopback with | Requires |
Mounted OAuth |
| Uses Google OAuth/JWT through |
Trusted gateway |
| Assumes a reverse proxy or gateway already enforced auth. |
Non-loopback HTTP startup is rejected unless bearer auth, OAuth, or
TAILSCALE_NOAUTH=true is configured.
Safety And Trust Model
Tailscale API keys are loaded from config/env only.
MCP callers select actions and IDs, not upstream credentials.
delete_devicehas a two-key interlock:TAILSCALE_ALLOW_DESTRUCTIVE=trueon the server and caller-providedconfirm=true.Missing IDs and unknown actions fail before upstream calls.
Non-loopback HTTP deployments must use bearer auth, OAuth, or a trusted authenticated gateway.
This bridge does not sandbox Tailscale itself. Tailscale remains responsible for API permissions and tailnet state changes.
Architecture
TailscaleClient (src/tailscale.rs) REST transport and API error handling
|
TailscaleService (src/app.rs) action behavior and destructive gates
|
MCP shim (src/mcp.rs) JSON args -> service -> Value
CLI shim (src/cli.rs) argv -> service -> stdoutDistribution Contract
Cargo.toml,Cargo.lock,packages/tailscale-rmcp/package.json,.release-please-manifest.json, andserver.jsonmust agree on the released version.GitHub Releases publish the
rtailscalebinary consumed by the npm launcher.The npm package name is
tailscale-rmcp; binary aliases aretailscale-rmcpandrtailscale.Docker/OCI metadata uses
ghcr.io/dinglebear-ai/rtailscale:<version>(seedocker-compose.prod.yml). The image path still uses the pre-transfer owner namespace even though the repo now lives atdinglebear-ai/rtailscale.plugins/tailscale/.mcp.jsonmust launchnpx -y tailscale-rmcp mcpso stdio clients start the MCP transport rather than the HTTP server.plugins/tailscale/ships no Claude Code hooks;scripts/validate-plugin-layout.shfails if ahooks/directory reappears.The root README is curated. Source of truth for action behavior and config defaults is
src/, plus the package, plugin, and registry manifests.
Development
cargo fmt --check
cargo test
cargo clippy -- -D warnings
cargo build --release
npm --prefix packages/tailscale-rmcp run checkVerification
just validate-plugin
npm --prefix packages/tailscale-rmcp run check
cargo check
cargo test
git diff --checkRuntime smoke:
TAILSCALE_API_KEY=tskey-api-... \
TAILSCALE_TAILNET=- \
rtailscale devices --jsonHTTP smoke:
TAILSCALE_MCP_HOST=127.0.0.1 rtailscale serve
curl -sf http://127.0.0.1:40040/healthDeployment
Use loopback for local development:
TAILSCALE_MCP_HOST=127.0.0.1 rtailscale serveUse Docker Compose for shared HTTP deployment:
cp .env.example .env
docker compose up -dWhen binding to a non-loopback address, configure TAILSCALE_MCP_TOKEN,
TAILSCALE_MCP_AUTH_MODE=oauth, or TAILSCALE_NOAUTH=true behind an
authenticated gateway.
Troubleshooting
Symptom | Check |
| Set it in env or |
Device calls return unauthorized | Refresh the API key in Tailscale admin settings. |
HTTP | Set |
Stdio client hangs or logs JSON errors | Ensure client config runs |
| Set |
Port conflict | Set |
Related Servers
soma - RMCP runtime and scaffold for provider-backed MCP servers.
unifi-rmcp - UniFi controller REST API bridge.
unraid - Unraid monorepo;
unraid-rs/is the GraphQL bridge for NAS and server management.apprise-rmcp - Apprise notification fan-out bridge for many delivery backends.
gotify-rmcp - Gotify push notification bridge for sends, messages, apps, and clients.
arcane-rmcp - Arcane Docker management bridge for containers and related resources.
yarr - Media-stack bridge for Sonarr, Radarr, Prowlarr, Plex, and related services.
ytdl-rmcp - Media download and metadata workflow server.
synapse-rmcp - Local Synapse workflow server for scout and flux actions.
cortex - Syslog and homelab log aggregation MCP server.
axon - RAG, crawl, scrape, extract, and semantic search project.
labby - Homelab control plane and MCP gateway project.
lumen - Local semantic code search MCP server.
Documentation
CLAUDE.mdis the curated local operating guide for contributors and agents.docs/SETUP.mdis curated plugin/setup guidance.docs/OAUTH.mdis curated OAuth setup guidance.plugins/tailscale/skills/tailscale/SKILL.mdis the agent usage guide.src/is the source of truth for current actions, config defaults, auth behavior, and CLI parsing.Package, plugin, Docker, and registry manifests are curated distribution contracts and should be checked with the verification commands above.
License
MIT. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAn MCP (Model Context Protocol) server for managing Tailscale resources using the official Tailscale Go client library v2. This server provides complete coverage of the Tailscale API with enhanced, self-descriptive tools powered by OpenAPI documentation.Last updated2MIT
- Flicense-quality-maintenanceEnables interaction with the Tailscale API to manage devices, ACLs, keys, and DNS configurations directly from MCP clients like Claude Desktop or Raycast.Last updated
- AlicenseAqualityCmaintenanceAn MCP server for managing and monitoring Tailscale networks through natural language. It enables users to list devices, check connection status, monitor for client updates, and retrieve detailed tailnet summaries.Last updated6237MIT
- AlicenseAqualityDmaintenanceProduction-ready MCP server for Tailscale management with 48 tools across 9 domains: Devices, DNS/Split DNS, ACL policies, Auth Keys, Users, Webhooks, Posture Integrations, Tailnet Settings, and Diagnostics. Supports stdio and SSE transport with Bearer token authentication. Built with TypeScript strict mode, Zod validation, and zero shell execution. AGPL-3.0 + Commercial dual-licensed.Last updated491311AGPL 3.0
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
An MCP server for Arcjet - the runtime security platform that ships with your AI code.
Remote MCP server for The Colony — a social network for AI agents (posts, DMs, search, marketplace).
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dinglebear-ai/rtailscale'
If you have feedback or need assistance with the MCP directory API, please join our Discord server