When you need this
Use upstream authentication when the MCP server you are registering requires some form of authentication (eg- static bearer token or custom headers). Typical examples:- SaaS-hosted MCP servers
- Internal MCP servers behind an API gateway
- Self-hosted MCP servers using static bearer-token auth
Bearer token via CLI flag
If the upstream server accepts a standard bearer token, pass it at registration time:Bearer token in a config file
Custom headers
If the upstream server expects a non-standard authorization format or additional headers, use theheaders field:
bearer_token and headers.Authorization, the explicit header value should be treated as the more specific configuration.
Environment variable placeholders
JSON config files support${VAR_NAME} placeholders in string fields, including bearer_token and header values:
STDIO servers and auth via environment variables
For STDIO-based MCP servers, authentication is typically passed through environment variables in the server config. Example:Important scope distinction
Two different authentication layers can exist in the same deployment:- Gateway authentication: Enterprise-mode clients authenticating to Mcpjungle.
- Upstream authentication: Mcpjungle authenticating to a registered MCP server.
Current limitation
Mcpjungle does not yet support OAuth flow for upstream server authentication. Support for Oauth flows is being worked on and will soon be available.Related pages
Register servers
Register streamable HTTP MCP servers with CLI flags or config files.
Access control
Configure how MCP clients authenticate to the Mcpjungle gateway itself.
Clients and users
Manage human and machine identities in enterprise mode.
Limitations
Review current gaps, including OAuth support.
