Skip to main content
Glama
YawLabs

@yawlabs/tailscale-mcp

by YawLabs

Create key

tailscale_create_key

Create Tailscale auth keys, OAuth clients, or federated identities for devices, API access, or CI/CD. Returns the key value once; save it immediately as it cannot be retrieved again.

Instructions

Create a new key in your tailnet. Supports auth keys (for adding devices), OAuth clients (for programmatic API access), and federated identities (for OIDC-based CI/CD access). Returns the key value -- save it immediately, as it cannot be retrieved again.

SECURITY: the response body contains a long-lived credential verbatim. MCP clients commonly persist tool responses to logs and conversation transcripts; treat this response as sensitive (do not commit it, avoid re-sharing it in unrelated chat history).

Examples:

  • Auth key: {keyType:'auth', reusable:true, tags:['tag:ci']}

  • OAuth client: {keyType:'client', scopes:['devices:core:read','dns:read']}

  • Federated (GitHub Actions): {keyType:'federated', scopes:['devices:core:read'], issuer:'https://token.actions.githubusercontent.com', subject:'repo:my-org/my-repo:*'}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoACL tags (must start with 'tag:'). Required for client/federated if scopes include 'devices:core' or 'auth_keys'
issuerNo(federated only) OIDC issuer URL (e.g. 'https://token.actions.githubusercontent.com')
scopesNo(client/federated) OAuth scopes to grant (e.g. ['devices:core:read', 'dns:read']). Use the current scope names listed at https://tailscale.com/kb/1623/trust-credentials#scopes; the pre-2024 names such as 'devices:read' and 'acl' are legacy.
keyTypeNoKey type: 'auth' (default) for device auth keys, 'client' for OAuth clients, 'federated' for OIDC federation
subjectNo(federated only) Expected subject claim, supports * wildcards
audienceNo(federated only) Expected audience claim
reusableNo(auth only) Whether the key can be used more than once (default: false)
ephemeralNo(auth only) Whether devices using this key are ephemeral (default: false)
descriptionNoDescription for this key (max 50 chars, alphanumeric/hyphens/spaces)
expirySecondsNo(auth only) Key expiry in seconds (default: 90 days)
preauthorizedNo(auth only) Whether devices are pre-authorized (default: false)
customClaimRulesNo(federated only) Custom claim mapping rules

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.21.0
    • changedInput schema / properties / scopes / description
      Previous value: -"(client/federated) OAuth scopes to grant (e.g. ['devices:read', 'dns', 'acl'])"New value: +"(client/federated) OAuth scopes to grant (e.g. ['devices:core:read', 'dns:read']). Use the current scope names listed at https://tailscale.com/kb/1623/trust-credentials#scopes; the pre-2024 names such as 'devices:read' and 'acl' are legacy."
  2. First observedv0.13.3

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already carry the mutation/idempotency hints, and the description adds meaningful behavior: the key value is shown only once and must be saved immediately. The explicit SECURITY warning that the response contains a long-lived credential that may be persisted by MCP clients is valuable context beyond any structured field. It does not cover error conditions or permission requirements, but that is a minor gap for this operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and one-time retrieval behavior, then uses a clearly labeled SECURITY callout and three compact examples. Despite its length, each section earns its place and the structure makes it scannable for an agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter creation tool with no output schema, the description covers return behavior, security handling, all three supported key types, and representative parameter combinations. It omits error cases, authorization prerequisites, and explicit warnings about creating duplicate keys, but the combination of schema and description is largely sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage, the schema already documents every parameter, so the baseline is 3. The description adds value with concrete example objects that show how tags, scopes, issuer, subject, and keyType compose for each of the three key types, helping an agent assemble valid parameter sets.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Create a new key in your tailnet') and enumerates the three supported key types, which clearly distinguishes it from key lifecycle siblings like list_keys, get_key, update_key, and delete_key. It does not explicitly differentiate from the sibling tailscale_create_oauth_app, which also handles OAuth client creation, so it stops short of a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives context for when each key type is appropriate (auth for adding devices, OAuth for API access, federated for OIDC CI/CD) and supplies example payloads. However, it never says when not to use this tool or names alternatives such as tailscale_create_oauth_app or tailscale_update_key, leaving routing between siblings to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools