How do I give an AI agent a MoltPe API key?
Generate an API key from the MoltPe dashboard at moltpe.com/dashboard, then provision it to your AI agent through whichever path matches your stack — environment variable for self-hosted agents, MCP server config for Claude Desktop / Cursor / Windsurf, secret manager for production deployments. Each agent gets its own key tied to its own wallet — never share keys across agents. Rotate keys if compromised; old keys can be revoked instantly. MoltPe is AI-native payment infrastructure that gives AI agents isolated wallets with programmable spending policies for autonomous USDC stablecoin transactions.
The short version
- One key per agent: Each agent's key maps to its own wallet and policy. Sharing keys collapses the isolation that makes the system safe.
- Pick the right secret store: Env var for local dev, MCP config for desktop AI tools, AWS Secrets Manager / GCP Secret Manager / Doppler / Vault for production.
- Revoke instantly: Compromised key? Revoke from the dashboard. New key issues immediately. The old key stops working in seconds.
In more detail
The dashboard flow takes about thirty seconds. Sign in, open Wallets, create a new wallet for the agent, generate an API key against that wallet, copy the key once (the dashboard never shows it again). Now the question is just: how does the agent get the key at runtime, without you pasting it into a prompt or committing it to git? The answer depends on where the agent lives.
For self-hosted agents (Python, Node, Go — whatever you've written), set MOLTPE_API_KEY as an environment variable and read it from process.env or os.environ. In production, source the env var from your secret manager (AWS Secrets Manager, GCP Secret Manager, Vault, Doppler — any of them work) so the key is never on disk. For desktop AI tools that load MCP servers (Claude Desktop, Cursor, Windsurf), the MoltPe MCP entry in the tool's config file takes the API key as a config value — the tool reads it once at startup and the key never leaves the local machine.
The "one key per agent" rule is worth holding. The reason isolated wallets work is that each one has independent caps, allowlists, and audit trails. Sharing a key across agents collapses all of those guarantees into a single bag — a compromise of one agent now drains the shared wallet, and your transaction logs no longer tell you which agent did what. Provisioning is cheap; isolation is valuable; pay the small cost to keep them separate. If a key ever leaks, the dashboard's revoke button takes effect within seconds; rotating to a new key is the same operation in reverse.
Related questions
- How do I onboard an AI agent?
- How do I secure my AI agent wallet?
- Blog: Integrate MoltPe in 5 minutes — developer quickstart
- Blog: MCP server for AI agent payments
About MoltPe
MoltPe is AI-native payment infrastructure that gives AI agents isolated wallets with programmable spending policies for autonomous USDC stablecoin transactions. Live on Polygon PoS, Base, and Tempo.