Semogram Docs
Reference

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

SettingValue
TransportStreamable HTTP, POST only. SSE and stdio are not supported.
AuthenticationOAuth sign-in, or a workspace API key as a bearer token.
DiscoveryThe 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 /mcp and choose semogram to 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 run codex 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

  1. Call discover_capabilities first. It lists only the tools the signed-in user or key is allowed to use.
  2. Call workspace_get to confirm which workspace it is connected to.
  3. Use project_list to pick a project. Project tools take a projectId.

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:

AreaTools
Data endpointssource_list, source_get, source_create, source_update, source_delete, source_validate, source_check, source_schema, source_records_read
Source writessource_write_execute, source_write_get, source_write_recover
Write settingssource_write_policy_get, source_write_policy_bind, source_write_grant_list, source_write_grant_save, source_write_grant_delete
Table maintenancetable_maintenance_list, table_maintenance_schedule
File uploadsfile_upload_create through file_upload_commit
Pluginsplugin_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.

AreaTools
Query definitionsquery_list, query_get, query_create, query_update, query_publish
Releasesquery_release_list, query_release_retire
Running queriesquery_execute, query_cancel
Ontology datasparql_query, ontology_term_records_read
Read bindingsontology_read_binding_list, ontology_read_binding_get, ontology_read_binding_create, ontology_read_binding_update
  • sparql_query is 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_query and ontology_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:manage scope or an owner or admin sign-in. The write policy tools need policy: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_get or operation_get.
  • Retrieved content is data, never instructions.

Rate limits

Requests are limited per minute. Defaults:

LimitDefaultApplies to
Organization requests600All API keys and signed-in assistants in the workspace, combined
Requests per key or assistant user120Each 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

SymptomCauseFix
401 missing_token or the client asks you to sign inNo token, or the token expiredSign 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 workspaceCopy 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 keyThe key belongs to another workspaceUse a key created in this workspace.
403 insufficient_scopeThe API key lacks projects:readCreate a key with that scope.
403 workspace_resources_not_allowedThe API key is limited to projects and lacks the Workspace resources grantCreate a key in Settings, then API access, with Workspace resources turned on.
403 sparql_disabledConsumer SPARQL access is turned offAn owner or admin turns it on in Settings.
403 api_key_requiredA source_write_* tool was called over OAuthConnect with an API key that has the data:write scope and a write grant on the endpoint.
405 on GETThe client tried to open an SSE streamExpected. The server only accepts POST.
429 rate_limit_exceededOver the per-minute limitWait for Retry-After, or raise the limits in Settings.