Avoid query-string credentials when header authentication is available.
Tool Discovery
MCP clients get the tool catalog and schemas live from the hosted runtime; do not rely on a copied tool count. The same generated contract is published at https://github.com/agentmail-to/agentmail-mcp/blob/main/mcp-manifest.json — treat the hosted runtime plus that manifest as the authoritative catalog. OAuth sessions can surface extra organization-selection tools beyond the base set.
Stdio Compatibility
For a stdio-only client, use the supported npm or PyPI agentmail-mcp package. Both are thin stdio bridges to the same hosted runtime: they discover tools dynamically and carry no separate AgentMail tool logic of their own.
Verify
Restart the client or open a new session after installing the plugin.
Inspect MCP status in the client and complete authentication.
Call list_inboxes as a read-only smoke test.
Confirm that read, write, and destructive tool annotations produce the expected approval behavior.
Troubleshoot
A 404 usually means the URL is missing /mcp.
"Invalid API key" or a 401 with API-key auth usually means the key is wrong, revoked, lacks the necessary permissions, or AGENTMAILAPIKEY was not available to the client process.
"Unauthorized" or a 401 with OAuth usually means the sign-in is incomplete or the session expired — drop any apiKey query param and let the client complete the browser-based OAuth flow instead.
Use the full am_ key value and prefer the narrowest suitable organization, pod, or inbox scope.
For a stdio-only client, see Stdio Compatibility above.