Skip to content
MCP server

Tailscale

Run a Tailscale node and manage its tailnet from an AI client, read-only by default

Runs locally

Tailscale is an open-source MCP server for cloud and infrastructure. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Self-hosted, macOS
Runs
Locally
Version
2.1.0
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add tailscale-mcp --env TAILSCALE_API_KEY='<TAILSCALE_API_KEY>' --env TAILSCALE_OAUTH_CLIENT_SECRET='<TAILSCALE_OAUTH_CLIENT_SECRET>' -- npx -y @tailscale-mcp/tailscale-mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "tailscale-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@tailscale-mcp/tailscale-mcp"
      ],
      "env": {
        "TAILSCALE_API_KEY": "<TAILSCALE_API_KEY>",
        "TAILSCALE_OAUTH_CLIENT_SECRET": "<TAILSCALE_OAUTH_CLIENT_SECRET>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "tailscale-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@tailscale-mcp/tailscale-mcp"
      ],
      "env": {
        "TAILSCALE_API_KEY": "<TAILSCALE_API_KEY>",
        "TAILSCALE_OAUTH_CLIENT_SECRET": "<TAILSCALE_OAUTH_CLIENT_SECRET>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "tailscale-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@tailscale-mcp/tailscale-mcp"
      ],
      "env": {
        "TAILSCALE_API_KEY": "<TAILSCALE_API_KEY>",
        "TAILSCALE_OAUTH_CLIENT_SECRET": "<TAILSCALE_OAUTH_CLIENT_SECRET>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "tailscale-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@tailscale-mcp/tailscale-mcp"
      ],
      "env": {
        "TAILSCALE_API_KEY": "<TAILSCALE_API_KEY>",
        "TAILSCALE_OAUTH_CLIENT_SECRET": "<TAILSCALE_OAUTH_CLIENT_SECRET>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add tailscale-mcp --env TAILSCALE_API_KEY='<TAILSCALE_API_KEY>' --env TAILSCALE_OAUTH_CLIENT_SECRET='<TAILSCALE_OAUTH_CLIENT_SECRET>' -- npx -y @tailscale-mcp/tailscale-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.tailscale-mcp]
command = "npx"
args = ["-y", "@tailscale-mcp/tailscale-mcp"]
env = { TAILSCALE_API_KEY = "<TAILSCALE_API_KEY>", TAILSCALE_OAUTH_CLIENT_SECRET = "<TAILSCALE_OAUTH_CLIENT_SECRET>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "tailscale-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@tailscale-mcp/tailscale-mcp"
      ],
      "env": {
        "TAILSCALE_API_KEY": "<TAILSCALE_API_KEY>",
        "TAILSCALE_OAUTH_CLIENT_SECRET": "<TAILSCALE_OAUTH_CLIENT_SECRET>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "tailscale-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@tailscale-mcp/tailscale-mcp"
          ],
          "env": {
            "TAILSCALE_API_KEY": "<TAILSCALE_API_KEY>",
            "TAILSCALE_OAUTH_CLIENT_SECRET": "<TAILSCALE_OAUTH_CLIENT_SECRET>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e TAILSCALE_API_KEY='<TAILSCALE_API_KEY>' -e TAILSCALE_OAUTH_CLIENT_SECRET='<TAILSCALE_OAUTH_CLIENT_SECRET>' tailscale-mcp npx -- -y @tailscale-mcp/tailscale-mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "tailscale-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@tailscale-mcp/tailscale-mcp"
          ],
          "env": {
            "TAILSCALE_API_KEY": "<TAILSCALE_API_KEY>",
            "TAILSCALE_OAUTH_CLIENT_SECRET": "<TAILSCALE_OAUTH_CLIENT_SECRET>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "tailscale-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@tailscale-mcp/tailscale-mcp"
          ],
          "env": {
            "TAILSCALE_API_KEY": "<TAILSCALE_API_KEY>",
            "TAILSCALE_OAUTH_CLIENT_SECRET": "<TAILSCALE_OAUTH_CLIENT_SECRET>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "tailscale-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@tailscale-mcp/tailscale-mcp"
          ],
          "env": {
            "TAILSCALE_API_KEY": "<TAILSCALE_API_KEY>",
            "TAILSCALE_OAUTH_CLIENT_SECRET": "<TAILSCALE_OAUTH_CLIENT_SECRET>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "tailscale-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@tailscale-mcp/tailscale-mcp"
          ],
          "env": {
            "TAILSCALE_API_KEY": "<TAILSCALE_API_KEY>",
            "TAILSCALE_OAUTH_CLIENT_SECRET": "<TAILSCALE_OAUTH_CLIENT_SECRET>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "tailscale-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@tailscale-mcp/tailscale-mcp"
          ],
          "env": {
            "TAILSCALE_API_KEY": "<TAILSCALE_API_KEY>",
            "TAILSCALE_OAUTH_CLIENT_SECRET": "<TAILSCALE_OAUTH_CLIENT_SECRET>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "tailscale-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@tailscale-mcp/tailscale-mcp"
          ],
          "env": {
            "TAILSCALE_API_KEY": "<TAILSCALE_API_KEY>",
            "TAILSCALE_OAUTH_CLIENT_SECRET": "<TAILSCALE_OAUTH_CLIENT_SECRET>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "tailscale-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@tailscale-mcp/tailscale-mcp"
          ],
          "env": {
            "TAILSCALE_API_KEY": "<TAILSCALE_API_KEY>",
            "TAILSCALE_OAUTH_CLIENT_SECRET": "<TAILSCALE_OAUTH_CLIENT_SECRET>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • TAILSCALE_API_KEYA control-plane API access token. One of this, the OAuth client pair, or the OAuth JWT file is needed for the tailnet tools; without any of them only the local tools are offered.
  • TAILSCALE_OAUTH_CLIENT_IDAn OAuth client id, used with TAILSCALE_OAUTH_CLIENT_SECRET when there is no API access token.
  • TAILSCALE_OAUTH_CLIENT_SECRETThe OAuth client secret that goes with TAILSCALE_OAUTH_CLIENT_ID.
  • TAILSCALE_TAILNETThe tailnet the control-plane tools act on. Without it they act on the one the credential belongs to.
  • TAILSCALE_MCP_PRESETWhich tools are offered: minimal, core or full.
  • TAILSCALE_MCP_ALLOW_WRITEOffer the tools that change something. Read-only without it.
  • TAILSCALE_MCP_ALLOW_DESTRUCTIVEOffer the tools that remove or sever something. Implies the write tier.
  • TAILSCALE_API_KEYA control-plane API access token. One of this, the OAuth client pair, or the OAuth JWT file is needed for the tailnet tools; without any of them only the local tools are offered.
  • TAILSCALE_OAUTH_CLIENT_IDAn OAuth client id, used with TAILSCALE_OAUTH_CLIENT_SECRET when there is no API access token.
  • TAILSCALE_OAUTH_CLIENT_SECRETThe OAuth client secret that goes with TAILSCALE_OAUTH_CLIENT_ID.
  • TAILSCALE_TAILNETThe tailnet the control-plane tools act on. Without it they act on the one the credential belongs to.
  • TAILSCALE_MCP_PRESETWhich tools are offered: minimal, core or full.
  • TAILSCALE_MCP_ALLOW_WRITEOffer the tools that change something. Read-only without it.
  • TAILSCALE_MCP_ALLOW_DESTRUCTIVEOffer the tools that remove or sever something. Implies the write tier.

About Tailscale

The server drives two surfaces: the local node through the tailscale command line, and the tailnet through the control-plane REST API. Both are optional. With no tailscale binary the node tools are not offered, and with no API credential the tailnet tools are not; tailscale-mcp diagnose reports which of the two a machine has. Tailscale's own JSON comes back unmodified, and failures return a fixed error code and a hint.

Safety is built around two dials. A tier decides how dangerous a tool may be: read tools are always on, while write and destructive tools stay off until you set TAILSCALE_MCP_ALLOW_WRITE or TAILSCALE_MCP_ALLOW_DESTRUCTIVE, and tools above the tier are not listed at all. A preset of minimal, core or full decides how much surface is offered, with 186 tools reachable at most. The README recommends an OAuth client over an API token for any config you keep, and some destructive tools additionally require confirm: true.

It also provides read-only resources for node status, policy file, devices and DNS, plus three prompts: diagnose_connectivity, review_policy_change and audit_tailnet_access. Install through npm, Docker, Homebrew, a .mcpb bundle or cargo.

What it does

Node and tailnet control
Combines the tailscale CLI with the control-plane API.
Tiered permissions
Write and destructive tools stay hidden until enabled.
Presets
Minimal, core and full presets limit how many tools are offered.
Confirmation guard
Tailnet-wide destructive tools require confirm: true.
Resources and prompts
Exposes node and tailnet resources and three guided prompts.
Several install paths
Ships via npm, Docker, Homebrew, a .mcpb bundle or cargo.

Good for

  • Diagnose why one device cannot reach a peer
  • Review a policy file change before deploying it
  • Audit who can access what in a tailnet
  • List devices and DNS settings from a chat
  • Let an agent make small admin changes with write mode on

Pricing

Open source

Tailscale FAQ

Is Tailscale read-only by default?

Yes. Read tools are always offered; write and destructive tools need TAILSCALE_MCP_ALLOW_WRITE or ALLOW_DESTRUCTIVE.

What credentials does Tailscale need?

An API access token, an OAuth client pair or a JWT file for tailnet tools; without them only local node tools appear.

How many tools does Tailscale have?

The README says 186 across all toolsets, with the default core preset offering fewer.

Which clients can Tailscale be set up for?

`tailscale-mcp setup` prints snippets for Claude Code, Claude Desktop, VS Code, Cursor and Zed.

Does Tailscale work on Windows?

Release archives cover macOS and Linux on x86_64 and arm64, and Windows on x86_64.

Is Tailscale free?

Yes. Tailscale is open source, so you can use and self-host it for free.

How do I add Tailscale to Claude Code?

Run this command in your terminal: claude mcp add tailscale-mcp --env TAILSCALE_API_KEY='<TAILSCALE_API_KEY>' --env TAILSCALE_OAUTH_CLIENT_SECRET='<TAILSCALE_OAUTH_CLIENT_SECRET>' -- npx -y @tailscale-mcp/tailscale-mcp

What are the best alternatives to Tailscale?

The closest alternatives to Tailscale are REA, awslabs, AiSOC, kubeshark and Azure MCP Server.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers