Authentication determines how your MCP server gets credentials to access external services. Choose the right pattern based on who provides the credentials and how they should be managed.Documentation Index
Fetch the complete documentation index at: https://docs.gumstack.com/llms.txt
Use this file to discover all available pages before exploring further.
| Type | Who provides credentials | Example |
|---|---|---|
| OAuth | User authorizes via OAuth flow | Linear, GitHub, Slack |
| Credentials | User enters in Gumstack UI | OpenAI API key, custom tokens |
| None | Developer sets via env vars | Shared API keys, public APIs |
OAuth
Best for services where users need to connect their own accounts. Gumstack handles the OAuth flow, token storage, and automatic refresh—you just implement the provider.Configure your OAuth app
When registering an OAuth application with the third-party service (e.g., Linear, GitHub, Slack), set the redirect / callback URL to:Implement AuthProvider
Create a class that defines how to authenticate with your service:Register with GumstackHost
Register your auth provider so Gumstack can use it:Use in tools
Access the user’s credentials in your tools:Credentials
Best for services that use API keys or tokens that users provide themselves. Users enter their credentials in the Gumstack UI, and Gumstack securely stores and provides them to your server. Define the fields you need inconfig.yaml:
None (Environment Variables)
Best for shared API keys that you (the developer) provide, or for public APIs that don’t require user-specific credentials. You set the credentials once in the Gumstack dashboard, and they’re available to all users.With
auth.type: none, get_credentials() is synchronous and reads directly
from environment variables.Reserved Environment Variables
Gumstack reserves certain environment variable prefixes for internal use. These will be rejected if you try to use them:GUMLOOP_*GUMSTACK_*
