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 keys whoami

    Find out what key this is. **Required Permissions** Your credential must have one of the following permissions for basic key information: - `api.*.read_key` (to read keys from any API) - `api.<api_id>.read_key` (to read keys from a specific API) - `unkey:v1:<workspace_id>:keyspaces/*/keys/*#read_key` (to read keys in any keyspace) - `unkey:v1:<workspace_id>:keyspaces/<keyspace_id>/keys/*#read_key` (to read keys in a specific keyspace) - `unkey:v1:<workspace_id>:keyspaces/<keyspace_id>/keys/<key_id>#read_key` (to read a specific key) If your credential lacks permissions but the key exists, we may return a 404 status here to prevent leaking the existence of a key to unauthorized clients. If you believe that a key should exist, but receive a 404, please double check your credential has the correct permissions.

  • Unkey v2 logs get api request metrics

    Count the requests that the Unkey API served for your workspace per time bucket, split by status class. The filters have the same shape as in `logs.listApiRequests`, without `requestId`. In one field, values under `is`, `contains`, `startsWith`, and `endsWith` are combined with OR. Values under `isNot` and `notContains`, and the range operators `gt`, `gte`, `lt`, and `lte`, are combined with AND. Different fields are combined with AND. Every text match is exact and case-sensitive. `filters.time` sets the window. A missing lower bound is the start of your log retention, and a missing upper bound is now. Unkey picks the bucket width from the window. It is the distance between the `time` of two points. The first bucket starts at or before the window start and counts its whole width. Windows reach back at most 100 days, and requests outside the log retention of your workspace are not counted. **Required Permissions** Your root key must have the following permission: - `unkey:v1:<workspace_id>:logs/apiRequests#read`

  • Unkey v2 logs list api requests

    List the requests that the Unkey API served for your workspace, newest first. Filter by time, path, method, request ID, and status. In one field, values under `is`, `contains`, `startsWith`, and `endsWith` are combined with OR. Values under `isNot` and `notContains`, and the range operators `gt`, `gte`, `lt`, and `lte`, are combined with AND. Different fields are combined with AND. Every text match is exact and case-sensitive. To get the next page, send the `pagination.cursor` of the previous page together with the same `filters`. A cursor does not expire, but rows older than the log retention leave the listing. Unkey returns only requests inside the log retention of your workspace. The calls to this endpoint are not logged. **Required Permissions** Your root key must have the following permission: - `unkey:v1:<workspace_id>:logs/apiRequests#read`

  • Unkey v2 permissions get permission

    Retrieve details about a specific permission including its name, description, and metadata. **Required Permissions** Your root key must have the following permission: - `rbac.*.read_permission`

  • Unkey v2 permissions get role

    Retrieve details about a specific role including its assigned permissions. **Required Permissions** Your root key must have the following permission: - `rbac.*.read_role`

  • Unkey v2 permissions list permissions

    Retrieve all permissions in your workspace. Results are paginated and sorted by their id. **Required Permissions** Your root key must have the following permission: - `rbac.*.read_permission`

  • Unkey v2 permissions list roles

    Retrieve all roles in your workspace including their assigned permissions. Results are paginated and sorted by their id. **Required Permissions** Your root key must have the following permission: - `rbac.*.read_role`

  • Unkey v2 portal get domain

    Read one custom domain attached to a portal, with its verification status and DNS records. Requires `unkey:v1:<workspace_id>:projects/<project_id>/portals/<portal_id>/domains/<domain_id>#read`. Use `portals/<portal_id>/domains/*#read` to read every domain on the portal. Without the permission this returns **404**, not 403, unless the key can read the portal itself.

  • Unkey v2 portal get portal

    Read one portal, by its id or slug, or by the resource it serves. Unreleased and subject to change without notice. Send exactly one of `portal`, `keyspaceId`, or `appId`. Sending more than one is a **400**. **Required Permissions** Your root key must have one of: - `portal.*.read_portal` (to read any portal in the workspace) - `portal.<portal_id>.read_portal` (to read a specific portal) Without the permission this returns **404**, not 403.

  • Unkey v2 portal list domains

    List the custom domains attached to a portal, with their verification status and DNS records. Requires `unkey:v1:<workspace_id>:projects/<project_id>/portals/<portal_id>/domains/*#read`. Without the permission this returns **404**, not 403, unless the key can read the portal itself.

  • Unkey v2 portal list sessions

    List the end users holding a revocable session on a portal, with each end user's sessions. Unreleased and subject to change without notice. A session is revocable until it expires or is revoked. That includes sessions whose portal URL was created but not opened yet. Pass an end user's `externalId` to `portal.revokeSession` to end their sessions. **Required Permissions** Your root key must have `unkey:v1:<workspace_id>:projects/<project_id>/portals/<portal_id>/sessions/*` with `#read` or `#write`. Reading the portal itself is not enough. Without the permission this returns **404**, not 403.

  • Unkey v2 projects get project

    Retrieve a single project in your workspace by its id. Use this to fetch project details after creation, verify a project exists before performing operations, or resolve a project's metadata from its id. **Required Permissions** Your root key must have one of the following permissions: - `project.*.read_project` (to read any project) - `project.<project_id>.read_project` (to read a specific project)

  • Unkey v2 projects list projects

    Retrieve a paginated list of projects in your workspace. Use this to build project management dashboards or to enumerate projects for administrative purposes. Results are ordered by project id and returned in pages. When `hasMore` is true, pass the returned `cursor` to fetch the next page. **Required Permissions** Your root key must have the following permission: - `project.*.read_project` (to read projects in your workspace)

  • Unkey v2 ratelimit get override

    Retrieve the configuration of a specific rate limit override by its identifier. Use this to inspect override configurations, audit rate limiting policies, or debug rate limiting behavior. **Important:** The identifier must match exactly as specified when creating the override, including wildcard patterns. **Permissions:** Requires `ratelimit.*.read_override` or `ratelimit.<namespace_id>.read_override`

  • Unkey v2 ratelimit list namespaces

    Retrieve a paginated list of the rate limit namespaces in your workspace. Use this to find the namespaces your services rate limit against, for example to build an admin view or to look up a namespace ID. Results are ordered newest first and returned in pages. When `hasMore` is true, pass the returned `cursor` to fetch the next page. Deleted namespaces are not returned. The list contains only the namespaces your root key can read. **Required Permissions** Your root key must have one of the following permissions: - `unkey:v1:<workspace_id>:projects/*/ratelimits/namespaces/*#read` (to read any namespace) - `unkey:v1:<workspace_id>:projects/<project_id>/ratelimits/namespaces/<namespace_id>#read` (to read a specific namespace)

  • Unkey v2 ratelimit list overrides

    Retrieve a paginated list of all rate limit overrides in a namespace. Use this to audit rate limiting policies, build admin dashboards, or manage override configurations. **Important:** Results are paginated. Use the cursor parameter to retrieve additional pages when more results are available. **Permissions:** Requires `ratelimit.*.read_override` or `ratelimit.<namespace_id>.read_override`

  • Unkey v2 workspace get flags

    Get feature flags for the workspace associated with your credentials. Each flag is keyed by its slug and includes its current value, description, and whether it can be enabled or disabled. A workspace-specific value takes precedence over the flag's default. If no flags are available, `data` is an empty object. This endpoint takes no request body. **Required Permissions** Your root key must have the following permission: - `unkey:v1:<workspace_id>:flags#read`

  • Unkey v2 workspace get limits

    Get every limit of your workspace, with the current value against each limit that has one. Use this before an operation that a limit can reject, for example to see how many custom domains or log drains remain, or how much CPU, memory, and disk a new deployment can still reserve. The request takes no parameters. Each limit has a `limit`, which is `null` when unlimited, and a `current` value when the limit has one. Billable operations count the current calendar month in UTC. The Compute limits are present only when the workspace has a Compute plan. **Required Permissions** Your root key must have the following permission: - `unkey:v1:<workspace_id>:limits#read`

  • Unkey v2 workspace get usage

    Get the usage of your workspace for one calendar month (UTC): billable API operations, compute usage per environment, and active keys per app. Use this to track usage during the month or to look back at a past month. The response has no prices. Your invoice is the source of truth. Compute usage can be up to 15 minutes late, and it can change for up to 7 days. Send `{}` for the current month to date, or `{"period": {"year": 2026, "month": 9}}` for a full past month. The month must start within the last 90 days. **Required Permissions** Your root key must have this permission: - `unkey:v1:<workspace_id>:usage#read`

PreviousPage 2 / 2