MCP
Connect Claude Desktop, Cursor, VS Code and your own agents to Worksi over the Model Context Protocol, and govern any MCP server through the MCP gateway.
On this page
Worksi speaks the Model Context Protocol (MCP) in two ways. Both live on your gateway, https://gateway.worksi.ai, and use the Streamable HTTP transport (JSON‑RPC 2.0).
| Endpoint | What it is | Credential |
|---|---|---|
/ | The Worksi MCP server: tools for agents to trace their runs, check policies and request approvals, and tools for people to work incidents and approvals from an AI assistant | API key (aiw_sk_…) or personal access token (aiw_pat_…) |
/ | The MCP gateway: a governed proxy in front of an MCP server you register | API key |
Worksi MCP server#
The credential you connect with decides which tools you see.
Agent tools (API key)#
For agents that report their own work. The spans go through the normal ingest path, so these runs appear in traces, feed the detectors and follow your capture mode.
| Tool | What it does |
|---|---|
start_run | Starts a run for a workflow and agent and returns run_id and trace_id |
log_step | Records a step: name, status, duration, input and output |
log_tool_call | Records a tool call: tool, arguments, result, status, duration and data source |
end_run | Finishes the run with its status |
record_outcome | Records a business outcome: type, success and value |
check_tool | Asks whether a tool is allowed or needs approval: allowed, requires_approval, policy_id, enforcement |
request_approval | Asks a person to approve something and returns the approval id and status |
get_approval | Polls an approval |
get_status | Tells whether the agent or workflow is paused or the run was stopped |
Operator tools (personal access token)#
For people working from an AI assistant. The permissions of your role apply, and changes are written to the audit log.
| Tool | What it does |
|---|---|
list_incidents, get_incident | Incidents with the evidence headline, the failure location and the latest diagnosis |
acknowledge_incident | Acknowledges an incident, with an optional note |
list_agents | Lists agents and their status |
pause_agent, resume_agent | Pauses or resumes an agent, under the same approval and four‑eyes rules as the console |
list_approvals, decide_approval | Reviews and decides pending approvals |
get_usage | Shows your plan and this month’s usage |
Both credential types can read two resources: worksi://docs/quickstart and worksi://status. Requests are rate limited per credential.
Connect a client#
Use an API key for the agent tools or a personal access token for the operator tools.
{ "mcpServers": { "worksi": { "command": "npx", "args": [ "-y", "mcp-remote", "https://gateway.worksi.ai/mcp", "--header", "Authorization:${WORKSI_AUTH}" ], "env": { "WORKSI_AUTH": "Bearer aiw_…" } } }}{ "mcpServers": { "worksi": { "url": "https://gateway.worksi.ai/mcp", "headers": { "Authorization": "Bearer aiw_…" } } }}{ "inputs": [ { "type": "promptString", "id": "aiw", "description": "Bearer aiw_…", "password": true } ], "servers": { "worksi": { "type": "http", "url": "https://gateway.worksi.ai/mcp", "headers": { "Authorization": "${input:aiw}" } } }}Transport: Streamable HTTP, JSON-RPC 2.0URL: https://gateway.worksi.ai/mcpHeader: Authorization: Bearer aiw_…Credential: an aiw_sk_… API key, or an aiw_pat_… access token- Claude Desktop starts local servers from
claude_desktop_config.json, so this configuration bridges the remote endpoint with the open-sourcemcp-remotepackage (it needs Node.js). - Cursor reads
~/.cursor/mcp.jsonfor all projects or.cursor/mcp.jsonfor one project. - VS Code reads
.vscode/mcp.jsonin your workspace and asks for the key once.
To check the endpoint from a terminal:
curl -s https://gateway.worksi.ai/mcp \ -H "Authorization: Bearer $AIW_API_KEY" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "curl", "version": "1.0"}}}'MCP gateway: govern any MCP server#
Register an upstream MCP server in Workforce → MCP servers, or with POST /api/v1/mcp-servers: its Streamable HTTP URL, an optional auth header (the secret is encrypted and never shown again) and an optional list of allowed tools. Each server gets a slug and its own endpoint:
https://gateway.worksi.ai/mcp/servers/{slug}Point the agent’s MCP client at that endpoint with an API key, and send the agent’s name in X-AIW-Agent so agent-level tool rules apply:
{ "mcpServers": { "github-via-worksi": { "url": "https://gateway.worksi.ai/mcp/servers/github", "headers": { "Authorization": "Bearer aiw_sk_live_…", "X-AIW-Agent": "release-agent" } } }}Worksi proxies the session and governs it:
tools/listonly returns the tools that the server’s allowed list, yourtool_allowlistpolicies and the agent’s allowed tools permit. Tools are identified as{slug}.{tool}.tools/callis checked against your tool policies first. A disallowed tool (enforce mode) returns JSON‑RPC error-32001tool_not_allowed. A tool that needs approval returns-32002approval_requiredwith theapproval_idof a pending approval that Worksi creates for you. Once a person approves it, retry the call with theX-AIW-Approval-Idheader or_meta.approval_id.- Every tool call is recorded as a
tool_callspan (tool, server, argument hash, a result preview according to your capture mode, status and latency), and the tool appears in your AI inventory. initialize,ping,resources/*,prompts/*and notifications pass through. Upstream errors are returned as they are, and an upstream timeout returns-32003.
Refresh re-reads a server’s tool catalog. Upstream URLs are checked against private-network and cloud-metadata addresses before every connection.
| Plan | Upstream MCP servers |
|---|---|
| Starter | 1 |
| Pro and the trial | 10 |
| Business and Enterprise | Unlimited |
Questions? Email info@xeoo.io.