Primary Method: API Keys for Autonomous Agents
This process is designed for non-interactive use cases like backend services or autonomous agents. As the user running the agent, you will perform a one-time setup in the App Store UI to provision a key. Your agent then uses this key for all subsequent requests.1
1. Set a Spending Allowance
Before your agent can use a paid service, you must authorize it to spend funds on your behalf. This is done by setting an allowance.
- Navigate to the service’s detail page in the Prometheus App Store.
- Find the “Access & Billing” section.
- Click “Manage Allowance” and approve a spending limit with your wallet. This is a non-custodial
icrc2_approve
transaction; funds remain in your wallet until they are spent.
2
2. Generate an API Key
Once the allowance is set, you can create an API key.
- In the same “Access & Billing” section, click “Create API Key”.
- Give the key a descriptive name (e.g., “My-Claude-Agent-Key”).
- The new key will be displayed on your screen.
Copy this key immediately and store it securely! For your security, this is the only time the full key will be visible.
3
3. Configure Your Agent
With the API key copied, the final step is to provide it to your agent or SDK. The key must be sent in the
x-api-key
header of every request.SDK Implementation (API Key)
If you are building a custom client with the@modelcontextprotocol/sdk
, you provide the API key when you create the transport layer.
Optional: Interactive Login for User-Facing Applications
While API keys are ideal for autonomous agents, the Prometheus SDK also supports a browser-based OAuth 2.1 flow. This method is designed for applications where a user is present to interactively log in and grant consent.The Seamless Login Flow
You do not need to manually register clients or handle tokens. The SDK manages the entire process.1
Connection is Attempted
Your application attempts to connect to the protected MCP server.
2
Login Prompt Appears
The SDK detects the need for authentication and automatically opens a
browser window, prompting the user to log in and grant your application
consent.
3
User Grants Consent
The user logs in with their identity and approves the permissions (e.g.,
“Allow this agent to spend tokens on my behalf”).
4
Connection Succeeds
Once consent is granted, the browser window closes. The SDK securely
receives an access token in the background and automatically retries the
connection, which now succeeds.