Skip to content
API Referencev1

MCP API

The MCP runtime endpoint, Nexra's OAuth endpoints, CLI sessions and the console endpoints that manage MCP servers, imports, credentials and logs.

Updated 12 Oct 2026

On this page

Runtime

MethodPathDescription
POST/mcpJSON-RPC 2.0 over Streamable HTTP
DELETE/mcpEnds the session in MCP-Session-Id. Returns 204, or 404 if the session is not active.
GET/mcp405: no standalone SSE stream
GET/.well-known/oauth-protected-resource and /.well-known/oauth-protected-resource/mcpProtected-resource metadata: resource, authorization_servers, scopes_supported, bearer_methods_supported

Request headers

HeaderNotes
AuthorizationBearer <token>. Required.
MCP-Protocol-VersionRequired after initialize: 2025-11-25, 2025-06-18 or 2025-03-26
MCP-Session-IdReturned by initialize; required afterwards
OriginOptional; if sent it must be an allowed origin

Methods

initialize, notifications/initialized, tools/list, tools/call, resources/list, resources/read, prompts/list and prompts/get.

Notifications return 202. Other calls return 200 with a JSON-RPC result or error:

CodeMeaning
-32600Invalid request (including batches)
-32601Method not found
-32602Invalid parameters
-32003Forbidden: not approved, not permitted, rate limited or disabled
-32004Not found, or unknown session
-32009Conflict, for example an idempotency key reused with different input
-32029Too many questions; wait a few minutes
-32050A service the tool needs is switched off or busy for your workspace
-32603Internal error

The endpoint allows 60 requests a minute per client address, plus each tool's own per-credential limit.

Company data over REST

The REST twins of the company_ask and leadership_summary tools, for clients that call HTTPS rather than MCP, such as a Copilot Studio or Power Automate custom connector.

MethodPathDescription
POST/api/connect/v1/company/ask{ "question": "...", "groupId"?: "...", "followUpOf"?: "..." }. Returns the cited answer and text
GET/api/connect/v1/company/leadershipThe Leadership summary: counts only, never names

Send the same OAuth access token as /mcp (Authorization: Bearer <token>, scope company:read). It must act for a person who signed in themselves (the authorisation code flow). Workspace API keys, MCP credential secrets and client-credentials tokens get 403 with a plain message. Other answers: 400 for a question that's too short or too long, 401 for a missing or expired token, 403 when you aren't in a read access group, 429 after 10 questions in 10 minutes. Every call is in the MCP logs and in the read access log with origin api.

bash
curl -s https://api.nexra.amakoragroup.com/api/connect/v1/company/ask \
  -H "Authorization: Bearer $NEXRA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"question": "How much did we collect last week compared with the week before?"}'

OAuth and CLI sign-in

MethodPathDescription
GET/.well-known/oauth-authorization-serverAuthorisation server metadata (RFC 8414)
POST/oauth/registerDynamic client registration for public MCP clients (RFC 7591)
GET/oauth/authorizeAuthorisation code flow with PKCE (S256); redirects to console consent
POST/oauth/tokenauthorization_code, refresh_token and client_credentials
POST/oauth/revokeRevokes an MCP or CLI refresh token (RFC 7009); always 200
GET/oauth/jwksPublic RS256 signing key
POST/api/console/mcp/oauth/consent/inspect, /approve, /denyConsole consent for MCP clients (session token)
POST/api/console/cli/authorizeConsole approval of nexra auth login: {redirectUri, codeChallenge, state?, clientName?}; loopback callbacks only
GET/api/console/cli/sessionsYour signed-in CLI sessions
POST/api/console/cli/sessions/:id/revokeRevokes one of your CLI sessions

CLI tokens use client_id=nexra-cli. Access tokens last one hour. Refresh tokens rotate on every use, last 30 days (sliding) up to 90 days, and a reused refresh token revokes its session.

Console

These paths start with /api/console/apps/:appId/mcp. They need a session token and the mcp.manage permission (owners, administrators, developers, security administrators and approvers).

MethodPathBody and notes
GET/templatesServer templates
GET/capabilitiesPlatform capabilities that can be published
POST/imports/preview{sourceUrl} or {spec}: an OpenAPI 3.0 or 3.1 JSON document (HTTPS, up to 1 MB). Returns candidate tools.
POST/importsSaves an import for review
GET/importsSaved imports
GET/imports/:importIdOne import
PATCH/imports/:importId/reviewA decision for every candidate: selected tools with 1–20 scopes, a timeout of 100–60,000 ms and a rate limit of 1–1,000 a minute. Write operations must keep approval.
GET/serversServers
POST/servers{name, description?, templateKey?, capabilities?, changeSummary?, importIds?}. Creates a draft.
GET/servers/:serverIdOne server with its versions
PATCH/servers/:serverIdName and description
POST/servers/:serverId/versions{capabilities[], changeSummary}. Creates a draft version.
POST/servers/:serverId/versions/:versionId/publishPublishes the version and archives the previous one
POST/servers/:serverId/versions/:versionId/rollbackCopies an archived version into a new published version
POST/servers/:serverId/disableDisables the server and revokes its credentials
GET/credentialsCredentials without secrets
POST/credentials{name?, serverId?, capabilities?, expiresAt?}. Returns {credential, secret, revealPolicy}; the secret is shown once.
POST/credentials/:credentialId/revokeRevokes the credential
GET/logs?status=&capability=The 100 most recent tool calls

If capabilities is omitted when creating a credential, the credential gets every capability published on the server. expiresAt must be in the future.

See Use the Nexra MCP server for the tool list, scopes and approval flow.

Need a hand?

Ask Nexra Agent for implementation steps or error guidance.

Ask Nexra Agent