Unkey MCP by usefulapi

v1.41.0
io.usefulapi/unkey Checked 1 day ago Published 12 hours ago

Manage 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.

ParameterTypeDescription
keyId *stringThe key's id (key_...), NOT the secret key itself.
decryptbooleanAlso 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.

ParameterTypeDescription
key *stringThe 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.

ParameterTypeDescription
apiId *stringThe 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.

ParameterTypeDescription
apiId *stringThe API whose keys to list.
cursorstringCursor from the previous page's response. Omit for the first page.
externalIdstringOnly keys belonging to this external identity.
limitintegerPage 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.

ParameterTypeDescription
cursorstringCursor from the previous page's response. Omit for the first page.
limitintegerPage size, 1-100.
searchstringFree-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.

ParameterTypeDescription
identity *stringThe 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.

ParameterTypeDescription
cursorstringCursor from the previous page's response. Omit for the first page.
limitintegerPage size, 1-100.
searchstringFree-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.

ParameterTypeDescription
cursorstringCursor from the previous page's response. Omit for the first page.
limitintegerPage size, 1-100.
searchstringFree-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.

ParameterTypeDescription
namespace *stringThe rate-limit namespace name.
cursorstringCursor from the previous page's response. Omit for the first page.
limitintegerPage 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.

ParameterTypeDescription
identifier *stringThe identifier the override applies to.
namespace *stringThe 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.

ParameterTypeDescription
query *stringThe 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.

ParameterTypeDescription
name *stringThe 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.

ParameterTypeDescription
apiId *stringThe API to issue the key under.
byteLengthintegerEntropy in bytes. Defaults to 16.
enabledbooleanCreate the key enabled. Defaults to true.
expiresintegerExpiry as a Unix timestamp in milliseconds.
externalIdstringThe identity (your user or org id) this key belongs to.
metaobjectArbitrary JSON metadata.
namestringA human-readable label for the key.
permissionsarrayPermission names to attach.
prefixstringPrefix for the generated key, e.g. acme.
recoverablebooleanStore the key encrypted so it can be shown again later. Defaults to false.
rolesarrayRole 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.

ParameterTypeDescription
keyId *stringThe key to update.
enabledbooleanEnable or disable the key.
expiresintegerNew expiry as a Unix timestamp in milliseconds.
externalIdstringReassign the key to this identity.
metaobjectReplace the key's metadata.
namestringNew label.
permissionsarrayReplace the key's permissions.
rolesarrayReplace 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.

ParameterTypeDescription
keyId *stringThe key to change.
operation *stringHow to apply the value.
valueintegerThe 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.

ParameterTypeDescription
keyId *stringThe key to revoke.
permanentbooleanErase 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.

ParameterTypeDescription
externalId *stringYour own id for this user or organisation.
metaobjectArbitrary 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.

ParameterTypeDescription
duration *integerWindow length in milliseconds.
identifier *stringThe identifier the override applies to.
limit *integerRequests allowed per window.
namespace *stringThe rate-limit namespace name.