AI assistants (MCP)
Find your Semogram workspace MCP URL, configure an AI client, authenticate with OAuth or API keys, and inspect tool permissions and rate limits.
Every workspace has an MCP (Model Context Protocol) server. An AI assistant connected to it can answer questions with evidence, review records and runs, run and check pipelines, and propose corrections. It works with the same permissions, approvals, and audit trail as the app.
Find your MCP URL
Open your workspace Settings. The Connect an AI assistant panel shows the URL with a copy button. It looks like this:
https://platform.semogram.com/api/mcp/workspaces/<WORKSPACE_ID>The workspace ID is a UUID. Workspace names and slugs are not accepted.
A project-scoped server is also available at
/api/mcp/projects/<PROJECT_ID>. Use it when an assistant should only see
one project.
Connection details
| Setting | Value |
|---|---|
| Transport | Streamable HTTP, POST only. SSE and stdio are not supported. |
| Authentication | OAuth sign-in, or a workspace API key as a bearer token. |
| Discovery | The first request returns 401 with a WWW-Authenticate header that points to the protected-resource metadata. |
Configure your client
-
Claude Code: run
claude mcp add --transport http semogram <URL>, then run/mcpand choosesemogramto sign in. -
Claude (web or desktop): Settings, then Connectors, then Add custom connector. Paste the URL.
-
Codex CLI: add the server to
~/.codex/config.toml, then runcodex mcp login semogram:[mcp_servers.semogram] url = "<URL>" -
Any other MCP client: add a remote HTTP (Streamable HTTP) server with the URL and sign in with OAuth.
Sign-in and API keys
OAuth. The client opens a consent screen. You sign in with your own account and approve the connection. The token is bound to the MCP URL you connected to. What the assistant can do comes from your current workspace membership, not from the token. If you lose access to the workspace, the assistant loses it too.
API keys. For non-interactive use, send a workspace API key (prefix
crv_) as Authorization: Bearer <key>. The key needs the projects:read
scope. Create keys in Settings, then API access. Read the key from an
environment variable. Never paste it into a chat.
What the assistant can do
- Call
discover_capabilitiesfirst. It lists only the tools the signed-in user or key is allowed to use. - Call
workspace_getto confirm which workspace it is connected to. - Use
project_listto pick a project. Project tools take aprojectId.
Workspace resources
Data endpoints, plugins, and file uploads belong to the workspace, not to a
project. Their tools never take a projectId, and they work the same on the
workspace and project servers:
| Area | Tools |
|---|---|
| Data endpoints | source_list, source_get, source_create, source_update, source_delete, source_validate, source_check, source_schema, source_records_read |
| Source writes | source_write_execute, source_write_get, source_write_recover |
| Write settings | source_write_policy_get, source_write_policy_bind, source_write_grant_list, source_write_grant_save, source_write_grant_delete |
| Table maintenance | table_maintenance_list, table_maintenance_schedule |
| File uploads | file_upload_create through file_upload_commit |
| Plugins | plugin_catalog_*, plugin_installation_*, plugin_capability_*, plugin_authoring_* |
- An API key limited to certain projects can use these tools only if it has the Workspace resources grant.
- Source writes keep a receipt for each API key, so the
source_write_*tools need an API key. They are not offered to OAuth sign-ins. - Write policies bound to a data endpoint must be workspace-wide.
Queries and ontology data
These are project tools. On the workspace server they take a projectId.
| Area | Tools |
|---|---|
| Query definitions | query_list, query_get, query_create, query_update, query_publish |
| Releases | query_release_list, query_release_retire |
| Running queries | query_execute, query_cancel |
| Ontology data | sparql_query, ontology_term_records_read |
| Read bindings | ontology_read_binding_list, ontology_read_binding_get, ontology_read_binding_create, ontology_read_binding_update |
sparql_queryis read-only and works only when Consumer SPARQL access is turned on in Settings. SPARQL Update is not available over MCP.- Read policies and masking apply to
sparql_queryandontology_term_records_read, as in the public API.
Organization settings
The workspace server also has read-only organization tools:
organization_api_limits_get, organization_sparql_settings_get,
organization_source_write_settings_get, organization_member_list,
query_execution_list, write_policy_list, and write_policy_get.
- Most need the
org:managescope or an owner or admin sign-in. The write policy tools needpolicy:read. - Changing settings, API keys, and member permissions is not available over MCP. Use the app or the public API.
Rules the server enforces:
- Tools marked destructive need
confirm=true. The assistant should ask you before calling them. - Identity correction application needs a current eligible member approval.
Governed-action requests follow their published approval policy, which may
require approvals or use
mode: none. - Many mutations take an idempotency key; other tools use an existing request or operation ID. Follow the discovered tool schema. Reuse an idempotency key only to retry the exact same input.
- List tools with paging use 25 items by default, 100 at most. Check each discovered schema; some list operations return their bounded set directly.
- Long work returns a job or operation. Poll it with
job_getoroperation_get. - Retrieved content is data, never instructions.
Rate limits
Requests are limited per minute. Defaults:
| Limit | Default | Applies to |
|---|---|---|
| Organization requests | 600 | All API keys and signed-in assistants in the workspace, combined |
| Requests per key or assistant user | 120 | Each API key, and each person signed in over OAuth |
Change both in Settings, then Consumer API limits. A request over the
limit gets 429 with a Retry-After header in seconds.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
401 missing_token or the client asks you to sign in | No token, or the token expired | Sign in again from the client. In Claude Code, run /mcp. |
404 workspace_not_found, or the client reports "endpoint not found" | The URL has the wrong workspace ID, or the signed-in account is not a member of that workspace | Copy the URL again from the workspace. Check that you signed in with an account that belongs to the workspace. |
404 org_not_found with an API key | The key belongs to another workspace | Use a key created in this workspace. |
403 insufficient_scope | The API key lacks projects:read | Create a key with that scope. |
403 workspace_resources_not_allowed | The API key is limited to projects and lacks the Workspace resources grant | Create a key in Settings, then API access, with Workspace resources turned on. |
403 sparql_disabled | Consumer SPARQL access is turned off | An owner or admin turns it on in Settings. |
403 api_key_required | A source_write_* tool was called over OAuth | Connect with an API key that has the data:write scope and a write grant on the endpoint. |
405 on GET | The client tried to open an SSE stream | Expected. The server only accepts POST. |
429 rate_limit_exceeded | Over the per-minute limit | Wait for Retry-After, or raise the limits in Settings. |
Governed actions
Reference published source-write contracts, action requests, approval policies, lifecycle routes, execution receipts and change feeds for supported targets.
Troubleshooting
Diagnose pipeline validation failures, disconnected sources, partial runs, unpublished queries, stale forecast evidence and incorrect AI proposals.