Guides
Server credentials
Give the gateway the tokens your MCP servers need, encrypted at rest.
Many MCP servers need their own token: GitHub's needs a GitHub token, a company API needs its API key. Save it on the server once, and the gateway adds it to every request it makes to that server. Your agents never see it.
Add credentials
- New server: fill in the credential fields in Servers → Add server.
- Existing server: click the key button on its row in Servers.
| Field | Sent as |
|---|---|
| Bearer token | Authorization: Bearer <token>. Paste the token alone; a leading Bearer is removed. |
| Extra headers | One Name: value per line, for APIs with their own header names, such as X-Api-Key. Up to 10 headers in total. |
Extra headers
X-Api-Key: sk_live_…
X-Team-Id: team_42How they're stored
- Values are encrypted with AES-256-GCM before they reach the database, and each one is tied to its server.
- They are never shown again and never returned by the API. The dashboard and
GET /api/v1/serversshow only the header names (credentialHeaders). - Saving replaces all saved headers for that server. Tick Remove saved credentials to clear them.
- They're sent on every gateway request to that server: tool calls, syncs and the MCP endpoint's tool list.
Rules
- Only
httpandsseservers take credentials.stdioservers run on your machine and get their secrets from their own environment. - Headers the connection relies on can't be set:
Host,Content-Type,Content-Length,Accept,Connection,Transfer-Encoding,Mcp-Session-Id,Mcp-Protocol-Version,Proxy-*and similar. - Values can't contain line breaks and are limited to 4,096 characters each.
Troubleshooting
502 upstream_errormentioning401or403: the server rejected the credentials. Check the token and its scopes, then save it again.500 credentials_unavailable: the saved values can't be decrypted, usually because the encryption key on a self-hosted gateway changed. Save the credentials again.
Self-hosting?
Credentials need
PORTLESS_ENCRYPTION_KEY to be set. See Self-hosting.