# agentmail-mcp

Configures and debugs the hosted AgentMail MCP endpoint for Claude Code, Cursor, and Codex. It helps with OAuth, API key headers, and handshake failures.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1100 installs · ★ 25
- Author: agentmail-to
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/agentmail-to/agentmail-skills/tree/HEAD/agentmail-mcp/SKILL.md
- Updated: 2026-10-06
- HTML: https://affpapa.org/en/nevibecode/skills/agentmail-mcp

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add agentmail-to/agentmail-skills --skill agentmail-mcp -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/agentmail-mcp/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/agentmail-mcp/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add agentmail-to/agentmail-skills --skill agentmail-mcp -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/agentmail-mcp/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add agentmail-to/agentmail-skills --skill agentmail-mcp -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/agentmail-mcp/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install agentmail-to/agentmail-skills agentmail-mcp
```

2. **Manually: put the files in place**
- File: `.github/skills/agentmail-mcp/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add agentmail-to/agentmail-skills --skill agentmail-mcp -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/agentmail-to/agentmail-skills --path agentmail-mcp
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/agentmail-mcp/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add agentmail-to/agentmail-skills --skill agentmail-mcp -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/agentmail-to/agentmail-skills/tree/HEAD/agentmail-mcp/SKILL.md

## When to use it
- 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
- 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.

## Similar
- [setup-matt-pocock-skills](https://affpapa.org/en/nevibecode/skills/setup-matt-pocock-skills.md) — skill · 1052851 installs
- [ask-matt](https://affpapa.org/en/nevibecode/skills/ask-matt.md) — skill · 766587 installs
- [to-tickets](https://affpapa.org/en/nevibecode/skills/to-tickets.md) — skill · 711230 installs
- [writing-plans](https://affpapa.org/en/nevibecode/skills/writing-plans.md) — skill · 282859 installs
- [caveman-review](https://affpapa.org/en/nevibecode/skills/caveman-review.md) — skill · 411800 installs
- [caveman-compress](https://affpapa.org/en/nevibecode/skills/caveman-compress.md) — skill · 411500 installs

From the same set: [agentmail-to/agentmail-skills](https://affpapa.org/en/nevibecode/by/agentmail-to/agentmail-skills.md) — 6 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
