Skip to main content
Every deployed agent is also an MCP server with one tool: your agent. An AI client such as Claude hands a task to the tool, your agent works on it with its own tools and model, and its reply comes back as the tool’s result. A person adds it by signing in with their Onecortex account; a developer can use an API key instead. This is your agent, called from AI clients. Onecortex does not host MCP servers of your own.

The URL

Your agent’s ID is on its Overview tab. The URL speaks MCP 2026-07-28, and the 2025-11-25 handshake for clients that still open with initialize. It is stateless: every request is answered on its own, and GET answers 405.

Add it to a client

In Claude, add a custom connector and paste the MCP URL. Leave the client ID and secret empty. Claude opens Onecortex’s sign in, then asks you to allow it to use the agent (see Signing in). The connector then offers your agent’s tool in any conversation.

The tool

The result is your agent’s reply as one text block, with the session in structuredContent:
A client that sends a progress token gets a progress notification for each tool call and step while the run works: Calling tool word_count. A run that fails is a tool error (isError: true) whose text is the message from Errors, so the calling model can read it and react.

Call it from code

With the official SDK, @modelcontextprotocol/client:
mcp-call.ts
Output

Signing in

A person adds your agent to a client by signing in, with no key to copy. The client does it for them:
1

The client is refused

A call without a credential answers 401 with WWW-Authenticate: Bearer resource_metadata="https://api.onecortex.io/.well-known/oauth-protected-resource/v1/agents/{agentId}/mcp". That document names Onecortex as the sign in server.
2

The person signs in and allows it

The client opens Onecortex in the browser. After sign in, the consent screen names the app, the address it comes from, the agent and its organization: Allow Claude to use order-status? The app can send messages to that agent and read its replies, and nothing else. When the app returns to a program on the person’s own computer, as Claude Code does, the screen says so.
3

The client calls the agent

The client receives a token for that one agent and calls the tool with it.
Only a member of the agent’s organization can allow it: to anyone else, the consent screen is a page that does not exist. A token works for the one agent it was allowed for; on any other agent it gets 404. It lasts an hour, and the client renews it for up to 90 days before the person is asked again. Every connection appears under Connected apps, where any member can disconnect it. Apps identify themselves with a client metadata document, as Claude, Claude Code and ChatGPT do. A client that needs to register itself first, such as Cursor, connects with an API key. Every call carries an API key as a bearer token:
Create a key under API keys in the dashboard. It is shown once, when you create it. See API keys.

Pauses

A run your agent pauses for a person, as in Human in the loop, reaches the client in one of two ways:
  • A client that can ask the person (MCP 2026-07-28, with the elicitation capability, as Claude Code has) shows one form per question, built from its schema, and sends the answers back. The run continues on the same session and the tool returns its reply. Nothing else is needed.
  • Any other client gets the question as the result’s text, The agent needs input: Refund 40.00 EUR for order 1042? Call again with resume to answer, and the same session_id., and the open questions in structuredContent:
The calling model answers by calling the tool again with the same session_id and a resume that answers every question:

Long runs

A call stays open until your agent finishes, with progress notifications while it works. MCP tasks, where a client polls for a result later, are not supported: a client that has closed the connection has also stopped the run.

Errors

Refusals of the call itself keep their HTTP status, with a JSON-RPC error body, so a client can tell a retry from a mistake:

Limits

MCP calls share your organization’s and agent’s invoke limits. The sign in metadata is limited to 60 requests a minute per address.
Last modified on September 30, 2026