Manage API keys, identities, permissions, rate-limit overrides and verification analytics.
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Create a new API namespace to issue keys under. Unkey: POST /v2/apis.createApi.
The API name.
The server marks this tool as destructive. Running it may delete or overwrite data on the server or in any account you connected with your headers.
Create a new API namespace to issue keys under. Unkey: POST /v2/apis.createApi.
| Argument | Type | Description |
|---|---|---|
| name* | string | The API name. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The API name."
}
}
}Create an identity — an end user or organisation that keys and shared rate limits attach to. Unkey: POST /v2/identities.createIdentity.
| Argument | Type | Description |
|---|---|---|
| meta | object | Arbitrary JSON metadata. |
| externalId* | string | Your own id for this user or organisation. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"externalId"
],
"properties": {
"meta": {
"type": "object",
"description": "Arbitrary JSON metadata.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"externalId": {
"type": "string",
"description": "Your own id for this user or organisation."
}
}
}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.
| Argument | Type | Description |
|---|---|---|
| meta | object | Arbitrary JSON metadata. |
| name | string | A human-readable label for the key. |
| apiId* | string | The API to issue the key under. |
| roles | array | Role names to attach. |
| prefix | string | Prefix for the generated key, e.g. acme. |
| enabled | boolean | Create the key enabled. Defaults to true. |
| expires | integer | Expiry as a Unix timestamp in milliseconds. |
| byteLength | integer | Entropy in bytes. Defaults to 16. |
| externalId | string | The identity (your user or org id) this key belongs to. |
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.
| Argument | Type | Description |
|---|---|---|
| keyId* | string | The key to revoke. |
| permanent | boolean | Erase the key entirely instead of soft-deleting it. Defaults to false. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"keyId"
],
"properties": {
"keyId": {
"type": "string",
"description": "The key to revoke."
},
"permanent": {
"type": "boolean",
"description": "Erase the key entirely instead of soft-deleting it. Defaults to false."
}
}
}Fetch an API namespace by id. Read-only despite being a POST. Unkey: POST /v2/apis.getApi.
| Argument | Type | Description |
|---|---|---|
| apiId* | string | The API's id (api_...). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"apiId"
],
"properties": {
"apiId": {
"type": "string",
"description": "The API's id (api_...)."
}
}
}Fetch a single identity with its metadata and shared rate limits. Read-only despite being a POST. Unkey: POST /v2/identities.getIdentity.
| Argument | Type | Description |
|---|---|---|
| identity* | string | The identity's external id or Unkey id. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"identity"
],
"properties": {
"identity": {
"type": "string",
"description": "The identity's external id or Unkey 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.
| Argument | 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. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"keyId"
],
"properties": {
"keyId": {
"type": "string",
"description": "The key's id (key_...), NOT the secret key itself."
},
"decrypt": {
"type": "boolean",
"description": "Also return the plaintext secret. Only works for keys created as recoverable."
}
}
}Fetch the override for one identifier in a namespace. Read-only despite being a POST. Unkey: POST /v2/ratelimit.getOverride.
| Argument | Type | Description |
|---|---|---|
| namespace* | string | The rate-limit namespace name. |
| identifier* | string | The identifier the override applies to. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"namespace",
"identifier"
],
"properties": {
"namespace": {
"type": "string",
"description": "The rate-limit namespace name."
},
"identifier": {
"type": "string",
"description": "The identifier the override applies to."
}
}
}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.
| Argument | Type | Description |
|---|---|---|
| apiId* | string | The API whose keys to list. |
| limit | integer | Page size, 1-100. |
| cursor | string | Cursor from the previous page's response. Omit for the first page. |
| externalId | string | Only keys belonging to this external identity. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"apiId"
],
"properties": {
"apiId": {
"type": "string",
"description": "The API whose keys to list."
},
"limit": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size, 1-100."
},
"cursor": {
"type": "string",
"description": "Cursor from the previous page's response. Omit for the first page."
},
"externalId": {
"type": "string",
"description": "Only keys belonging to this external identity."
}
}
}List identities — the end users or organisations your keys belong to. Read-only despite being a POST. Unkey: POST /v2/identities.listIdentities.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Page size, 1-100. |
| cursor | string | Cursor from the previous page's response. Omit for the first page. |
| search | string | Free-text search over external ids. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size, 1-100."
},
"cursor": {
"type": "string",
"description": "Cursor from the previous page's response. Omit for the first page."
},
"search": {
"type": "string",
"description": "Free-text search over external ids."
}
}
}List the permissions defined in the workspace. Read-only despite being a POST. Unkey: POST /v2/permissions.listPermissions.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Page size, 1-100. |
| cursor | string | Cursor from the previous page's response. Omit for the first page. |
| search | string | Free-text search. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size, 1-100."
},
"cursor": {
"type": "string",
"description": "Cursor from the previous page's response. Omit for the first page."
},
"search": {
"type": "string",
"description": "Free-text search."
}
}
}List the per-identifier overrides in one rate-limit namespace. Read-only despite being a POST. Unkey: POST /v2/ratelimit.listOverrides.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Page size, 1-100. |
| cursor | string | Cursor from the previous page's response. Omit for the first page. |
| namespace* | string | The rate-limit namespace name. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"namespace"
],
"properties": {
"limit": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size, 1-100."
},
"cursor": {
"type": "string",
"description": "Cursor from the previous page's response. Omit for the first page."
},
"namespace": {
"type": "string",
"description": "The rate-limit namespace name."
}
}
}List the roles defined in the workspace. Read-only despite being a POST. Unkey: POST /v2/permissions.listRoles.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Page size, 1-100. |
| cursor | string | Cursor from the previous page's response. Omit for the first page. |
| search | string | Free-text search. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size, 1-100."
},
"cursor": {
"type": "string",
"description": "Cursor from the previous page's response. Omit for the first page."
},
"search": {
"type": "string",
"description": "Free-text search."
}
}
}Check that the Unkey API is reachable and the root key works. The only GET in the v2 surface. Unkey: GET /v2/liveness.
No arguments.
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {}
}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.
| Argument | Type | Description |
|---|---|---|
| query* | string | The SQL query, e.g. SELECT time, outcome, count(*) FROM key_verifications_per_day_v1 GROUP BY time, outcome. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"description": "The SQL query, e.g. SELECT time, outcome, count(*) FROM key_verifications_per_day_v1 GROUP BY time, outcome."
}
}
}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.
| Argument | Type | Description |
|---|---|---|
| limit* | integer | Requests allowed per window. |
| duration* | integer | Window length in milliseconds. |
| namespace* | string | The rate-limit namespace name. |
| identifier* | string | The identifier the override applies to. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"namespace",
"identifier",
"limit",
"duration"
],
"properties": {
"limit": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"description": "Requests allowed per window."
},
"duration": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"description": "Window length in milliseconds."
},
"namespace": {
"type": "string",
"description": "The rate-limit namespace name."
},
"identifier": {
"type": "string",
"description": "The identifier the override applies to."
}
}
}Change a key's name, owner, metadata, expiry, roles, permissions or enabled state. Unkey: POST /v2/keys.updateKey.
| Argument | Type | Description |
|---|---|---|
| meta | object | Replace the key's metadata. |
| name | string | New label. |
| keyId* | string | The key to update. |
| roles | array | Replace the key's roles. |
| 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. |
| permissions | array | Replace the key's permissions. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"keyId"
],
"properties": {
"meta": {
"type": "object",
"description": "Replace the key's metadata.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"name": {
"type": "string",
"description": "New label."
},
"keyId": {
"type": "string",
"description": "The key to update."
},
"roles": {
"type": "array",
"items": {
"type": "string"
},
"description": "Replace the key's roles."
},
"enabled": {
"type": "boolean",
"description": "Enable or disable the key."
},
"expires": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"description": "New expiry as a Unix timestamp in milliseconds."
},
"externalId": {
"type": "string",
"description": "Reassign the key to this identity."
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Replace the key's permissions."
}
}
}Set, increment or decrement a key's remaining credits. Use set with no value for unlimited. Unkey: POST /v2/keys.updateCredits.
| Argument | Type | Description |
|---|---|---|
| keyId* | string | The key to change. |
| value | integer | The credit amount. Omit with operation=set to make the key unlimited. |
| operation* | string | How to apply the value. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"keyId",
"operation"
],
"properties": {
"keyId": {
"type": "string",
"description": "The key to change."
},
"value": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"description": "The credit amount. Omit with operation=set to make the key unlimited."
},
"operation": {
"enum": [
"set",
"increment",
"decrement"
],
"type": "string",
"description": "How to apply the value."
}
}
}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.
| Argument | Type | Description |
|---|---|---|
| key* | string | The plaintext API key to identify. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The plaintext API key to identify."
}
}
}| permissions |
| array |
| Permission names to attach. |
| recoverable | boolean | Store the key encrypted so it can be shown again later. Defaults to false. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"apiId"
],
"properties": {
"meta": {
"type": "object",
"description": "Arbitrary JSON metadata.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"name": {
"type": "string",
"description": "A human-readable label for the key."
},
"apiId": {
"type": "string",
"description": "The API to issue the key under."
},
"roles": {
"type": "array",
"items": {
"type": "string"
},
"description": "Role names to attach."
},
"prefix": {
"type": "string",
"description": "Prefix for the generated key, e.g. acme."
},
"enabled": {
"type": "boolean",
"description": "Create the key enabled. Defaults to true."
},
"expires": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"description": "Expiry as a Unix timestamp in milliseconds."
},
"byteLength": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"description": "Entropy in bytes. Defaults to 16."
},
"externalId": {
"type": "string",
"description": "The identity (your user or org id) this key belongs to."
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Permission names to attach."
},
"recoverable": {
"type": "boolean",
"description": "Store the key encrypted so it can be shown again later. Defaults to false."
}
}
}