Agent registration is in beta.
- Hosted MCP: add
https://migma.ai/mcpand approve in the browser. - CLI: run
migma login. - Direct client without a working OAuth callback: fetch
https://api.migma.ai/auth.mdand approve the claim code (this page). - CI: set
MIGMA_API_KEY. Do not send agents to Settings to copy a key.
Why use it
No key handling
The agent receives its own key directly. The secret never passes through chat, clipboards, or config files you manage by hand.
You approve every agent
Before any access is granted you see the agent’s name and exactly which permissions it asked for, then approve it in Migma.
Scoped access
The key carries only the permissions the agent requested, such as read-only access or sending. Nothing more.
Revoke anytime
Agent keys appear in Settings → Developers → API Keys next to your own keys. Delete one and the agent loses access immediately.
How it works
OAuth connector approval
1
Your client asks to connect
Add Migma as a connector or hosted MCP server. The client discovers Migma’s sign-in and consent flow automatically.
2
You review and approve
Migma opens
migma.ai/connect/authorize. You see the app name, return host, and requested permissions before approving. Sending access is highlighted as email:send.3
The client receives its key
Once you approve, Migma gives the client a scoped API key automatically. You do not copy or paste a key.
Claim-code fallback
1
Your agent asks to connect
While working on your behalf, the agent registers with Migma and shows you a short code together with a link to
migma.ai/claim. The agent does not approve its own request.2
You review and approve
Open the link, sign in (or create a free account), and enter the code. Migma shows the agent’s name and the permissions it requested before you confirm.
3
The agent picks up its key
Once you approve, the agent automatically receives a scoped API key and continues working. The key is shown to the agent exactly once.
For agents
Everything an agent needs is published at:https://api.migma.ai/.well-known/oauth-authorization-server. OAuth-capable clients should use the authorization-code flow with PKCE. Direct agents that cannot complete the OAuth redirect/callback can use claim-code when they can securely store the returned credential. Claim-code does not repair a broken hosted connector. login_hint is optional — identity binds to whoever signs in and approves in the browser. In short:
access_token is a standard Migma API key. Use it everywhere a key works: the REST API, the SDK, the CLI, and MCP, typically by setting MIGMA_API_KEY.
For the full protocol — discovery endpoints, scopes, code lifecycle, poll-loop error codes, and a complete poll-loop example — see the agent-auth developer reference.
Security
- Claim-code approval requires a signed-in Migma user entering a short-lived code. The email an agent mentions is display only and grants nothing by itself.
- OAuth consent requires a signed-in Migma user approving the client at
migma.ai/connect/authorize. - Requested scopes are capped to the standard API permissions and shown to you before approval.
email:sendallows test and direct email.campaign:writeallows campaign creation, send, and schedule. A credential withcampaign:writeis not no-send.- Codes expire after ten minutes and a registration expires after one hour.
- The key is delivered to the agent exactly once and is never shown again.
- Keep claim tokens and the returned key out of chat, logs, shell history, and shared remote-computer files.
- Revoke any agent key in Settings → Developers → API Keys.
- IT and security reviewers: MCP for IT admins.