Two ways to authenticate
Each IDE supports two ways to authenticate to the Gateway. Pick whichever fits your setup — each IDE guide below shows both.| Method | What you add to your IDE | When to use |
|---|---|---|
| Sign in with TrueFoundry | Just the Gateway URL — no token | The simplest option. Your IDE opens the browser the first time and you sign in with TrueFoundry (using SSO if configured). No need to manage API key or token. |
| API key in headers | The Gateway URL plus an Authorization header with a TrueFoundry API key | When you prefer a static token, or your platform version doesn’t offer the browser sign-in flow. |
These map to the TrueFoundry OAuth and TrueFoundry API Key (PAT) inbound methods in Authentication and Security.
Prerequisites
- An MCP server registered in TrueFoundry that you have access to. If you don’t have one yet, see Getting Started.
- For inbound auth — only if you use the token-in-headers method: a token to authenticate to the Gateway. This can be a TrueFoundry API key (PAT), a Virtual Account token, or a JWT from your own Identity Provider. Not needed if you sign in with TrueFoundry.
- For outbound auth — only if the server uses “your own API key” (per-user): your own upstream API key for that provider, supplied once through Auth Overrides or when prompted during connection. Other outbound methods (shared key, OAuth, token passthrough, no auth) need no key from you.
The examples below use the tenant-scoped URL form
https://<gateway>/<tenant>/mcp/<server>/server. Always copy the exact URL shown on the How To Use tab for your server — that is the source of truth.Connect the server
Adding the server differs per tool, but every step after that is the same. Follow the steps below in order.Add the server in your IDE
Pick your tool below and add the server using either way to authenticate: sign in with TrueFoundry (no token), or provide a TrueFoundry API key in the headers.After adding it, Cursor prompts you to install the server:
Once installed, the server shows as needing authentication until you sign in:
- Cursor
- Claude Code
- VS Code
- Sign in with TrueFoundry (no token)
- API key in headers


Sign in and approve the access request
The first time you use the server, your IDE opens the browser to TrueFoundry. Sign in (using SSO if your organization has it configured), then review what’s requesting access — your IDE and the MCP Gateway URL it’s connecting to — and click Approve.
If you added an API key in the headers instead of just the Gateway URL, the token authenticates you — so this browser sign-in and approval don’t happen.

Complete the server's outbound authentication (if needed)
What you see here depends on the server’s outbound authentication. Most models — shared keys, token passthrough, client credentials, no auth — need no action, since the Gateway handles them automatically. Two need a one-time action from you:
- OAuth (per-user)
- Your own API key (per-user)
The provider’s own authorization screen (for example, GitHub or Slack) opens for you to sign in and authorize access with your own account. Skipped if you’ve already authorized this provider.

A virtual MCP server bundles tools from several servers, so you may complete more than one of the actions above — for example, authorize one provider via OAuth and provide your own key for another.
Return to your IDE
After you approve, the browser redirects automatically back to your IDE — there’s no confirmation page to act on. You can close the browser tab.

Troubleshooting
You're asked to sign in again
You're asked to sign in again
Sign-ins expire periodically. When your IDE opens the browser again, sign in to TrueFoundry to reconnect. Your tools become available again once you finish.
You accidentally denied access
You accidentally denied access
If you declined the access request or closed the browser before finishing, trigger the connection again from your IDE and approve it this time.
The connection stopped working
The connection stopped working
If the server’s tools stop responding, reconnect from your IDE to sign in again. If the server uses a third-party provider, you may also need to authorize that provider again. Confirm you still have access to the server in TrueFoundry under the server’s Collaborators.



