Email inboxes for AI agents: send, receive, search, drafts with owner approval, and webhooks.
One address for any MCP client. No sign-in needed on this server.
7 read9 act5 other
Grouped by tool name. At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Email inboxes for AI agents. Give an agent its own address on cooperemail.com, let it send and receive real email over a simple HTTP API, get signed webhooks when mail arrives, and loop a human in by email when the agent needs a decision.
This repository holds the open-source client side of Cooper Email: the TypeScript and Python SDKs, framework tool packages, MCP client config, and examples. The hosted service itself is not in this repo.
your-agent@cooperemail.com), and an API key. No dashboard needed.client_id.progress / needs_input / done / error updates, and receive their replies as tasks you can long-poll and answer in-thread. Replies carry SPF/DKIM/DMARC results and a verified_owner flag.message.received, message.sent, task.received, and owner.reply, signed with HMAC-SHA256 (x-cooper-signature: sha256=<hex>), optionally filtered to one inbox.https://cooperemail.com/mcp works with Claude, ChatGPT, Cursor, and other MCP clients.com.cooperemail/cooper-email/plugin marketplace add cooper-email/cooper-email, then /plugin install cooper-email@cooper-emailSupported through a config file; no directory listing yet. Copy-paste configs: https://cooperemail.com/integrations
The same list is published at https://cooperemail.com/#available-on and in https://cooperemail.com/llms.txt.
npx cooper-email setup
setup finds the coding agents installed for your user, shows every file it will change, and asks before writing. It backs up each existing config next to itself (<file>.cooper-email.bak), registers the hosted MCP server https://cooperemail.com/mcp in each agent's own format, and installs the Cooper Email skill. With no key yet it can create a free inbox and API key for you through POST /api/v1/onboard.
| Agent | --agent | Config file setup edits |
|---|---|---|
| Claude Code | claude-code | ~/.claude.json (mcpServers, type: "http") |
| Codex | codex | ~/.codex/config.toml ([mcp_servers.cooper-email]) |
| Cursor | cursor | ~/.cursor/mcp.json |
| Gemini CLI | gemini | ~/.gemini/settings.json (httpUrl) |
| Grok Build | grok | ~/.grok/config.toml |
| VS Code | vscode | user mcp.json (servers, type: "http") |
| Windsurf | windsurf | ~/.codeium/windsurf/mcp_config.json (serverUrl) |
| Devin Desktop (Cascade) | devin | ~/.config/devin/mcp_config.json (serverUrl) |
| OpenCode | opencode | ~/.config/opencode/opencode.json (mcp, type: "remote") |
| GitHub Copilot CLI | copilot | ~/.copilot/mcp-config.json |
| Claude Desktop | claude-desktop | claude_desktop_config.json (through mcp-remote) |
The skill goes to ~/.agents/skills/cooper-email/ (the shared skills folder) and, for Claude Code, ~/.claude/skills/cooper-email/.
npx cooper-email setup --username my-agent # create my-agent@cooperemail.com and a key
npx cooper-email setup --api-key "$COOPER_API_KEY" # use a key you already have (or set COOPER_API_KEY)
npx cooper-email setup --oauth # no key; each agent signs in with OAuth
npx cooper-email setup --agent codex,cursor --dry-run
npx cooper-email doctor # checks configs, the key, and a live MCP initialize + tools/list
npx cooper-email uninstall # removes only what setup added; backups and your inbox stay
Without a terminal, setup and uninstall print the plan and change nothing unless you pass --yes. A new key is saved with mode 600 at ~/.config/cooper-email/credentials.json, and the agent configs hold it as an Authorization header, so keep those files private.
Install only the skill with the skills CLI:
npx skills add cooper-email/cooper-email --skill cooper-email
Focused skills in skills/, each installable on its own:
| Skill | Use it when | Install |
|---|---|---|
cooper-email | General: the agent needs its own inbox and the full tool list | npx skills add cooper-email/cooper-email --skill cooper-email |
cooper-agent-inbox | Inbox basics: create, send, read unread, reply, wait for mail | npx skills add cooper-email/cooper-email --skill cooper-agent-inbox |
cooper-agent-signup-otp | Sign up or log in somewhere and read back the emailed verification code | npx skills add cooper-email/cooper-email --skill cooper-agent-signup-otp |
cooper-owner-approval | A human approves each outgoing email (drafts and approval mode) | npx skills add cooper-email/cooper-email --skill cooper-owner-approval |
| Package | Language | Install | Source |
|---|---|---|---|
cooper-email | TypeScript / JavaScript SDK and npx cooper-email setup CLI | npm install cooper-email | packages/cooper-email |
cooper-email | Python | pip install cooper-email | packages/cooper-email-python |
cooper-email-langchain | TypeScript | npm install cooper-email-langchain | packages/langchain |
cooper-email-langchain | Python | pip install cooper-email-langchain | packages/langchain-py |
cooper-email-ai (Vercel AI SDK) | TypeScript | npm install cooper-email-ai | packages/ai |
cooper-email-mastra | TypeScript | npm install cooper-email-mastra | packages/mastra |
cooper-email-anthropic | TypeScript | npm install cooper-email-anthropic | packages/anthropic |
cooper-email-anthropic | Python | pip install cooper-email-anthropic | packages/anthropic-py |
cooper-email-openai-agents | TypeScript | npm install cooper-email-openai-agents | packages/openai-agents |
cooper-email-openai-agents | Python | pip install cooper-email-openai-agents | packages/openai-agents-py |
cooper-email-llamaindex | Python | pip install cooper-email-llamaindex | packages/llamaindex |
cooper-email-crewai | Python | pip install cooper-email-crewai | packages/crewai |
n8n-nodes-cooper-email | n8n community node | npm install n8n-nodes-cooper-email | packages/n8n-nodes-cooper-email |
cooper-email-openapi | OpenAPI 3.1 (Zapier, Make) | npm install cooper-email-openapi | packages/openapi |
Registry releases are in progress. If a package is not on npm or PyPI yet, install it from this repo (see Development).
Onboarding needs no auth. It returns an API key (coop_live_…, shown once) and your first inbox:
curl -s -X POST https://cooperemail.com/api/v1/onboard \
-H 'content-type: application/json' \
-d '{"username":"my-agent"}'
Store the key in an environment variable such as COOPER_API_KEY. Do not commit it.
npm install cooper-email
import { Cooper } from "cooper-email";
const cooper = new Cooper({ apiKey: process.env.COOPER_API_KEY });
const inbox = await cooper.inboxes.create({ username: "research-bot", displayName: "Research" });
await cooper.messages.send(inbox.id, {
to: ["ada@example.com"],
subject: "Hello from my agent",
text: "Does Tuesday work?",
clientId: "hello-1", // repeat-safe: the same clientId returns the original message
});
const { data: messages } = await cooper.messages.list(inbox.id, { limit: 20 });
const results = await cooper.search("tuesday");
Human in the loop:
await cooper.owners.add(inbox.id, { email: "ada@example.com" }); // Ada confirms by email
await cooper.updates.notify({
inboxId: inbox.id,
kind: "needs_input",
text: "Which vendor should I book?",
});
const tasks = await cooper.tasks.list({ inboxId: inbox.id, wait: 25 }); // long-poll, max 25 s
const task = tasks.data.find((t) => t.verified_owner && t.trusted);
if (task) await cooper.tasks.reply(task.id, { text: "Booked.", status: "done" });
Full reference: packages/cooper-email/README.md.
pip install cooper-email
import os
from cooper_email import Cooper
with Cooper(api_key=os.environ["COOPER_API_KEY"]) as cooper:
inbox = cooper.inboxes.create("research-bot", display_name="Research")
cooper.messages.send(
inbox["id"],
to=["ada@example.com"],
subject="Hello from my agent",
text="Does Tuesday work?",
client_id="hello-1",
)
messages = cooper.messages.list(inbox["id"], limit=20)
results = cooper.search("tuesday")
# Human in the loop
cooper.owners.add(inbox["id"], "ada@example.com")
cooper.updates.notify(inbox["id"], "needs_input", "Which vendor should I book?")
tasks = cooper.tasks.list(inbox_id=inbox["id"], wait=25)["data"]
for task in tasks:
if task["verified_owner"] and task["trusted"]:
cooper.tasks.reply(task["id"], "Booked.", status="done")
AsyncCooper has the same methods with await. Full reference: packages/cooper-email-python/README.md.
Register a URL, then verify every delivery against the raw request body:
import { Cooper, verifyWebhookSignature } from "cooper-email";
const cooper = new Cooper({ apiKey: process.env.COOPER_API_KEY });
await cooper.webhooks.create({
url: "https://example.com/hooks/cooper",
events: ["message.received", "task.received"],
secret: process.env.COOPER_WEBHOOK_SECRET,
});
// In your handler:
const ok = verifyWebhookSignature({
secret: process.env.COOPER_WEBHOOK_SECRET!,
payload: rawBody,
signature: request.headers.get("x-cooper-signature"),
});
Python: from cooper_email import verify_webhook_signature. Event bodies look like { "id", "type", "created_at", "data" }.
The quickest way is npx cooper-email setup (above). To configure a client by hand:
Endpoint: https://cooperemail.com/mcp (Streamable HTTP). Claude and ChatGPT connectors sign in with OAuth. Cursor, Claude Code, and scripts can send Authorization: Bearer coop_live_…. The cooper_onboard tool works before you have a key.
Claude (claude.ai / Claude Desktop): Settings → Connectors → Add custom connector. Name Cooper Email, URL https://cooperemail.com/mcp, then approve Cooper on the OAuth screen. Then ask: "Create a Cooper Email inbox for research-bot."
Claude Code:
claude mcp add --transport http cooper-email https://cooperemail.com/mcp
Or install the Claude Code plugin (MCP server plus email and human-in-the-loop skills) from this repo:
/plugin marketplace add cooper-email/cooper-email
/plugin install cooper-email@cooper-email
See claude-plugin/.
Cursor: add to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):
{
"mcpServers": {
"cooper-email": {
"url": "https://cooperemail.com/mcp",
"headers": {
"Authorization": "Bearer coop_live_YOUR_KEY"
}
}
}
}
ChatGPT: add a custom connector (in Settings → Apps & Connectors; some plans need Developer mode turned on first) with MCP server URL https://cooperemail.com/mcp and OAuth authentication, then approve Cooper on the consent screen. Menu names vary by plan.
Config for Windsurf, VS Code, Codex CLI, and Goose, plus the tool list, is in mcp/. The MCP Registry manifest is server.json. Cline install steps: llms-install.md.
See examples/:
Each package also has an examples/quickstart.* file.
verified_owner and trusted are both true.To report a security issue, email ops@avatar33.com.
npm install
npm test # TypeScript SDK + framework package tests (vitest, mocked HTTP)
npm run typecheck
npm run build:sdks # writes dist/ for the TypeScript packages
python -m pip install -e "packages/cooper-email-python[dev]"
python -m pip install --no-deps -e packages/langchain-py -e packages/llamaindex \
-e packages/crewai -e packages/openai-agents-py -e packages/anthropic-py
python -m pytest --import-mode=importlib
Publishing is described in PUBLISHING.md.
Questions and bug reports: open an issue, or email ops@avatar33.com.
MIT. Copyright Avatar 8 LLC. Cooper Email is operated by Avatar 8 LLC.