HTTP MCP servers that connect to SaaS APIs often require users to authenticate before the tool can make requests on their behalf. tool-cli handles the entire OAuth flow — browser redirect, token exchange, refresh, and secure local storage — so neither you nor your users have to manage it manually.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/superradcompany/tool-cli/llms.txt
Use this file to discover all available pages before exploring further.
API keys and tokens never leave your machine. All credentials are encrypted at rest in your local tool store.
When to use OAuth
Useoauth_config when your HTTP MCP server:
- Connects to a third-party SaaS API (GitHub, Google, Notion, Slack, etc.)
- Requires a browser-based authorization flow
- Issues short-lived access tokens that need automatic refresh
user_config with sensitive: true instead.
Declaring OAuth in your manifest
Addoauth_config inside mcp_config in your manifest.json:
manifest.json
oauth_config fields
| Field | Type | Description |
|---|---|---|
clientId | string | Pre-registered OAuth client ID for your application |
authorizationUrl | string | Authorization endpoint where users grant access |
tokenUrl | string | Token endpoint for exchanging the auth code for access tokens |
scopes | string[] | OAuth scopes to request (e.g., ["read", "write"]) |
How the flow works
Trigger authentication
Run
tool config set for the tool. tool-cli detects the oauth_config and opens the authorization URL in your browser.User grants access
The browser loads the provider’s consent screen. The user logs in and approves the requested scopes.
Token exchange
tool-cli receives the authorization code via a local redirect, exchanges it for access and refresh tokens at
tokenUrl, and stores them encrypted on disk.Scaffolding an OAuth tool
Usetool init with the --url and --oauth-client-id flags to generate a manifest pre-configured for OAuth:
Managing OAuth credentials
Related
- MCPBX format — HTTP transport and when
.mcpbxis required - Manifest reference — full manifest field reference