https://app.formbricks.com/api/mcp; if you self-host, swap in your own https://<your-formbricks-domain>/api/mcp. For how the flow works and prerequisites, see Connect AI agents (MCP).
Claude Code
Claude Code runs on your machine and performs the OAuth handshake itself.Authenticate
In a Claude Code session, run
/mcp, select formbricks, and choose Authenticate. Your
browser opens to Formbricks; sign in if needed and approve the requested access on the consent
screen. Claude Code registers itself automatically and stores the token — there’s no scope to type
in..mcp.json at the repo root and authenticate with /mcp on first use:
Claude apps (custom connectors)
Use this for claude.ai and Claude Desktop, where Formbricks is added as a custom connector.Open the connectors settings
Go to Settings → Connectors (Customize → Connectors) and click Add custom connector.
Add the server URL
Enter
https://app.formbricks.com/api/mcp and confirm. Leave the optional OAuth client fields
blank — Formbricks registers the connector automatically.Codex
Authenticate
~/.codex/config.toml entry:
Manage and revoke access
Every client you authorize appears under Account settings → Authorized apps (/account/settings/authorized-apps), showing the client name, granted scopes, and when it was
approved. Click Revoke to immediately cut off a client’s access; it will need to be re-authorized
to connect again.
Tokens are short-lived by design: an access token lasts 15 minutes and the client refreshes it
silently in the background for up to 30 days (the refresh window). After that — or after you
revoke — the client re-runs the sign-in and consent flow. Approving surveys:write is re-confirmed
periodically for safety.
Troubleshooting
claude.ai says it couldn't register / connect
claude.ai says it couldn't register / connect
Custom connectors connect from Anthropic’s cloud, which can’t reach
localhost or a private
network. Use a public HTTPS MCP URL (Formbricks Cloud, or a tunnel to a self-hosted instance),
or connect a local server with Claude Code instead.invalid_client or a stale-registration error after reconnecting
invalid_client or a stale-registration error after reconnecting
The client cached a registration that no longer exists on the server (e.g. the server data was
reset). Clear the client’s stored credentials for the server and re-authenticate — in Claude Code,
remove and re-add the server (
claude mcp remove formbricks then claude mcp add …) and run
/mcp again.invalid_scope during sign-in
invalid_scope during sign-in
The client requested a scope it isn’t registered for. Reconnect from scratch so it re-registers
with the scopes the server advertises (
surveys:read, surveys:write, offline_access).Stuck in a consent loop / keeps asking you to sign in
Stuck in a consent loop / keeps asking you to sign in
Usually a cookie or stale-session issue. Make sure you’re signed in to Formbricks in the same
browser the client opens, and that third-party-cookie blocking or a private window isn’t
discarding the session. If it persists, revoke the app under Account settings → Authorized
apps, clear the client’s stored credentials for the server, and reconnect. Self-hosters: an
incorrect base URL (see below) also causes repeated redirects.
A tool call fails even though you're connected
A tool call fails even though you're connected
Scopes don’t override your workspace role. Creating, editing, or deleting surveys requires
write or manage permission on that workspace — ask a workspace owner/manager to grant it.Self-hosted: the browser can't complete sign-in / redirects fail
Self-hosted: the browser can't complete sign-in / redirects fail
OAuth discovery and redirects are built from your configured base URL. Serve Formbricks from a
correct, public HTTPS origin and set
WEBAPP_URL (and BETTER_AUTH_URL) to it. An
http://localhost or mismatched origin breaks the flow for remote clients. See the
environment variables reference.Need the tool schemas, response shapes, or the API-key fallback? See the MCP server technical handbook.