Prerequisites
- An AGO instance with API access enabled
- An API key with the scopes you need (see Available Tools below)
- Your AGO instance URL (e.g.,
https://your-org.ago.ai)
Generate an API Key
- Go to Administration > API Keys
- Click Create API Key
- Give it a descriptive name (e.g.,
Claude Desktop MCP) - Select the scopes that match the tools you want to expose — for example,
knowledge:readto let the client search documents, oranalytics:readfor dashboard data - Copy the key (it starts with
ago_v1_sk_). You will not be able to see it again.
Connect Step by Step
AGO’s MCP endpoint uses JSON-RPC 2.0 over HTTP at/api/mcp. A session goes through these stages: initialize, list tools, call tools, and (optionally) close.
1
Initialize a Session
Send an The response includes the server’s capabilities and a Save the
initialize request to get a session ID:Mcp-Session-Id header:Mcp-Session-Id value — you need it for all subsequent requests.2
Send the Initialized Notification
After initialization, confirm the session is ready. This is a notification (no
id field), so the server responds with 202 Accepted and no body:3
List Available Tools
Discover which tools your API key has access to:The response contains an array of tool definitions with names, descriptions, and input schemas. Only tools matching your API key scopes are returned.
4
Call a Tool
Call a tool by name. For example, to list knowledge documents:Tool responses use this format — the result is a JSON-stringified value inside a text content block:
5
Close the Session
When you are done, terminate the session with a DELETE request:
Connect Claude Desktop
Claude Desktop supports MCP servers natively through its configuration file. Add your AGO instance as a streamable HTTP server. Open (or create) your Claude Desktop config file:- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Connect Cursor
Cursor supports MCP servers through its settings:- Open Settings > MCP
- Click Add new MCP server
- Set the transport type to streamableHttp
- Enter the URL:
https://your-org.ago.ai/api/mcp - Add the
X-API-Keyheader with your API key
Available Tools
The tools exposed to your MCP client depend on the scopes assigned to your API key. Here is what each scope unlocks:Tip: Start with read-only scopes. You can always create a second API key with write scopes later if needed.
SSE Streaming
For long-running tool calls, you can open an SSE (Server-Sent Events) stream to receive results asynchronously:Error Handling
Common Errors
401 Unauthorized — missing or invalid API key Check that yourX-API-Key header is present and the key starts with ago_v1_sk_.
JSON-RPC error -32600 (Invalid Request) — insufficient scope
Your API key does not have the scope required for the tool you tried to call. Generate a new key with the correct scopes, or add scopes to an existing key in Administration > API Keys.
JSON-RPC error -32601 (Method not found)
The MCP method you called does not exist. Supported methods: initialize, notifications/initialized, tools/list, tools/call, ping.
JSON-RPC error -32602 (Invalid params)
A required parameter is missing or has the wrong type. Check the tool’s input schema from the tools/list response.
JSON-RPC error -32700 (Parse error)
The request body is not valid JSON. Verify your Content-Type header is application/json and the body is well-formed.
404 on /api/mcp — session not found or expired
The Mcp-Session-Id header points to a session that no longer exists. Start a new session with an initialize request.
JSON-RPC Error Code Reference
Related Resources
- API Authentication — how API keys and scopes work
- Tools — the built-in tools that agents (and MCP clients) can call
- MCP specification — the full protocol documentation
