Authentication
Qoris MCP supports two authentication methods for connecting to your workspace:API Key
Simple authentication using a project API key. Best for direct integration and scripting.
OAuth 2.0
User-delegated access via OAuth with consent. Best for MCP clients like Cursor and Claude Code.
API Key
API keys provide direct, project-scoped access. Each key is tied to a user and project. Generate keys from your project’s MCP tab in the Qoris dashboard.Method 1: Query Parameter
Pass the API key as a query parameter in the MCP URL:Method 2: Authorization Header (Recommended)
Pass the API key in theAuthorization header:
API Key Format
- Prefix:
qoris_(keys starting with this are validated as API keys) - Length: 38 characters total (
qoris_+ 32 random chars) - Storage: Keys are hashed; the raw key is only shown once at creation
OAuth 2.0
OAuth 2.0 enables MCP clients (Cursor, Claude Code, etc.) to request access on behalf of users. Users sign in and approve access via a consent page. This flow supports apps that cannot securely store API keys.Flow Overview
- Discovery — Client fetches OAuth metadata from well-known endpoints
- Client Registration — Client registers dynamically (DCR) or uses pre-registered client
- Authorization — User is redirected to consent page, signs in if needed, selects workspace, approves
- Token Exchange — Client exchanges authorization code (+ PKCE verifier) for access token
- MCP Access — Client uses access token as Bearer token for MCP requests
Discovery Endpoints
OAuth Authorization Server (RFC 8414):issuer, authorization_endpoint, token_endpoint, registration_endpoint, scopes_supported, code_challenge_methods_supported, etc.
OAuth Protected Resource (RFC 9728):
resource, authorization_servers, scopes_supported, bearer_methods_supported.
Endpoints
Dynamic Client Registration (DCR)
Clients register themselves withclient_name and redirect_uris:
client_id. DCR deduplication: if a client with the same client_name and redirect_uris already exists, the existing client is returned (200) instead of creating a duplicate.
Authorization Code Flow with PKCE
- Generate
code_verifier(random) andcode_challenge(S256 hash) - Redirect user to:
- User lands on consent page (
https://app.qoris.ai/oauth/consent?client_id=...&...) - User signs in (Clerk), selects project/workspace, approves
- Frontend calls
/oauth/authorize/approvewithcode_challenge,project_id, etc. - Backend returns
redirect_uriwith?code=...&state=... - Client exchanges code:
Access Tokens
- Format: Opaque Bearer token (not JWT)
- Expiration: Access tokens do not expire. They remain valid until explicitly revoked.
- Revocation: User can revoke via Connected Apps in the Qoris dashboard, or via
DELETE /oauth/connections/<token_id> - Refresh tokens: Issued with access tokens; 30-day expiration. Used to obtain new access token when rotating.
Access tokens have no expiration. Revoke them from Connected Apps when you want to disconnect an app.
Consent Page
The consent page (https://app.qoris.ai/oauth/consent) shows:
- App name (from
client_name) - Requested scopes (save_memories, get_memories, update_memories, delete_memories, search_knowledge)
- Project/workspace selector
- Approve / Deny buttons
redirect_url preserved in session storage.
Connected Apps UI
Users manage OAuth connections from Workspace settings → MCP tab → Connected Apps. Each connection shows: app name, workspace, scopes, “Connected” date. Users can revoke access at any time. There is no expiration display — connections stay active until revoked.MCP Scopes
All scopes are granted by default when user approves. Clients may request a subset via the
scope parameter.
Token Validation
- Redis cache: Valid tokens are cached for 60 seconds to reduce DB load
- Cache invalidation: On revoke, the token is removed from cache immediately
- Bearer methods: Only
headeris supported (Authorization: Bearer <token>)
Choosing an Auth Method
Authentication and Knox
Authentication controls who can connect to Qoris MCP. Knox controls what an agent can safely do after it has access. Use Knox in addition to authentication when connected agents can:- run commands
- write files
- call MCP tools with untrusted input
- create scheduled tasks
- invoke subagents
- perform actions that need audit or approval
Next Steps
- Quick Start Guide — Setup with API key
- MCP Tools Overview — Available tools
- Knox Overview — Govern agent actions, hooks, policies, approvals, and audit
- Technical Reference — Full integration details
