The URL
initialize. It is stateless: every request is answered on its own, and GET answers 405.
Add it to a client
- Claude
- Claude Code
- Cursor and other clients
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:
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
- TypeScript
- curl
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.
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:
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 instructuredContent:
session_id and a resume that answers every question: