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
- Endpoint and protocol
- Authentication
- Interactive clients (OAuth sign-in)
- Server-to-server agents (client credentials)
- Endpoints
- Scopes
- Set up a server in the console
- Tools
- Workspace records tools
- Ask company data
- Calling the server
- Approvals for sensitive tools
- Limits, errors and logs
- Current limitations
- Connect a provider account across interfaces
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
| Setting | Value |
|---|---|
| Endpoint | https://api.nexra.amakoragroup.com/mcp |
| Transport | Streamable HTTP, POST only. Responses are JSON; GET /mcp returns 405 because no standalone SSE stream is offered. |
| Protocol versions | 2025-11-25 (latest), 2025-06-18, 2025-03-26 |
| Sessions | initialize returns an MCP-Session-Id header. Send it, with MCP-Protocol-Version, on every later request. DELETE /mcp ends the session. |
| Batching | JSON-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:
curl -s https://api.nexra.amakoragroup.com/oauth/token \
-u "$NEXRA_MCP_CLIENT_ID:$NEXRA_MCP_CLIENT_SECRET" \
-d grant_type=client_credentialsThe 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
| Endpoint | Purpose |
|---|---|
GET /.well-known/oauth-protected-resource/mcp | Names Nexra as the authorisation server and lists scopes |
GET /.well-known/oauth-authorization-server | Authorisation server metadata (RFC 8414) |
POST /oauth/register | Dynamic client registration for public clients (RFC 7591) |
GET /oauth/authorize | Authorisation code flow; PKCE with S256 is required |
POST /oauth/token | authorization_code, refresh_token and client_credentials grants |
GET /oauth/jwks | Public signing key for access tokens (RS256) |
POST /oauth/revoke | Revokes 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
| Scope | Grants |
|---|---|
catalogue:read | list_nexra_apis, get_api_reference |
docs:read | get_documentation_page |
sandbox:read | validate_payload |
sandbox:execute | test_sandbox_endpoint |
logs:read | explain_api_error, list_recent_api_requests |
connect:read | list_connect_flows, get_connect_run, get_connect_integration_event, and the workspace records read tools |
connect:execute | trigger_approved_connect_flow, trigger_approved_connect_integration, and the workspace records proposal tools |
prompts:read | Prompt templates |
company:read | company_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
| Tool | Scope | Limit | Notes |
|---|---|---|---|
list_nexra_apis | catalogue:read | 120/min | Published API products |
get_api_reference | catalogue:read | 120/min | Operations for one API version |
get_documentation_page | docs:read | 120/min | A published guide |
validate_payload | sandbox:read | 120/min | Validates against the published schema |
test_sandbox_endpoint | sandbox:execute | 30/min | Needs the sandbox proxy enabled for your workspace |
explain_api_error | logs:read | 120/min | Explains a structured error |
list_recent_api_requests | logs:read | 60/min | Your application's recent requests |
list_connect_flows | connect:read | 30/min | Flows in the application's project |
get_connect_run | connect:read | 30/min | One execution and its steps |
get_connect_integration_event | connect:read | 30/min | Looks up an event by integrationId and idempotencyKey |
trigger_approved_connect_flow | connect:execute | 30/min | Queues a production run of an approved flow |
trigger_approved_connect_integration | connect:execute | 30/min | Queues 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.
| Tool | Scope | Limit | Needs approval | Purpose | Inputs |
|---|---|---|---|---|---|
list_obligations | connect:read | 30/min | No | Obligations with their due dates, clause and owner, soonest first, with due-soon and overdue counts | status (active by default, or open, due_soon, overdue, done, waived), reference, search, limit |
list_asset_customers | connect:read | 30/min | No | The customers an asset serves, with CRM ids; without an asset, each asset and how many customers it has | asset, search, limit |
list_evidence_matrices | connect:read | 30/min | No | Evidence matrices with their review status and size. Titles and counts only | status (pending_review, reviewed, returned) |
list_statements | connect:read | 30/min | No | Statements and whether each is waiting for approval, approved or sent back | status (pending_approval, approved, rejected) |
propose_obligation | connect:execute | 20/min | Yes | Track a new obligation, or change one when obligationId is given | reference, counterparty, text, dueDate (YYYY-MM-DD), recurrence, sourceClause, reminderLeadDays, ownerTeam, obligationId, reason |
propose_obligation_done | connect:execute | 20/min | Yes | Mark an obligation's current due date done | obligationId (required), reason |
propose_asset_customers | connect:execute | 20/min | Yes | Add customers to the customer map, or update existing pairs | rows (required, up to 200, each assetKey, customerName, optional assetName, crmId, externalId), reason |
propose_evidence_matrix | connect:execute | 20/min | Yes, then a review | Save an evidence matrix; once approved it is sent for a person's review | title, criteria, rows (required; each cell evidenced with a quote and source, or not_evidenced), subject, questions |
propose_statement | connect:execute | 20/min | Yes, then an approval | Make a monthly volume statement; once made it waits for its own approval | customerName, 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.
| Tool | Scope | Limit | Purpose | Inputs |
|---|---|---|---|---|
company_ask | company:read | 6/min | Answers 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_summary | company:read | 6/min | Today'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
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:
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.