agentmail-mcp — Claude Code skill: what it does, how to install
Configures and debugs the hosted AgentMail MCP endpoint for Claude Code, Cursor, and Codex. It helps with OAuth, API key headers, and handshake failures.
npx skills add agentmail-to/agentmail-skills --skill agentmail-mcp -a claude-codeWhat agentmail-mcp does
This skill guides the setup of the remote AgentMail service at https://mcp.agentmail.to/mcp. Using the hosted HTTP endpoint bypasses running a local Node.js worker and keeps tool schemas current without package updates.
Integration relies on adding the HTTP endpoint into your editor configuration or running claude mcp add. Authentication supports browser OAuth or the x-api-key header linked to the AGENTMAIL_API_KEY environment variable. A 404 status typically indicates a missing /mcp suffix in the URL.
Use this guide strictly for setup and diagnostics. Routine tasks like sending messages or inspecting mailboxes belong to sibling action skills.
What it helps with
- connect the hosted AgentMail server via streamable HTTP
- configure browser OAuth or header-based API key authentication
- resolve 401 unauthorized and 404 missing endpoint errors
- verify available tool schemas with a read-only smoke check
Example prompts for the agent
- Configure the AgentMail MCP connection in Claude Code using OAuth.
- Troubleshoot a 401 unauthorized error when connecting to AgentMail.
- Set up the x-api-key header with AGENTMAIL_API_KEY in my MCP config.
How to install agentmail-mcp
1Skills CLI (Vercel)
npx skills add agentmail-to/agentmail-skills --skill agentmail-mcp -a claude-code2Manually: put the files in place
~/.claude/skills/agentmail-mcp/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/agentmail-mcp/
1Skills CLI (Vercel)
npx skills add agentmail-to/agentmail-skills --skill agentmail-mcp -a codex2Manually: put the files in place
.agents/skills/agentmail-mcp/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add agentmail-to/agentmail-skills --skill agentmail-mcp -a cursor2Manually: put the files in place
.cursor/skills/agentmail-mcp/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install agentmail-to/agentmail-skills agentmail-mcp2Manually: put the files in place
.github/skills/agentmail-mcp/SKILL.md1Skills CLI (Vercel)
npx skills add agentmail-to/agentmail-skills --skill agentmail-mcp -a gemini-cli2Platform CLI
gemini skills install https://github.com/agentmail-to/agentmail-skills --path agentmail-mcpManually: put the files in place
.devin/skills/agentmail-mcp/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add agentmail-to/agentmail-skills --skill agentmail-mcp -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about agentmail-mcp
How to install agentmail-mcp in Claude Code?
Run npx skills add agentmail-to/agentmail-skills --skill agentmail-mcp -a claude-code. The skill file will be placed in ~/.claude/skills/agentmail-mcp/SKILL.md.
What does the agentmail-mcp skill do?
It provides setup instructions and diagnostic steps for connecting editors to the hosted AgentMail MCP server. It is not designed for routine email composition or inbox reading.
What causes a 404 status during server connection?
A 404 response usually points to an incomplete URL path. Ensure the configuration includes the /mcp path, matching https://mcp.agentmail.to/mcp.