SublimDocs

Authentication

Every request to the MCP server carries a bearer token in the Authorization header. There are two kinds:

OAuthWorkspace token
ForClaude, ChatGPTClaude Code, Codex, Cursor, VS Code, scripts
Set upSign in to Sublim and approve, from the assistantCreate it in Workspace settings → MCP, paste it in the client
SeesThe projects your Sublim account can accessThe projects selected on the token, in one workspace
LifetimeRenewed automatically while in useUntil revoked
RevokeRemove the connector in the assistantWorkspace settings → MCP

Both are read-only: no tool can modify your data, whatever the token.

OAuth

Claude and ChatGPT use OAuth 2.1 with PKCE. When you add the connector:

  1. The assistant opens a Sublim page. Sign in if needed.
  2. Sublim shows the assistant's name and the access it asks for. Click Allow.
  3. The assistant receives an access token, valid 7 days, and a refresh token, renewed on each use, to stay connected without asking again.

The client ID is entered by hand when you add the connector: claude-ai for Claude, chatgpt for ChatGPT, with no secret. See Connect your AI.

ScopeGrants
profileYour name and email, so the assistant knows who is connected.
projects.readRead access to the projects you are a member of. Required by the MCP server.

Same access as you

An OAuth connection acts as you. It sees exactly the projects you see in Sublim. If you lose access to a project, the assistant does too.

Workspace tokens

Workspace tokens are for tools that take a token in their configuration rather than signing you in.

Create one

  1. In Sublim, open Workspace settings → MCP.
  2. Click New token, give it a name (for example Cursor – Jane), and choose its projects:
    • pick specific projects: only those;
    • or switch on All projects: every project of the workspace, including the ones created later.
  3. Click Create token, then copy it. It looks like sblm_mcp_3f9a… and is shown only once: Sublim stores only a hash of it.

The page also gives ready-to-paste commands for Claude Code and Codex.

Use it

Send it as a bearer token:

HTTP
POST /mcp HTTP/1.1
Host: mcp.sublimanalytics.com
Authorization: Bearer sblm_mcp_YOUR_TOKEN
Content-Type: application/json
Accept: application/json, text/event-stream

list_projects returns only the token's projects. Asking for another project returns an error telling the assistant to pick one from list_projects.

Revoke it

Revoke a token in Workspace settings → MCP. It stops working within 5 minutes. The list also shows when each token was last used, which helps spot the ones you no longer need.

Treat it like a password

Anyone with the token can read its projects' analytics. Prefer one token per person and per tool, limit it to the projects needed, keep it out of version control, and revoke it when it is no longer used.

Errors

ResponseMeaning
401 with WWW-Authenticate: Bearer resource_metadata=…Missing, expired or revoked token. OAuth clients use the metadata URL to sign in again.
Tool error "This MCP token does not grant access to project …"The project isn't in the token's selection.
405 on GET /mcpThe server only accepts POST (streamable HTTP without SSE).

Discovery endpoints

OAuth clients find the authorization server on their own, through these standard metadata documents:

URLStandard
https://mcp.sublimanalytics.com/.well-known/oauth-protected-resourceProtected resource metadata (RFC 9728)
https://api.sublimanalytics.com/.well-known/oauth-authorization-serverAuthorization server metadata (RFC 8414)