Configure or troubleshoot the hosted AgentMail MCP server for Codex, Claude Code, Cursor, Claude.ai, ChatGPT, or another Streamable HTTP MCP client. Use for installation, OAuth, API-key headers, connection failures, or MCP tool discovery. Do not use when the connection already works and the user just wants to send, check, or manage mail — use the sibling action skills for that.
75
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Prefer the hosted Streamable HTTP server:
https://mcp.agentmail.to/mcpIt avoids a local Node.js process and the slower release cadence of the published local MCP package.
Use OAuth. Do not put an empty API key in the configuration.
{
"mcpServers": {
"agentmail": {
"type": "http",
"url": "https://mcp.agentmail.to/mcp"
}
}
}Claude Code can also install it directly:
claude mcp add --transport http agentmail https://mcp.agentmail.to/mcpComplete the browser sign-in on first connection. Multi-organization OAuth sessions can use the server's organization-selection tools.
These apps add the server as a connector and complete OAuth in the browser. No API key is needed.
AgentMail, set the URL to https://mcp.agentmail.to/mcp, then click Connect and sign in at console.agentmail.to.https://mcp.agentmail.to/mcp, choose OAuth, and sign in at console.agentmail.to. In a chat, pick AgentMail from the + menu under Developer mode.Connectors added on Claude.ai do not sync to Claude Code; add it there separately.
Add the same type: http server entry to the client's MCP config file:
.cursor/mcp.json.vscode/mcp.json~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows)x-api-key header — recommended for clients without OAuth support (see below).Authorization: Bearer <am_...> header — an alternative header form some clients require.apiKey query param — supported but not recommended; prefer a header so the key doesn't end up in logs or history.For a Streamable HTTP client that cannot complete OAuth, export AGENTMAIL_API_KEY and send it as a header:
{
"mcpServers": {
"agentmail": {
"type": "http",
"url": "https://mcp.agentmail.to/mcp",
"headers": {
"x-api-key": "${env:AGENTMAIL_API_KEY}"
}
}
}
}Avoid query-string credentials when header authentication is available.
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.
The catalog covers more than mail. Point users at these groups when they ask what the connector can do:
list_apps, search_apps, get_app, connect_app, and list_accounts create accounts for an agent at third-party apps (for example "create an account at Firecrawl") and show where each inbox already has one. Use the agentmail-agentid skill for that workflow.agent_attach_human and agent_verify lift an unverified agent organization's limits.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.
list_inboxes as a read-only smoke test. Call list_apps to confirm the AgentID tools are exposed./mcp.AGENTMAIL_API_KEY was not available to the client process.apiKey query param and let the client complete the browser-based OAuth flow instead.am_ key value and prefer the narrowest suitable organization, pod, or inbox scope.92cff92
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.