Buildv1

Use the Nexra MCP server

Connect an AI agent to Nexra over the Model Context Protocol, publish the tools it may call and control approvals, scopes, rate limits and logs.

Updated 12/10/2026

On this page

What the MCP server gives you

Nexra exposes one hosted MCP endpoint. Each application in your workspace owns one or more MCP servers: a reviewed, versioned list of tools, resources and prompts. The credential an agent presents decides which application, server and published version answer the request.

Platform tools: search the API catalogue, read API references and documentation, validate payloads, explain errors and read recent request logs.

Nexra Connect tools: list flows, read runs and integration events, and trigger flows and integrations whose production deployment has been approved.

Workspace records tools: read obligations, the customer map, evidence matrices and statements, and propose changes to them that a person approves. See Workspace records tools.

Ask company data: leaders ask about the business's own data, and read the Leadership summary, from Teams, Copilot, Claude or ChatGPT, as themselves. See Ask company data.

Gateway tools: discover and describe recipe, built-in and private API operations, resolve business concepts, compose explicitly bound workflow plans and request governed execution. See Nexra Gateway.

Imported tools: operations you import from your own OpenAPI document, reviewed by a person before they are published.

Endpoint and protocol

SettingValue
Endpointhttps://api.nexra.amakoragroup.com/mcp
TransportStreamable HTTP, POST only. Responses are JSON; GET /mcp returns 405 because no standalone SSE stream is offered.
Protocol versions2025-11-25 (latest), 2025-06-18, 2025-03-26
Sessionsinitialize returns an MCP-Session-Id header. Send it, with MCP-Protocol-Version, on every later request. DELETE /mcp ends the session.
BatchingJSON-RPC batch arrays are rejected with error -32600.

Authentication

Nexra runs its own OAuth 2.1 authorisation server for MCP. There are two ways to get an access token.

Interactive clients (OAuth sign-in)

Clients that support MCP authorisation, such as Claude, ChatGPT, VS Code, Cursor and the MCP Inspector, need only the server URL. On first use:

The client calls /mcp, receives 401 and reads /.well-known/oauth-protected-resource/mcp and /.well-known/oauth-authorization-server.

It registers itself (dynamic client registration) and opens your browser at Nexra's sign-in.

You sign in to the console and see Authorise an MCP client: the client's name, where it will return you, and the access it asked for. Choose the application and MCP server, then Approve access.

The client receives a short-lived access token (1 hour) and a refresh token (30 days, rotated on every use).

Approving creates a credential named OAuth: <client name> on the application. Revoke it on the application's MCP credentials page to disconnect the client immediately. Members who can manage MCP (owners, administrators, developers, security administrators and approvers) can approve any published tools. A member of a read access group who can't manage MCP can approve for themselves too; their grant covers the Ask company data tools only.

Approve only clients you started yourself. Dynamically registered clients are not verified by Nexra; the consent page shows the address you will be sent back to.

Server-to-server agents (client credentials)

For an agent with no person present, create a credential under MCP → Credentials and exchange it for an access token. The credential's prefix (mcp_…) is the client ID and its secret is the client secret:

bash
curl -s https://api.nexra.amakoragroup.com/oauth/token \
  -u "$NEXRA_MCP_CLIENT_ID:$NEXRA_MCP_CLIENT_SECRET" \
  -d grant_type=client_credentials

The response is {"access_token": "...", "token_type": "Bearer", "expires_in": 3600, "scope": "..."}. Request a new token when it expires. The secret itself is not accepted on /mcp in production.

A client-credentials token has no person behind it, so it can't use the Ask company data tools.

Endpoints

EndpointPurpose
GET /.well-known/oauth-protected-resource/mcpNames Nexra as the authorisation server and lists scopes
GET /.well-known/oauth-authorization-serverAuthorisation server metadata (RFC 8414)
POST /oauth/registerDynamic client registration for public clients (RFC 7591)
GET /oauth/authorizeAuthorisation code flow; PKCE with S256 is required
POST /oauth/tokenauthorization_code, refresh_token and client_credentials grants
GET /oauth/jwksPublic signing key for access tokens (RS256)
POST /oauth/revokeRevokes a refresh token (RFC 7009), ending that grant

Access tokens are RS256 JWTs for the audience https://api.nexra.amakoragroup.com/mcp. They carry the workspace, application, server and credential they were issued for, and stop working as soon as that credential is revoked. Redirect URIs must be HTTPS, an http loopback address (any port) or a private-use scheme such as cursor://. Replaying an old refresh token revokes the whole grant.

Scopes

