Unkey MCP by usefulapi
v1.41.1Manage API keys, identities, permissions, rate-limit overrides and verification analytics.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
unkey_liveness Check API health
Check that the Unkey API is reachable and the root key works. The only GET in the v2 surface. Unkey: GET /v2/liveness.
unkey_get_key Get one key by id
Fetch a key's metadata by its key id — name, owner, permissions, credits, rate limits and whether it is enabled. Read-only despite being a POST. Unkey: POST /v2/keys.getKey.
| Parameter | Type | Description |
|---|---|---|
keyId * | string | The key's id (key_...), NOT the secret key itself. |
decrypt | boolean | Also return the plaintext secret. Only works for keys created as recoverable. |
unkey_whoami_key Look up a key by its secret
Given a plaintext API key, return which key it is and its metadata — without spending credits or recording a verification. This is the safe way to identify a key a customer sent you. Unkey: POST /v2/keys.whoami.
| Parameter | Type | Description |
|---|---|---|
key * | string | The plaintext API key to identify. |
unkey_get_api Get one API
Fetch an API namespace by id. Read-only despite being a POST. Unkey: POST /v2/apis.getApi.
| Parameter | Type | Description |
|---|---|---|
apiId * | string | The API's id (api_...). |
unkey_list_api_keys List the keys of an API
List every key issued under one API, optionally narrowed to a single customer by externalId. Read-only despite being a POST. Unkey: POST /v2/apis.listKeys.
| Parameter | Type | Description |
|---|---|---|
apiId * | string | The API whose keys to list. |
cursor | string | Cursor from the previous page's response. Omit for the first page. |
externalId | string | Only keys belonging to this external identity. |
limit | integer | Page size, 1-100. |
unkey_list_identities List identities
List identities — the end users or organisations your keys belong to. Read-only despite being a POST. Unkey: POST /v2/identities.listIdentities.
| Parameter | Type | Description |
|---|---|---|
cursor | string | Cursor from the previous page's response. Omit for the first page. |
limit | integer | Page size, 1-100. |
search | string | Free-text search over external ids. |
unkey_get_identity Get one identity
Fetch a single identity with its metadata and shared rate limits. Read-only despite being a POST. Unkey: POST /v2/identities.getIdentity.
| Parameter | Type | Description |
|---|---|---|
identity * | string | The identity's external id or Unkey id. |
unkey_list_permissions List permissions
List the permissions defined in the workspace. Read-only despite being a POST. Unkey: POST /v2/permissions.listPermissions.
| Parameter | Type | Description |
|---|---|---|
cursor | string | Cursor from the previous page's response. Omit for the first page. |
limit | integer | Page size, 1-100. |
search | string | Free-text search. |
unkey_list_roles List roles
List the roles defined in the workspace. Read-only despite being a POST. Unkey: POST /v2/permissions.listRoles.
| Parameter | Type | Description |
|---|---|---|
cursor | string | Cursor from the previous page's response. Omit for the first page. |
limit | integer | Page size, 1-100. |
search | string | Free-text search. |
unkey_list_ratelimit_overrides List rate-limit overrides
List the per-identifier overrides in one rate-limit namespace. Read-only despite being a POST. Unkey: POST /v2/ratelimit.listOverrides.
| Parameter | Type | Description |
|---|---|---|
namespace * | string | The rate-limit namespace name. |
cursor | string | Cursor from the previous page's response. Omit for the first page. |
limit | integer | Page size, 1-100. |
unkey_get_ratelimit_override Get one rate-limit override
Fetch the override for one identifier in a namespace. Read-only despite being a POST. Unkey: POST /v2/ratelimit.getOverride.
| Parameter | Type | Description |
|---|---|---|
identifier * | string | The identifier the override applies to. |
namespace * | string | The rate-limit namespace name. |
unkey_query_verification_analytics Query key-verification analytics
Run a read-only SQL query over key-verification analytics. The query must use one of the 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 rejected, and results are scoped to your workspace. Unkey: POST /v2/analytics.getVerifications.
| Parameter | Type | Description |
|---|---|---|
query * | string | The SQL query, e.g. SELECT time, outcome, count(*) FROM key_verifications_per_day_v1 GROUP BY time, outcome. |
unkey_create_api Create an API
Create a new API namespace to issue keys under. Unkey: POST /v2/apis.createApi.
| Parameter | Type | Description |
|---|---|---|
name * | string | The API name. |
unkey_create_key Create an API key
Issue a new API key under an API. The plaintext key is returned ONCE in the response and cannot be retrieved later unless recoverable is set. Unkey: POST /v2/keys.createKey.
| Parameter | Type | Description |
|---|---|---|
apiId * | string | The API to issue the key under. |
byteLength | integer | Entropy in bytes. Defaults to 16. |
enabled | boolean | Create the key enabled. Defaults to true. |
expires | integer | Expiry as a Unix timestamp in milliseconds. |
externalId | string | The identity (your user or org id) this key belongs to. |
meta | object | Arbitrary JSON metadata. |
name | string | A human-readable label for the key. |
permissions | array | Permission names to attach. |
prefix | string | Prefix for the generated key, e.g. acme. |
recoverable | boolean | Store the key encrypted so it can be shown again later. Defaults to false. |
roles | array | Role names to attach. |
unkey_update_key Update a key
Change a key's name, owner, metadata, expiry, roles, permissions or enabled state. Unkey: POST /v2/keys.updateKey.
| Parameter | Type | Description |
|---|---|---|
keyId * | string | The key to update. |
enabled | boolean | Enable or disable the key. |
expires | integer | New expiry as a Unix timestamp in milliseconds. |
externalId | string | Reassign the key to this identity. |
meta | object | Replace the key's metadata. |
name | string | New label. |
permissions | array | Replace the key's permissions. |
roles | array | Replace the key's roles. |
unkey_update_key_credits Update a key's credits
Set, increment or decrement a key's remaining credits. Use set with no value for unlimited. Unkey: POST /v2/keys.updateCredits.
| Parameter | Type | Description |
|---|---|---|
keyId * | string | The key to change. |
operation * | string | How to apply the value. |
value | integer | The credit amount. Omit with operation=set to make the key unlimited. |
unkey_delete_key Delete a key
Revoke a key. By default this is a soft delete the key stops working but stays queryable; pass permanent to erase it. Unkey: POST /v2/keys.deleteKey.
| Parameter | Type | Description |
|---|---|---|
keyId * | string | The key to revoke. |
permanent | boolean | Erase the key entirely instead of soft-deleting it. Defaults to false. |
unkey_create_identity Create an identity
Create an identity — an end user or organisation that keys and shared rate limits attach to. Unkey: POST /v2/identities.createIdentity.
| Parameter | Type | Description |
|---|---|---|
externalId * | string | Your own id for this user or organisation. |
meta | object | Arbitrary JSON metadata. |
unkey_set_ratelimit_override Set a rate-limit override
Set a custom rate limit for one identifier in a namespace — how you raise or lower a single customer's limit. Unkey: POST /v2/ratelimit.setOverride.
| Parameter | Type | Description |
|---|---|---|
duration * | integer | Window length in milliseconds. |
identifier * | string | The identifier the override applies to. |
limit * | integer | Requests allowed per window. |
namespace * | string | The rate-limit namespace name. |