Getting Your API Key
When you find an MCP Server you want to use in the Discover tab:- Click the “Get API Key” button on the Server’s card.
- Your unique User API Key will be displayed.
- Important: Copy and store your API Key securely - it will only be shown once!
- The Server will now appear in your “My API Keys” tab with your API Key listed.
Managing Your API Keys
The “My API Keys” tab in the AgentPay Hub is your central location for managing all your API Keys:- View all your active API Keys.
- See which Servers you have API Keys from.
- Monitor usage and remaining free credits for each Server.
- Track your spending history.
Understanding API Key States
Your API Key’s status can change based on your account balance and usage:- Active: Your key is valid and can be used to access the Server.
- Invalid: Your key has been invalidated due to:
- Insufficient balance (including free credits).
- Outstanding payment from a previous failed consumption.
- Reactivated: Your key becomes Active again once you:
- Add sufficient funds to cover any outstanding payments.
- Have a positive balance in your AgentPay account.
Using Your API Key
To use your API Key with an MCP Client:- Configure your client with the Server’s endpoint URL.
- Add your API Key in the request headers:
- Header Name:
X-AGENTPAY-API-KEY
- Value: Your unique User API Key for that Server.
- Header Name:
Best Practices
- Store Securely: Keep your API Keys in a secure location. They are sensitive credentials.
- Monitor Usage: Regularly check your usage and balance in the “My API Keys” tab.
- Maintain Balance: Keep sufficient funds in your AgentPay account to avoid key invalidation.
- Check Status: If your key becomes invalid, check your balance and any outstanding payments.