Developer Tools · IT & Security

Unkey MCP

Unkey MCP lets agents manage API keys, identities, permissions and roles, rate limits, deployments, domains, portals and workspace settings, and query analytics and logs through Unkey's hosted MCP server.

Tools

This is a reference catalogue. Tools cannot be configured or run from this page.

  • Unkey v2 analytics get gateway requests

    A query can use only the public alias `gateway_requests_v1`. CTEs, subqueries, UNION, and EXCEPT are permitted. The root key must have the `project.*.read_gateway_requests` permission. Unkey limits each query to the workspace of the root key. To get the data for one project, app, or environment, add a filter on `project_id`, `app_id`, or `environment_id`. The workspace retention period and the workspace query limits apply. For the columns and more query examples, see the gateway request analytics documentation.

  • Unkey v2 analytics get ratelimits

    Queries may reference only the five public rate limit analytics aliases: `ratelimits_v1`, `ratelimits_per_minute_v1`, `ratelimits_per_hour_v1`, `ratelimits_per_day_v1`, or `ratelimits_per_month_v1`. CTEs, subqueries, UNION, and EXCEPT are supported. Queries are always restricted to the authenticated workspace. Wildcard analytics permission can read every namespace in that workspace; namespace-scoped permissions automatically restrict results to the permitted namespace IDs. Workspace retention and query limits apply.

  • Unkey v2 analytics get runtime logs

    A query can use only the public alias `runtime_logs_v1`. CTEs, subqueries, UNION, and EXCEPT are permitted. The root key must have the `project.*.read_runtime_logs` permission. Unkey limits each query to the workspace of the root key. To get the logs of one project, app, environment, or deployment, add a filter on `project_id`, `app_id`, `environment_id`, or `deployment_id`. The workspace retention period and the workspace query limits apply. For the table, the columns, and more query examples, see [Query runtime logs](https://www.unkey.com/docs/compute/observe/analytics-api).

  • Unkey v2 analytics get verifications

    Execute custom SQL queries against your key verification analytics. CTEs, subqueries, UNION, and EXCEPT are supported. Queries must use one of the five public aliases: `key_verifications_v1`, `key_verifications_per_minute_v1`, `key_verifications_per_hour_v1`, `key_verifications_per_day_v1`, or `key_verifications_per_month_v1`. Physical `default.*` table names are unsupported. Queries are always restricted to the authenticated workspace. Wildcard analytics permission can read every API in that workspace; API-scoped permissions automatically restrict results to the permitted APIs. For complete documentation including available tables, columns, data types, query examples, see the schema reference in the API documentation.

  • Unkey v2 apis create api

    Create an API namespace for organizing keys by environment, service, or product. Use this to separate production from development keys, isolate different services, or manage multiple products. Each API gets a unique identifier and dedicated infrastructure for secure key operations. **Important**: API names must be unique within your workspace and cannot be changed after creation. **Required Permissions** Your root key must have one of the following permissions: - `api.*.create_api` (to create APIs in any workspace)

  • Unkey v2 apis delete api

    Permanently delete an API namespace and immediately invalidate all associated keys. Use this for cleaning up development environments, retiring deprecated services, or removing unused resources. All keys in the namespace are immediately marked as deleted and will fail verification with `code=NOT_FOUND`. **Important**: This operation is immediate and permanent. Verify you have the correct API ID before deletion. If delete protection is enabled, disable it first through the dashboard or API configuration. **Required Permissions** Your root key must have one of the following permissions: - `api.*.delete_api` (to delete any API) - `api.<api_id>.delete_api` (to delete a specific API)

  • Unkey v2 apis get api

    Retrieve basic information about an API namespace including its ID and name. Use this to verify an API exists before performing operations, get the human-readable name when you only have the API ID, or confirm access to a specific namespace. For detailed key information, use the `listKeys` endpoint instead. **Required Permissions** Your root key must have one of the following permissions: - `api.*.read_api` (to read any API) - `api.<api_id>.read_api` (to read a specific API)

  • Unkey v2 apis list keys

    Retrieve a paginated list of API keys for dashboard and administrative interfaces. Use this to build key management dashboards, filter keys by user with `externalId`, or retrieve key details for administrative purposes. Each key includes status, metadata, permissions, and usage limits. **Important**: Set `decrypt: true` only in secure contexts to retrieve plaintext key values from recoverable keys. **Required Permissions** Your root key must have one of the following permissions for basic key listing: - `api.*.read_key` (to read keys from any API) - `api.<api_id>.read_key` (to read keys from a specific API) Additionally, you need read access to the API itself: - `api.*.read_api` or `api.<api_id>.read_api` Additional permission required for decrypt functionality: - `api.*.decrypt_key` or `api.<api_id>.decrypt_key`

  • Unkey v2 apps create app

    Create an app within a project. The app is created with default `production` and `preview` environments. Set exactly one source. Use `git` to create a GitHub-sourced app and connect its repository. Use `oci` to create an app from a prebuilt OCI image. The slug you provide is the stable, caller-defined handle used to reference this app. It must be unique within the project. **Important**: The slug cannot collide with an existing app in the same project. A duplicate slug returns a 409 conflict. **Required Permissions** Your root key must have one of the following permissions: - `project.*.create_app` (to create apps in any project) - `project.<project_id>.create_app` (to create apps in a specific project)

  • Unkey v2 apps delete app

    Delete an existing app, identified by its id. Deletion is asynchronous and eventually consistent. The app and all of its associated resources (environments, deployments, custom domains) are torn down by a background workflow. A successful response indicates the deletion was enqueued, not that every resource has already been removed. Apps with delete protection enabled cannot be deleted until protection is disabled. **Required Permissions** Your root key must have one of the following permissions: - `app.*.delete_app` (to delete any app) - `app.<app_id>.delete_app` (to delete a specific app)

  • Unkey v2 apps get app

    Retrieve a single app by its id or slug within a project. Use this to fetch app details after creation or to verify an app exists before performing operations. **Required Permissions** Your root key must have one of the following permissions: - `app.*.read_app` (to read any app) - `app.<app_id>.read_app` (to read a specific app)

  • Unkey v2 apps list apps

    Retrieve a paginated list of apps within a project. Use this to enumerate every app in a project. Results are ordered by app id and paginated; when `hasMore` is true, pass the returned `cursor` to fetch the next page. **Required Permissions** Your root key must have the following permission: - `app.*.read_app` (to read apps in any project)

  • Unkey v2 apps update app

    Update an existing app, identified by its id. The app name, slug, default branch, and delete protection setting can be changed. Omitted fields are left unchanged. Changing the slug affects the deployment domains generated for this app. **Important**: The slug cannot collide with an existing app in the same project. A duplicate slug returns a 409 conflict. **Required Permissions** Your root key must have one of the following permissions: - `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>#write` (to update a specific app) - `unkey:v1:<workspace_id>:projects/<project_id>/apps/*#write` (to update any app in a project) - `unkey:v1:<workspace_id>:projects/*/apps/*#write` (to update any app in your workspace) The same app write permission covers Git repository changes.

  • Unkey v2 deployments authorize deployment

    Authorize a deployment that is awaiting approval. Deployments from forked pull requests run code from outside your repository, so they wait for a project member to approve them before they build. The deployment must have the status `awaiting_approval`. Authorization is asynchronous: this endpoint only enqueues it and returns immediately. The deployment then moves to `pending` and starts its build. Poll `getDeployment` to follow its status. If the build cannot start, the deployment returns to `awaiting_approval`. **Required Permissions** Your root key must have the following permission: - `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/deployments/<deployment_id>#write`

  • Unkey v2 deployments cancel deployment

    Cancel a deployment that has not finished yet: queued, waiting for approval, building, or deploying. Cancelling aborts its run and marks it `cancelled`. Only in-progress deployments can be cancelled. To take a `ready` preview deployment offline, use `stopDeployment` instead. Cancellation is asynchronous: this endpoint only enqueues it and returns immediately. Poll `getDeployment` until the status reaches `cancelled`. **Required Permissions** Your root key must have the following permission: - `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/deployments/<deployment_id>#write`

  • Unkey v2 deployments create deployment v3

    Create a deployment for an app in a project. Omit the source to use the app's configured default. A Git app builds its default branch. An OCI app deploys its default image. Optionally provide one source override: - `oci`: deploy a prebuilt OCI image without a build. Mutable tags are resolved to immutable digests before rollout. - `git`: build and deploy from the app's connected GitHub repository, a branch, a specific commit, or a fork commit. Requires the app to have a repository connected. - `deployment`: re-run an existing deployment by its id. Git deployments rebuild from the recorded commit; OCI deployments reuse the recorded resolved image. Returns immediately with a `deploymentId`. The build and rollout run asynchronously. Poll `deployments.getDeployment` to watch status until it is ready. **Authentication**: requires a root key with `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/deployments/*#write`. Wildcards can replace resource IDs to grant access across a wider scope.

  • Unkey v2 deployments get deployment

    Retrieve a single deployment by its id. Use this to check a deployment's status after creating it, or to inspect the runtime configuration of an existing deployment. **Required Permissions** Your root key must have this permission: - `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/deployments/<deployment_id>#read` (use `*` for any level)

  • Unkey v2 deployments list build logs

    Retrieve the build output of a deployment as a list of log entries, in the order the build printed them. A log entry is one chunk of build output, and can contain several lines or part of a line. Poll this endpoint to follow a running build: - Send the `pagination.cursor` of the last response as `cursor`. The response contains only the entries after it. - When `hasMore` is true, request again now. - When `hasMore` is false, you have all entries so far. Wait, then request again with the same cursor. - The cursor is absent only when the request had no cursor and the build has no entries yet. - A response can contain fewer than `limit` entries and still have `hasMore: true` when the entries are large. New entries become visible up to a few seconds after the build prints them. To know that a build is done, check the deployment status with `getDeployment`. After the status is no longer `building`, request until you get an empty response at least 5 seconds later. When a build attempt is retried, an entry from the earlier attempt can arrive after the cursor has moved past it, and a poll does not return it. A request without a cursor returns it. A deployment from a prebuilt image has no build and returns no entries. Build logs are kept for 3 months. **Required Permissions** Your root key must have the following permission: - `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/deployments/<deployment_id>/buildLogs#read`

  • Unkey v2 deployments list deployments

    Retrieve a paginated list of deployments within a workspace, newest first. Filter by project, app, environment, lifecycle status, git branch, and creation time. All filters are optional; with none set, every deployment in the workspace is returned. Filters nest: `app` requires `project`, and `environment` and `branch` require both `project` and `app`. Results are paginated; when `hasMore` is true, pass the returned `cursor` to fetch the next page. **Required Permissions** Your root key must have this permission: - `unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/deployments/*#read` (use `*` for every level you do not filter by) The permission must cover every deployment the filters select: a grant on one environment is not sufficient for a request that spans more than that environment.

  • Unkey v2 deployments promote deployment

    Promote a deployment to become the current deployment for its environment. All sticky domains are reassigned from the current deployment to the promoted one, and the previous deployment is scheduled for standby. The deployment must be ready, not already shutting down, belong to the production environment, and its app must already have a current deployment. Promoting the deployment that is already current fails, unless the app is in a rolled-back state, in which case promoting the current deployment confirms the rollback and re-enables automatic promotion of future deployments. Promotion runs as a durable workflow: this endpoint returns once the promotion 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`

Page 1 / 6Next