Hosted MCP requires Team, Growth, Scale, or Enterprise plus a workspace API key.
When to use hosted MCP
Use hosted MCP when you want a remote client such as Cursor, Claude Code, or Codex to:- inspect the latest hosted audit
- compare recent runtime spend and identified-waste trends
- read ranked recommendations, where-to-change guidance, and source summaries
- push new hosted audit payloads or ingestion jobs
- preview and commit selected hosted policy workflows with explicit write safety
state.db, collect a QM database/Fly snapshot, analyze Cursor usage CSV exports, run fresh audits from local files or OpenClaw SSH and Railway sources, or generate export files directly on your machine.
QM does not gain native database access through hosted MCP. A QM agent can audit an authorized pre-created snapshot in its private scope; an operator performs one-shot direct or Fly-contained collection outside Slack. After an explicitly approved push, hosted MCP can read the pseudonymous summary like any other runtime audit. It cannot provision QM views, credentials, a skill pack, or initiate live collection. Continuous follow capture, durable tool-history capture beyond QM’s retention window, and live Slack-triggered collection are not currently supported.
Requirements
You need:- an active Team, Growth, Scale, or Enterprise workspace
- a workspace API key from the Xerg dashboard
- at least one pushed audit if you want real hosted audit data in the workspace
Fastest setup path
Use the guided MCP setup command:mcp-setup:
- checks existing auth first
- offers browser login inline when auth is missing
- asks whether you want Cursor, Claude Code, Codex, or another client
- prints the hosted config snippet, or writes
.cursor/mcp.jsonwhen a project-scoped Cursor directory already exists
mcp-setup warns that some hosted MCP clients may still require a workspace API key. In that case, create one in the dashboard and set XERG_API_KEY.
Endpoint and auth
Production endpoint:~/.codex/config.toml:
~/.codex/config.toml; MCP tools are loaded when a session starts.
Generic single-server object for clients that ask for one remote server entry:
Protocol compatibility
The hosted endpoint runs the stateless MCP SDK v2 server and supports the MCP 2026-07-28 protocol revision. It also retains stateless compatibility for ordinary legacy clients, including the existinginitialize, tools/list, and tools/call flow, so the client configuration above does not change.
The endpoint does not retain protocol sessions or provide sessionful GET/DELETE, event replay, standalone streams, or pushed server-to-client requests. Every request is authenticated and authorized independently.
Supported clients
Hosted MCP works best in desktop or server MCP clients that can attach custom Bearer headers. Common examples:- Cursor remote MCP
- Claude Code
- Codex
- Claude Desktop via
mcp-remote - other desktop or server MCP clients that support remote HTTP MCP
Available tools
Read tools:xerg_latest_auditxerg_historyxerg_trendsxerg_sourcesxerg_recommendationsxerg_get_optimizationxerg_list_policies
xerg_push_auditxerg_ingest_raw_openclawxerg_upsert_policyxerg_delete_policyxerg_create_policy_from_recommendation
xerg_recommendations returns the richer v2 recommendation shape used by hosted Optimizations, including priorityBucket, implementationSurface, scopeLabel, whereToChange, validationPlan, and actions.
xerg_get_optimization({ optimization_id }) returns one versioned, content-free Fix with Xerg handoff. It includes scoped implementation and validation guidance, the latest immutable validation summary, and Xerg links; it does not include Cedar policy text or mutate code or policy.
Permissions and write safety
Hosted MCP is workspace-scoped.- workspace API keys can read hosted data and push or ingest audits
- signed-in workspace admins can create, update, and delete policies
- workspace API keys can create recommendation-backed draft policies through the recommendation flow
- risky writes use preview and commit semantics instead of silently committing changes
Recommended flow
- run a local audit with
xerg initorxerg audit - push it with
xerg activate --push-latestorxerg audit --push - confirm the hosted workspace has data
- run
xerg mcp-setupor connect your MCP client tohttps://mcp.xerg.ai/mcp - ask about waste, changes, Optimizations, or the next policy draft to review