Skip to main content
Glama
@yawlabs/tailscale-mcp

@yawlabs/tailscale-mcp

by YawLabs

Create key

tailscale_create_key

Create a new Tailscale tailnet key for device auth, OAuth API access, or OIDC-based CI/CD federation. Returns the credential once, so save it immediately.

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:*'}

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tailscale_create_key"
  }
}

Input 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. Changed3 schema fields changedv0.23.1
    • addedInput schema / properties / expirySeconds / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / expirySeconds / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / expirySeconds / type
      Previous value: -"number"New value: +"integer"
  2. 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."
  3. First observedv0.13.3

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say readOnly=false, destructive=false, idempotent=false, openWorld=true; the description goes well beyond that by disclosing that the key value is returned verbatim and is non-retrievable afterward, and by warning that MCP clients persist responses to logs and transcripts. That is exactly the operational context an agent needs before invoking a credential-minting tool, and it does not conflict with the annotations.

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

Conciseness4/5

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

Front-loaded with purpose, then the single most important behavioral fact (one-time key return), then compact mode-specific examples — a sensible priority order with no filler prose. The SECURITY paragraph runs slightly long for the point it makes, but every sentence is actionable rather than decorative.

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

Completeness5/5

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

For a 12-parameter, zero-required, no-output-schema tool spanning three distinct modes, the description supplies the missing return-value semantics (key returned once, not re-fetchable) and mode selection guidance that the schema alone cannot convey. An agent has enough to pick a keyType and populate the right subset of fields without further clarification.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning on top: it maps parameter bundles to intent (reusable+tags for CI auth keys, scopes for OAuth clients, issuer+subject wildcards for GitHub Actions federation) rather than restating field docs. It does not cover the object-typed customClaimRules beyond what the schema says, keeping it from a 5.

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?

States a specific verb and resource ('Create a new key in your tailnet') and enumerates the three key kinds it produces (auth, client, federated), which is enough to place it against tailscale_get_key/list_keys/update_key/delete_key. It never mentions tailscale_create_oauth_app, which is the one sibling an agent could plausibly confuse with the 'client' key path, so the differentiation is implicit rather than explicit.

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

Usage Guidelines4/5

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

The three worked examples effectively act as when-to-use guidance: choose 'auth' for adding devices, 'client' for programmatic API access, 'federated' for OIDC CI/CD, each with the parameter shape that mode expects. There is no explicit exclusion or prerequisite guidance (e.g. who may mint these keys, or when to prefer tailscale_create_oauth_app), so it stops short of full routing guidance.

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