Tools
This is a reference catalogue. Tools cannot be configured or run from this page.
Unkey v2 deployments rollback deployment
UNKEY_MCP_UNKEY_V2_DEPLOYMENTS_ROLLBACK_DEPLOYMENTRoll live traffic back to a previous deployment. `deploymentId` is the deployment to roll back TO; the app's current deployment is used as the rollback source automatically. The target deployment must be ready, not already shutting down, belong to the production environment, and must not itself be the current deployment. After a rollback the app is marked as rolled back, which prevents new deployments from automatically taking over live traffic. Promote the rolled-back deployment (or a newer one) to clear this state. Rollback runs as a durable workflow: this endpoint returns once the rollback is accepted. Poll `getDeployment` or `listDeployments` to observe the result. **Required Permissions** Your root key must have write permission on the environment: - `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>#write`
Unkey v2 deployments start deployment
UNKEY_MCP_UNKEY_V2_DEPLOYMENTS_START_DEPLOYMENTStart a deployment that was previously stopped with `stopDeployment`, so it serves traffic again. The deployment keeps the configuration it had when it was stopped; nothing is rebuilt or redeployed. The deployment must currently be stopped, and must belong to a non-production environment. Production deployments are never stopped, so they cannot be started. Starting is asynchronous: this endpoint only enqueues the start and returns immediately. Poll `getDeployment` until the status reaches `ready`. **Required Permissions** Your root key must have write permission on the deployment: - `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/deployments/<deployment_id>#write`
Unkey v2 deployments stop deployment
UNKEY_MCP_UNKEY_V2_DEPLOYMENTS_STOP_DEPLOYMENTStop a running deployment that is not the app's live production deployment. Stopped deployments keep their configuration. Preview deployments can be resumed later with `startDeployment`. The deployment must be ready and running. Previous production deployments can be stopped, but stopping one removes instant rollback to it. A deployment that is already draining from a previous stop is rejected with a precondition error. Stopping is asynchronous: this endpoint only enqueues the stop and returns immediately. Poll `getDeployment` until the status reaches `stopped`. **Required Permissions** Your root key must have write permission on the deployment: - `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/deployments/<deployment_id>#write`
Unkey v2 domains create domain
UNKEY_MCP_UNKEY_V2_DOMAINS_CREATE_DOMAINAttach a custom domain to an environment and start verifying it. The domain is created in the `pending` state and does not serve traffic until verification succeeds. Verification runs in the background and polls DNS, so it is eventually consistent. The response returns `dnsRecords`: every record needed to finish setup, already resolved for whether this domain is an apex or a subdomain. Create every entry exactly as given. One record establishes routing and one proves ownership, and both are needed: whether ownership can be inferred from the routing record depends on how your provider publishes it, and a name another workspace has already verified can only be claimed through the ownership record. Neither is knowable before the records exist. When your DNS provider supports Domain Connect, the response also carries a `domainConnect` object; opening its `url` applies the same records at the provider in one step. The object is absent when the shortcut is unavailable. Domains are unique per workspace, so the same name cannot be attached to two environments. Attaching a domain that already exists in your workspace returns a 409 conflict. How many domains you may attach is set by your plan. Attaching one beyond that allowance returns a 403; upgrade the plan or remove a domain you no longer need. **Important**: verification stops after 24 hours without the required DNS records, and the domain moves to `failed`. **Required Permissions** Your root key must have one of the following permissions: - `environment.*.create_domain` (to attach domains to any environment) - `environment.<environment_id>.create_domain` (to attach domains to a specific environment)
Unkey v2 domains delete domain
UNKEY_MCP_UNKEY_V2_DOMAINS_DELETE_DOMAINDelete a custom domain from your workspace. Address the domain by its id or by its name. Names are unique per workspace, so `api.acme.com` is enough. Unkey stops serving the domain. Later requests fail with a certificate error. The DNS records at your provider stay in place. **Required Permissions** Your root key must have `delete` permission on the domain: `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/domains/<domain_id>#delete`. Use `*` in place of resource IDs to grant access to all matching domains in your workspace.
Unkey v2 domains get domain
UNKEY_MCP_UNKEY_V2_DOMAINS_GET_DOMAINRetrieve a custom domain and its verification status. Address the domain by its id or by its name. Names are unique per workspace, so `api.acme.com` is sufficient. You do not need to supply a project, app, or environment. Use this endpoint to poll after `domains.createDomain`. Verification runs in the background and checks DNS approximately each minute. `status: verified` means the domain is verified. Unkey has configured routing and requested a certificate. Each entry in `dnsRecords` has a `verified` flag. The flag shows which records Unkey has read back, so you can see which records are still missing. Some providers hide a record from DNS lookups, for example a proxied or flattened routing record. Such a record stays `false` while it serves traffic. `verificationError` gives the reason for the last failed attempt. `dnsRecords` contains the same values that `domains.createDomain` returned. Use it to recover the values without creating the domain again. **Important**: verification stops 24 hours after the domain was created, and the status becomes `failed`. The window starts at `createdAt`, not at the last attempt. **Required Permissions** Your root key must have one of the following permissions: - `environment.*.read_domain` (to read domains in any environment) - `environment.<environment_id>.read_domain` (to read domains in a specific environment)
Unkey v2 domains list domains
UNKEY_MCP_UNKEY_V2_DOMAINS_LIST_DOMAINSList your custom domains with their verification status and DNS records. Filter by project, app, or environment using IDs or slugs, or send `{}` to list domains across your workspace. Use any filter on its own or combine filters to narrow the results. Results match all supplied filters. Omitting `environment` includes all matching environments. Results include only domains you have permission to read, sorted by ID. When `hasMore` is true, send the returned `cursor` to get the next page. `status: verified` means the domain is verified. Unkey has configured routing and requested a certificate. Each domain includes its full `dnsRecords`. Each record has a `verified` flag. The flag shows which records Unkey has read back, so you can see which records are still missing without a second call. Some providers hide a record from DNS lookups, for example a proxied or flattened routing record. Such a record stays `false` while it serves traffic. **Required Permissions** Use a root key with the `environment.*.read_domain` permission. A successful request returns an empty list if no matching domains are readable by your key.
Unkey v2 domains verify domain
UNKEY_MCP_UNKEY_V2_DOMAINS_VERIFY_DOMAINRestart verification for a custom domain. Address the domain by its ID or by its name. Names are unique per workspace, so `api.acme.com` is enough. Call this after you correct the DNS records of a domain that shows `failed`, or to give a `pending` domain a new 24-hour verification period. The domain goes back to `pending` and the 24-hour period starts again. The endpoint returns when Unkey accepts the retry. Poll `domains.getDomain` for the result. A domain that is already `verified` returns a 412. **Required Permissions** Your root key must have `write` on the domain: - `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/domains/<domain_id>#write` - `unkey:v1:<workspace_id>:projects/*/apps/*/environments/*/domains/*#write` (all domains in your workspace)
Unkey v2 environments get environment
UNKEY_MCP_UNKEY_V2_ENVIRONMENTS_GET_ENVIRONMENTRetrieve a single environment by its id. Use this to fetch environment details after creation or to verify an environment exists before performing operations. **Required Permissions** Your root key must have one of the following permissions: - `environment.*.read_environment` (to read any environment) - `environment.<environment_id>.read_environment` (to read a specific environment)
Unkey v2 environments list environments
UNKEY_MCP_UNKEY_V2_ENVIRONMENTS_LIST_ENVIRONMENTSRetrieve the environments within an app. Use this to enumerate every environment in an app. Identify the app by its project slug and app slug. Results are ordered by environment id. An app has only a handful of environments, so all of them are returned in a single response. **Required Permissions** Your root key must have the following permission: - `environment.*.read_environment` (to read environments in any app)
Unkey v2 environments list environment variables
UNKEY_MCP_UNKEY_V2_ENVIRONMENTS_LIST_ENVIRONMENT_VARIABLESRetrieve the environment variables for an environment. Identify the environment by its project, app, and environment identifiers. Results are ordered by variable id and paginated; when `hasMore` is true, pass the returned `cursor` to fetch the next page. `recoverable` variables are returned with their decrypted plaintext value. `writeonly` variables never expose a value: only the key, kind, and description are returned. **Required Permissions** Your root key must have one of the following permissions: - `environment.*.read_environment_variables` (for any environment) - `environment.<environment_id>.read_environment_variables` (for a specific environment)
Unkey v2 environments remove environment variables
UNKEY_MCP_UNKEY_V2_ENVIRONMENTS_REMOVE_ENVIRONMENT_VARIABLESRemove environment variables from an environment in a single atomic request. This operation only deletes keys by name. Keys in the payload that exist are removed; keys that are not present are ignored, since their absence already matches the requested state. To replace or update values, use `setEnvironmentVariables` instead. The whole operation is atomic: if any part fails the environment is left unchanged. Duplicate keys in the payload collapse to a single removal. Values are never read or returned. **Required Permissions** Your root key must have `delete` permission on the environment's variable collection: `unkey:v1:{workspace_id}:projects/{project_id}/apps/{app_id}/environments/{environment_id}/variables/*#delete`. Replace the placeholders with resource IDs, not names or slugs. A broader permission that covers this collection also grants access.
Unkey v2 environments set environment variables
UNKEY_MCP_UNKEY_V2_ENVIRONMENTS_SET_ENVIRONMENT_VARIABLESCreate or update environment variables for an environment in a single atomic request. By default this is an upsert: each variable in the payload is created if new or fully overwritten if the key already exists, and any variable not in the payload is left untouched. This lets you change one variable without re-sending the others, which matters for write-only secrets you can no longer read back. Set `prune: true` to make it a full replace instead: after upserting, every variable not in the payload is deleted. Sending `prune: true` with an empty `variables` list resets the environment by deleting every variable. Each variable is written exactly as sent, never merged, so omitted optional fields fall back to their defaults rather than the previous value. Values are always encrypted at rest. Set `kind: recoverable` to allow a value to be read back; it defaults to `writeonly`, which can never be read back through the API. **Required Permissions** Your root key must have `write` on the environment's variable collection: `unkey:v1:{workspace_id}:projects/{project_id}/apps/{app_id}/environments/{environment_id}/variables/*#write`. When `prune` is true, it must also have `delete` on the same collection: `unkey:v1:{workspace_id}:projects/{project_id}/apps/{app_id}/environments/{environment_id}/variables/*#delete`.
Unkey v2 environments update settings
UNKEY_MCP_UNKEY_V2_ENVIRONMENTS_UPDATE_SETTINGSUpdate the build, runtime, and regional settings for an environment. All settings fields are optional. Omit a field to leave it unchanged. For nullable fields (`dockerfile`, `healthcheck`, `openapiSpecPath`), send null to clear the value. When `regions` is present it replaces the full set of regions for the environment. **Required Permissions** Your root key must have `#write` permission on the environment, for example: - `unkey:v1:<workspace_id>:projects/*/apps/*/environments/*#write` (any environment in your workspace) - `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>#write` (a specific environment)
Unkey v2 gateway list policies
UNKEY_MCP_UNKEY_V2_GATEWAY_LIST_POLICIESRetrieve an environment's gateway policies in evaluation order: the gateway evaluates them top to bottom and the first rejection short-circuits the request. The full policy list is returned in a single response. **Required Permissions** Your root key must have one of the following permissions: - `environment.*.read_policies` (for any environment) - `environment.<environment_id>.read_policies` (for a specific environment)
Unkey v2 gateway set policies
UNKEY_MCP_UNKEY_V2_GATEWAY_SET_POLICIESReplace an environment's gateway policies in a single atomic request. Policies run at the edge before requests reach your app: verify API keys, rate limit, block requests outright, or validate them against your OpenAPI spec. Policies are an ordered list: the gateway evaluates them top to bottom and the first rejection short-circuits the request. Each policy sets exactly one of `keyauth`, `ratelimit`, `firewall` or `openapi`, plus optional `match` expressions restricting which requests it applies to. Every call is a full replace: the environment's policies become exactly the request list in the given order, and the server generates a fresh id for each one. An empty list removes all policies. The operation is atomic: if any policy is invalid, nothing is written. **Required Permissions** Your root key must have both permissions on the target environment's gateway policies: - `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/gateway/policies/*#write` - `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/gateway/policies/*#delete` Replace the placeholders with resource IDs. Wildcard grants can cover multiple resources, but access remains limited to the root key's workspace.
Unkey v2 gateway update policy
UNKEY_MCP_UNKEY_V2_GATEWAY_UPDATE_POLICYUpdate a single policy in place without resending the environment's full policy list. The policy keeps its id and its position in the evaluation order, and all other policies are untouched. Omitted fields keep their stored values; at least one updatable field must be provided. Setting `match` to null removes all match expressions so the policy applies to every request. Providing one of `keyauth`, `ratelimit`, `firewall` or `openapi` replaces the policy's rule entirely, including switching its type; at most one may be set. Policy ids are regenerated whenever `gateway.setPolicies` replaces the list, so fetch current ids via `gateway.listPolicies` first. **Required Permissions** Your root key must have `write` permission on the policy: `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/gateway/policies/<policy_id>#write`. Use `*` in place of a resource ID to grant access to all resources at that level.
Unkey v2 github install app
UNKEY_MCP_UNKEY_V2_GITHUB_INSTALL_APPStart installing the Unkey GitHub App for your workspace. Returns a GitHub App install URL: open it in a browser to install the app and grant repository access. After installation GitHub returns to Unkey, which binds the installation to your workspace and lands you in the workspace settings. Installation is workspace-wide and takes no parameters. Once installed, link repositories to individual apps with the `git` field on `apps.createApp` and `apps.updateApp`. **Required Permissions** Your root key must have the following permission: - `unkey:v1:<workspace_id>:github/apps/*#write` Replace `<workspace_id>` with the authenticated workspace ID.
Unkey v2 identities create identity
UNKEY_MCP_UNKEY_V2_IDENTITIES_CREATE_IDENTITYCreate an identity to group multiple API keys under a single entity. Identities enable shared rate limits and metadata across all associated keys. Perfect for users with multiple devices, organizations with multiple API keys, or when you need unified rate limiting across different services. **Important** Requires `unkey:v1:<workspaceId>:projects/<projectId>/identities/*#write` for the workspace's default project.
Unkey v2 identities delete identity
UNKEY_MCP_UNKEY_V2_IDENTITIES_DELETE_IDENTITYPermanently delete an identity. This operation cannot be undone. Use this for data cleanup, compliance requirements, or when removing entities from your system. > **Important** > Requires `identity.*.delete_identity` permission > Associated API keys remain functional but lose shared resources > External ID becomes available for reuse immediately