ScopeGrants
catalogue:readlist_nexra_apis, get_api_reference
docs:readget_documentation_page
sandbox:readvalidate_payload
sandbox:executetest_sandbox_endpoint
logs:readexplain_api_error, list_recent_api_requests
connect:readlist_connect_flows, get_connect_run, get_connect_integration_event, and the workspace records read tools
connect:executetrigger_approved_connect_flow, trigger_approved_connect_integration, and the workspace records proposal tools
prompts:readPrompt templates
company:readcompany_ask, leadership_summary: read only, as the person who signed in

Imported tools use the scopes you assign during review (the console suggests mcp:tool:<tool_name>).

Set up a server in the console

Open Dashboard → MCP and choose an active application. The first visit creates a published default server, "Developer Integration MCP", with every enabled platform tool.

Optional: on the servers page, import an OpenAPI 3.0 or 3.1 JSON document by HTTPS URL or by pasting it (1 MB maximum). Preview the candidate tools, save the review draft, tick the tools to publish, set their scopes and record the human review.

Create a server: enter a name, description and template, then Create draft. Reviewed imports are attached to the draft.

Select capabilities, add a change summary and Create draft version, then Publish it from the version history. Only one version is published at a time; archived versions can be rolled back into a new published version.

Open Credentials, choose the published server and Create credential. The secret is shown once; copy it into your secret manager.

Open Connection guide for the client configuration, and Logs to watch calls.

Disable turns a server off and revokes every credential issued for it.

Tools

ToolScopeLimitNotes
list_nexra_apiscatalogue:read120/minPublished API products
get_api_referencecatalogue:read120/minOperations for one API version
get_documentation_pagedocs:read120/minA published guide
validate_payloadsandbox:read120/minValidates against the published schema
test_sandbox_endpointsandbox:execute30/minNeeds the sandbox proxy enabled for your workspace
explain_api_errorlogs:read120/minExplains a structured error
list_recent_api_requestslogs:read60/minYour application's recent requests
list_connect_flowsconnect:read30/minFlows in the application's project
get_connect_runconnect:read30/minOne execution and its steps
get_connect_integration_eventconnect:read30/minLooks up an event by integrationId and idempotencyKey
trigger_approved_connect_flowconnect:execute30/minQueues a production run of an approved flow
trigger_approved_connect_integrationconnect:execute30/minQueues a production run of an approved integration

Connect tools need the application to be linked to a project, and they only see that project. Trigger tools take the flow or integration ID, an idempotencyKey and a correlationId. They are idempotent: repeating a call with the same idempotencyKey returns the original execution with replayed: true. get_connect_run takes an executionId.

Tools that create webhooks, make live API calls, change credentials or change billing are defined but disabled, and are refused if called.

