← All integrations

Tailscale MCP server

93 operations0 webhooks

Run a tailnet from an agent: list and approve devices, mint tagged, ephemeral auth keys for new nodes, read, validate and safely update the policy file (ACLs and grants, with etag checks and ACL tests), publish internal apps and MCP servers as Tailscale Services, and manage DNS, users, invites, webhooks, posture attributes and the configuration audit log (93 operations).

Try Tailscale with your agent

Connect Tailscale, then paste this into Claude, ChatGPT or Cursor. For ideas from other apps, see the use cases.

Using Corsair, show me what you can do in Tailscale on my account, then run one read-only example and show me the result.

Runs once, when you ask

Tailscale tools and triggers

Tools are what your agent can do in Tailscale through Corsair's MCP server. Triggers are the Tailscale events a routine can start from.

Devices

  • AuthorizeWrite

    Approve (authorized: true) or revoke approval for (authorized: false) a device when the tailnet requires device approval. Revoking cuts the device's access until it is approved again. deviceId is the device `id` or `nodeId` from devices.list.

    devices.authorize

  • DeleteDestructive

    Remove a device from the tailnet. It loses access at once and must be signed in again (with a new auth key or login) to rejoin. Cannot be undone. deviceId is the device `id` or `nodeId` from devices.list.

    devices.delete

  • Expire KeyDestructive

    Expire a device's node key now: the device is disconnected until someone signs in on it again. Use it to cut off a lost or compromised machine. deviceId is the device `id` or `nodeId` from devices.list.

    devices.expireKey

  • GetRead-only

    Get one device. fields: "all" adds routes, posture and connectivity details. deviceId is the device `id` or `nodeId` from devices.list.

    devices.get

  • ListRead-only

    List the devices in the tailnet: name, hostname, Tailscale IPs, owner, OS, client version, tags, last seen, key expiry, authorized. Pass fields: "all" to add advertised and enabled routes, posture and connectivity details. filters narrows the list on the server by exact match on top-level device fields, all of them required to match (for example { tags: ["tag:prod"], isEphemeral: true }).

    devices.list

  • Posture Attributes.Batch UpdateWrite

    Set or delete custom posture attributes on many devices in one call. A null value deletes that attribute. Applied all together or not at all.

    devices.postureAttributes.batchUpdate

  • Posture Attributes.DeleteWrite

    Delete a custom posture attribute (custom:...) from a device. deviceId is the device `id` or `nodeId` from devices.list.

    devices.postureAttributes.delete

  • Posture Attributes.GetRead-only

    Get a device's posture attributes: Tailscale's own (node:os, node:tsVersion, node:tsReleaseTrack, ...) and custom ones (custom:<name>) set through the API or a posture integration. deviceId is the device `id` or `nodeId` from devices.list.

    devices.postureAttributes.get

  • Posture Attributes.SetWrite

    Set a custom posture attribute on a device. attributeKey must start with custom: (for example custom:agentApproved); value is a string, number or boolean. expiry (RFC 3339) makes it lapse on its own. Policy postures can then allow or deny access on it. deviceId is the device `id` or `nodeId` from devices.list.

    devices.postureAttributes.set

  • Routes.ListRead-only

    List the subnet routes and exit-node routes a device advertises and which of them are enabled. deviceId is the device `id` or `nodeId` from devices.list.

    devices.routes.list

  • Routes.SetWrite

    Set which of the routes a device advertises are enabled (subnet routes, and 0.0.0.0/0 plus ::/0 for an exit node). Replaces the enabled list: routes left out are turned off. Only routes the device advertises can be enabled. deviceId is the device `id` or `nodeId` from devices.list.

    devices.routes.set

  • Set IpWrite

    Change a device's Tailscale IPv4 address to an unused one in the tailnet's range (100.64.0.0/10 by default). Existing connections to the old address break and must reconnect to the new one. deviceId is the device `id` or `nodeId` from devices.list.

    devices.setIp

Connect Tailscale to Claude, ChatGPT or Cursor

  1. 1

    Connect Tailscale in Corsair

    Add your Tailscale API key once in Corsair. Corsair stores the credential encrypted and makes the Tailscale API calls for your agent, so it never goes into a prompt or a config file. Connect Tailscale

    If your link lets the agent add apps, you can skip this: it gives you a sign-in link the first time it needs Tailscale. On a ChatGPT personal plan, connect Tailscale here first.

  2. 2

    Add Corsair's MCP server to your agent

    Every client uses the same address:

    https://mcp.corsair.dev/mcp
    Open Customize → Connectors → Add custom connector, paste the address, then select Connect.

    Codex, Gemini CLI, VS Code, Zed and other clients with OAuth sign-in work the same way. Clients without it, such as GitHub Copilot's coding agent, use a link's own address and an API key. Setup for every client

  3. 3

    Sign in and choose what needs your approval

    Your client opens Corsair to sign in. Pick a link: the apps your agent can use and a mode that decides what it may do without asking. In the default Cautious mode, Tailscale's read and write operations run right away and its 22 destructive operations wait for your approval. Strict mode asks before every write and refuses destructive operations, and Read mode allows reads only.

FAQ

Install corsair and @corsair-dev/tailscale, add the Tailscale plugin, and connect with an API key. Then call methods like corsair.tailscale.api.contacts.get() from your app. Corsair keeps each tenant isolated.

Yes. Tailscale requires an API key from your Tailscale account or developer dashboard. Create credentials with access that matches what you automate, then paste them into Corsair or connect through managed auth in Hub.

Yes. One Corsair client can hit Tailscale, GitHub, Notion, Stripe, and the rest. Trigger Tailscale from a webhook, push updates to Slack, or chain actions across plugins. Same tenant context across integrations, plain TypeScript.

Teams use Corsair for run a tailnet from an agent: list and approve devices, mint tagged, ephemeral auth keys for new nodes, read, validate and safely update the policy file (ACLs and grants, with etag checks and ACL tests), publish internal apps and MCP servers as Tailscale Services, and manage DNS, users, invites, webhooks, posture attributes and the configuration audit log (93 operations). Common builds include sync jobs, admin tooling, and agents that call Tailscale APIs from your backend.

The SDK is open source. Self-host and you pay Corsair nothing for the integration layer. Hub bills for hosted auth and execution, not per Tailscale API call. Hub has a generous free tier. For hobby projects you can probably run the whole thing on free. Paid plans start to matter with more tenants or heavier traffic.

We maintain @corsair-dev/tailscale in the open repo. When Tailscale ships API changes, upgrade the package. Your call sites stay typed. You should not need to rewrite the integration layer each time.

No. Corsair does not read your Tailscale data or hold individual access credentials. Credentials stay in your database. API calls run on your instance. We do not store Tailscale data on your behalf.

Yes. Add https://mcp.corsair.dev/mcp as a custom connector or MCP server in Claude, ChatGPT, Cursor, VS Code, Claude Code, Codex or any client that supports remote MCP servers with OAuth sign-in, then sign in to Corsair. On ChatGPT personal plans, custom servers currently get read tools only.

Yes. Put Tailscale on a link in Strict mode and every write waits for your approval, while destructive actions are refused. The default Cautious mode asks only before the 22 destructive Tailscale operations. You can change a link's mode at hub.corsair.dev/me.