Skip to main content
POST
Create an MCP token
The token is created as the person who created the API key. A full access token follows that person’s permissions as they change; a scoped one may only name resources they can reach.
The response carries no bearer_token. It carries a reveal_url instead:
The reveal link needs a person. It resolves only in the browser session of the user who created the API key — calling it with x-api-key returns 401/403, and it works once. A script can therefore mint the token unattended, but a human has to open the link to collect the secret and paste it into the tool that will use it.This is deliberate: an MCP token lives up to a year, and returning it in an API response would put it in whatever log, transcript or webhook payload the caller happens to keep.

What an API key cannot do

Authorizations

x-api-key
string
header
required

API Key authentication. Format: 'x-api-key: api_key'

Body

description
string
required
Maximum string length: 80
expires_at
string<date-time>

When the token stops working. Optional and create-only — omit it for the default 1-year lifetime. Must be in the future and at most 1 year from now. Requires the mcp_token_custom_expiration feature flag.

use_created_by_permissions
boolean
tool_scope
any | null

Names of the native Nekt MCP tools this token may use. NULL = every tool available to the token's creator, future ones included; [] = none. Restricted tokens only — a full-access token always exposes its creator's whole surface.

live_connection_scopes
object[]
write-only
secret_scopes
string<uuid>[] | null
write-only

Ids of the secrets this restricted token may reference. Omit to inherit the creator's; [] for none.

semantic_layer_scopes
object | null
write-only

Semantic Layer surface of this restricted token: {"folders": [...], "documents": [...]}. A folder covers its whole subtree, resolved at read time. Omit to inherit the creator's.

table_scopes
object | null
write-only

Catalog links for the TABLES axis: {"layers": [...], "folders": [...], "tables": [...]}. A layer or folder link means everything inside it, now and in the future — tables only.

volume_scopes
object | null
write-only

Catalog links for the VOLUMES axis: {"layers": [...], "folders": [...], "volumes": [...]}. The same layer linked here brings volumes only, never tables.

all_tables
boolean
all_volumes
boolean
all_secrets
boolean
all_semantic_layer
boolean
all_live_connections
boolean
tables
string[]

Tables (Expandable)

Response

201 - application/json
id
string<uuid>
required
read-only
description
string
required
Maximum string length: 80
bearer_token
string
required
read-only
last_used_at
string<date-time> | null
required
read-only
created_at
string<date-time>
required
read-only
updated_at
string<date-time>
required
read-only
mcp_config
string
required
read-only

MCP Configuration (Field only visible on expanded view. Expandable)

created_by
integer
required
read-only

Created by (Expandable)

expires_at
string<date-time>

When the token stops working. Optional and create-only — omit it for the default 1-year lifetime. Must be in the future and at most 1 year from now. Requires the mcp_token_custom_expiration feature flag.

use_created_by_permissions
boolean
tool_scope
any | null

Names of the native Nekt MCP tools this token may use. NULL = every tool available to the token's creator, future ones included; [] = none. Restricted tokens only — a full-access token always exposes its creator's whole surface.

all_tables
boolean
all_volumes
boolean
all_secrets
boolean
all_semantic_layer
boolean
all_live_connections
boolean
tables
string[]

Tables (Expandable)