Resources (nexra://api-catalogue, nexra://openapi/{apiSlug}/{version}, nexra://docs/{slug}, nexra://errors and others) and prompts (generate_integration_plan, debug_failed_api_call, create_sandbox_test_flow, generate_webhook_receiver_code, explain_api_response) are listed with resources/list and prompts/list.

Workspace records tools

These tools give an agent the same view of your workspace records as Nexra Agent: obligations, the customer map, evidence matrices and statements.

The credential acts as the person behind it (the person who approved the OAuth sign-in, or who created the credential) with that person's current workspace role. Read tools return only what that person can see. Proposal tools change nothing: each one stores a proposal, and a different workspace member who manages records (an owner, admin, Connect operator or developer) approves it in the console before anything is saved.

ToolScopeLimitNeeds approvalPurposeInputs
list_obligationsconnect:read30/minNoObligations with their due dates, clause and owner, soonest first, with due-soon and overdue countsstatus (active by default, or open, due_soon, overdue, done, waived), reference, search, limit
list_asset_customersconnect:read30/minNoThe customers an asset serves, with CRM ids; without an asset, each asset and how many customers it hasasset, search, limit
list_evidence_matricesconnect:read30/minNoEvidence matrices with their review status and size. Titles and counts onlystatus (pending_review, reviewed, returned)
list_statementsconnect:read30/minNoStatements and whether each is waiting for approval, approved or sent backstatus (pending_approval, approved, rejected)
propose_obligationconnect:execute20/minYesTrack a new obligation, or change one when obligationId is givenreference, counterparty, text, dueDate (YYYY-MM-DD), recurrence, sourceClause, reminderLeadDays, ownerTeam, obligationId, reason
propose_obligation_doneconnect:execute20/minYesMark an obligation's current due date doneobligationId (required), reason
propose_asset_customersconnect:execute20/minYesAdd customers to the customer map, or update existing pairsrows (required, up to 200, each assetKey, customerName, optional assetName, crmId, externalId), reason
propose_evidence_matrixconnect:execute20/minYes, then a reviewSave an evidence matrix; once approved it is sent for a person's reviewtitle, criteria, rows (required; each cell evidenced with a quote and source, or not_evidenced), subject, questions
propose_statementconnect:execute20/minYes, then an approvalMake a monthly volume statement; once made it waits for its own approvalcustomerName, periodStart, periodEnd, days (required, each date and volume), customerRef, unit, invoices, title, note

A proposal answers with status, actionId, a plain summary and confirmationText, and a note that nothing has changed yet. The evidence matrix tool follows the fairness rules: no scores, ranks or recommendations, no protected characteristics, and nothing is ever rejected automatically.

Ask company data

Two read-only tools let a leader ask about the business's own data where they already work: Microsoft Teams with Copilot Studio, Microsoft 365 Copilot, Claude, ChatGPT or your own agent. They follow exactly the rules of Ask company data in Nexra Agent.

ToolScopeLimitPurposeInputs
company_askcompany:read6/minAnswers one question across the systems your read access group can read. Every number is cited to a read (R1) or a calculation Nexra did in code (C1).question (required), groupId, followUpOf
leadership_summarycompany:read6/minToday's headcount and who's in by team (counts, never names), cash in and out, and money moved. Members of a group with Insights on only.None

As you, and only you. Both tools run only for a person who signed in themselves through OAuth. What you can read depends on your read access group, so a workspace API key, an MCP credential secret or a client-credentials token is refused with a plain message, and nothing is read. Your sign-in must still be an active member of the workspace.

The console's rules.

Only the systems and reads in your group's scope. A read outside it is refused and the answer says so.

Read only. Nothing can be created, changed, sent or paid.

Numbers nothing supports are removed before you see them. Personal details are hidden when your group says so.

10 questions per person per 10 minutes, counted across the console, MCP and the API.

Every question and summary is in the workspace's read access log with where it came from (mcp or api). So is a refused attempt by someone outside every group.

company_ask returns the cited answer (answer, sources, calculations, gaps) and text: the same answer as plain text with its citations, ready to show in a chat. Pass an answer's id as followUpOf to ask a follow-up.

To use the tools, an admin adds company_ask and leadership_summary to the MCP server and publishes a new version (new servers have them). For Teams, see Use Nexra in Teams with Copilot Studio. The same two calls are available over REST; see MCP API.

Calling the server

bash
MCP=https://api.nexra.amakoragroup.com/mcp

curl -i "$MCP" \
  -H "Authorization: Bearer $NEXRA_MCP_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","clientInfo":{"name":"my-agent","version":"1.0.0"},"capabilities":{}}}'

Copy the MCP-Session-Id response header into SESSION_ID. Send notifications/initialized, then tools/list, before calling a tool. Include the session and negotiated protocol headers on each request. The connector setup guide shows discovery and exact operation selection:

bash
curl "$MCP" \
  -H "Authorization: Bearer $NEXRA_MCP_TOKEN" \
  -H "MCP-Session-Id: $SESSION_ID" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"trigger_approved_connect_flow","arguments":{"flowId":"<flow-id>","idempotencyKey":"order-1042-sync","correlationId":"agent-run-1042"}}}'

Tool results are returned as one text content item that contains JSON.

Approvals for sensitive tools

Tools marked requiresConfirmation (including imported write operations) do not run on the first call:

Call the tool with _meta: {"nexra/idempotencyKey": "<unique-key>"}. The response is {"status":"approval_required","approval":{"id":"..."}}, valid for 30 minutes.

A different workspace member with approval rights approves the request in Dashboard → Approvals.

Call the tool again with _meta: {"nexra/approvalRequestId": "<approval-id>"}.

Connect trigger tools are gated differently: they only run flows whose production deployment is already approved, for requesters who are still workspace members.

Limits, errors and logs

Each tool has a per-credential rate limit per minute and a timeout. Exceeding the limit returns a JSON-RPC error.

Common errors: -32004 (unknown session, or a resource outside the credential's project), -32003 (not approved or not permitted), -32009 (idempotency key reused with a different request), -32600 (invalid request).

Logs shows every call with time, capability, type, duration, status and an error summary. Arguments are not stored; only parameter names are recorded, with secret-like keys removed.

Current limitations

There is no stdio or npm package; connect over HTTP.

Validate arguments against each tool's advertised input schema in your client. Imported tools use a generic {pathParameters, query, body} input rather than a schema derived from your OpenAPI document.

The credentials page creates credentials for all of a server's capabilities with no expiry; the API also accepts a capability subset and an expiry date. To rotate a machine credential, create a new one and revoke the old one; OAuth refresh tokens rotate automatically.

The logs search matches exact capability names.

Next: Export MCP and API configuration.

Connect a provider account across interfaces

See Connect through MCP, APIs, CLI and SDKs for account setup, exact operation selection, authentication, copyable examples, sandbox boundaries and approval troubleshooting.

Need a hand?

Ask Nexra Agent for implementation steps or error guidance.

Ask Nexra Agent