MCP Server Authentication
Harnesst supports three authentication methods for remote MCP servers.
None
Some MCP servers don’t require credentials (e.g. DeepWiki). Select None as the auth type.
Bearer Token (API Key)
For servers that accept a static API key or token:
- Select API Key as the auth type
- Paste the key
Harnesst encrypts the key before writing it to the database (the encryption key is derived from BACKEND_ENCRYPTION_SALT). On every request the key is sent as:
Authorization: Bearer <your-api-key>The key is shared across all users of the workspace.
OAuth 2.0
For servers that use OAuth, Harnesst supports two credential-management styles:
Dynamic Client Registration (DCR)
With DCR, Harnesst registers itself as an OAuth client with the MCP server on the fly — you don’t need to create anything in the provider’s dashboard.
Flow:
- User clicks Connect on the server card
- Harnesst fetches the server’s OAuth metadata
- If DCR is supported, a client is registered automatically
- User is redirected to the provider’s consent screen
- On callback, tokens are stored in Redis, scoped to that user
DCR is used by most official servers (Notion, Linear, Sentry, Stripe, Supabase, Canva, Intercom, Amplitude, Atlassian, Slack).
Static OAuth credentials
Some providers require you to create an OAuth application yourself and give Harnesst the client ID and secret.
Flow:
- Admin creates an OAuth app in the provider’s dashboard
- Admin enters Client ID + Client Secret when installing the server in Harnesst
- User clicks Connect
- Harnesst uses the pre-registered credentials with a PKCE challenge
- User is redirected to the provider’s consent screen
- On callback, tokens are stored in Redis, scoped to that user
Static credentials are currently used by GitHub, HubSpot, and BigQuery from the official catalog.
The redirect URI you need to configure in the provider is always:
<FRONTEND_URL>/api/backend/mcp-servers/oauth/callbackToken storage
OAuth tokens live in Redis under keys of the form:
mcp:{workspace_id}:{user_id}:{mcp_server_id}:tokensEach user has their own token set for every MCP server they’ve connected. Tokens are refreshed automatically when they expire. OAuth client secrets (for static-credential servers) are encrypted with AES-GCM in Postgres.
Disconnecting, reconnecting, and resetting
- Disconnect my account removes only your OAuth tokens, registration metadata, and cached authorization state for one server in the active workspace.
- Disconnect all my MCP accounts applies the same operation to all of your personal OAuth connections. Other users, API keys, service accounts, custom HTTP credentials, and open endpoints are preserved.
- Reconnect opens the normal authorization flow again and stores a new personal token set.
- Reset all connections is a separate admin operation that wipes stored OAuth state for every user of one server. Use it only after changing shared OAuth configuration or rotating an OAuth application.
When an authorization server advertises an OAuth revocation endpoint, Harnesst also asks the provider to revoke the token. This remote step is best effort. Local credentials are still removed when the provider is unavailable or rejects the revocation request, and the disconnect report shows that warning.