myagentmail-mcp
v0.7.0
Published
Model Context Protocol server for myagentmail. Lets Claude Desktop, Cursor, Windsurf, Cline, and any MCP-compatible client drive email (inboxes, threads, drafts, custom domains), LinkedIn (sessions, DMs, connections, posts, intent signals), and server-sid
Maintainers
Readme
myagentmail-mcp
Model Context Protocol server for myagentmail. Lets Claude Desktop, Cursor, Windsurf, Cline, Continue, and any other MCP-compatible client drive both email and LinkedIn workflows against the myagentmail API:
- Email — provision inboxes, send / reply / forward, work with threads, drafts and attachments, register custom domains, manage workspaces and webhooks.
- LinkedIn — connect accounts, send connection requests + DMs, read inbox + threads, list 1st-degree connections + sent invitations, publish posts (text + image), search content, and create recurring intent signals (keyword, engagement, watchlist, connection_accepted, message_received) with webhook delivery.
- Cadences — server-side outreach sequences. Define an ordered list of steps (LinkedIn invite → wait → DM → email → ...), enroll leads, and the platform runs them end-to-end with branching on real-world events (invite accepted, lead replied). The runtime is on MyAgentMail's side; your app just calls the API and listens for webhook events.
Install
npm install -g myagentmail-mcpOr use with npx (no install required):
npx myagentmail-mcpInstall the Claude skill (optional but recommended)
The MCP server gives a Claude / Cursor / Windsurf agent the tools. The Claude skill gives it the playbook — auth model, capability map, working recipes, and the deliberate omissions (we don't ship enrichment or ICP search). With both installed, an agent self-orients and starts shipping correct code on its first try.
One command drops SKILL.md and the three reference docs into a Claude
skills directory:
# In the project you're working in:
npx myagentmail-mcp install-skill
# Or globally for every Claude session on this machine:
npx myagentmail-mcp install-skill --globalThis writes to ./.claude/skills/myagentmail/ (project) or
~/.claude/skills/myagentmail/ (global). Add --force to overwrite an
existing install.
Setup
You need a myagentmail API key. Get one from https://myagentmail.com/dashboard.
The server reads it from the MYAGENTMAIL_KEY environment variable. Each
MCP client has its own way of injecting env vars — see below.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"myagentmail": {
"command": "npx",
"args": ["-y", "myagentmail-mcp"],
"env": {
"MYAGENTMAIL_KEY": "tk_your_key_here"
}
}
}
}Restart Claude Desktop. The myagentmail tools appear in the tool picker.
Cursor
Edit ~/.cursor/mcp.json (or your project's .cursor/mcp.json):
{
"mcpServers": {
"myagentmail": {
"command": "npx",
"args": ["-y", "myagentmail-mcp"],
"env": { "MYAGENTMAIL_KEY": "tk_your_key_here" }
}
}
}Windsurf
Edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"myagentmail": {
"command": "npx",
"args": ["-y", "myagentmail-mcp"],
"env": { "MYAGENTMAIL_KEY": "tk_your_key_here" }
}
}
}Cline / Continue / other MCP clients
Same pattern: configure a server named myagentmail, command npx, args
["-y", "myagentmail-mcp"], env {"MYAGENTMAIL_KEY": "..."}.
Tools exposed
This server wraps the most useful subset of the myagentmail REST API. The LLM sees a JSON Schema for each tool and can call it directly via MCP.
Inboxes
create_inbox— provision a new mailbox with IMAP/SMTP credentialslist_inboxes— list all inboxesget_inbox— fetch one inbox with its address list and credentialsdelete_inbox— soft-delete
Messages
send_message— send a new emailreply_to_message— reply in-thread (preserves headers)reply_all_to_message— reply-all, dropping self addressesforward_message— forward to new recipientslist_messages— paginated listing, filterable by directionget_message— full body + attachment metadatamark_message_read— flip the read flagdelete_message— soft-delete
Threads
list_threads— paginated listingget_thread— every message in a thread, ordered
Drafts
create_draft— start a draft with partial fieldsupdate_draft— merge-patch any fieldsend_draft— send and atomically delete the draftlist_drafts— list unsent draftsdelete_draft— discard a draft
Attachments
list_attachments— metadata for a messagedownload_attachment— returns base64-encoded bytes
Custom domains
register_domain— register and get DNS records to setverify_domain— re-check DNS statuslist_domains— list registered domainsdelete_domain— removeadd_inbox_address— attach a verified custom-domain alias to an existing inbox
Workspaces (multi-tenant)
list_workspaces— list isolation containers in your tenantcreate_workspace— provision a new workspaceissue_workspace_key— mint awk_key scoped to one workspace
Webhooks
create_webhook/list_webhooks/delete_webhook
Metrics
get_metrics— sent / received / bounced counts and resource totals
Utility
verify_email— pre-flight MX check on one or more recipient addresses
LinkedIn — Sessions
linkedin_login— start email/password login (may return a challenge)linkedin_verify_pin— submit the email/SMS PIN if challengedlinkedin_poll_mobile_approval— collect a mobile-app approval challengelinkedin_import_session— import li_at + JSESSIONID cookies (escape hatch)linkedin_list_sessions/linkedin_get_session/linkedin_revoke_sessionlinkedin_sessions_utilization— per-session daily quota usage
LinkedIn — Outreach
linkedin_lookup_profile— resolve a profile URL to its profileId, name, headlinelinkedin_send_connection_request— send an invite (with optional note)linkedin_list_connections— list 1st-degree connectionslinkedin_list_sent_invitations— list pending outbound inviteslinkedin_send_message— DM a 1st-degree connection (find-or-create thread)linkedin_list_conversations— list inbox threadslinkedin_read_conversation— read messages in a thread
LinkedIn — Posts
linkedin_create_post— publish a feed post (text + optional image)linkedin_list_posts_by_author— recent posts by a profile / companylinkedin_list_post_comments— commenters + bodieslinkedin_list_post_reactions— reactors + reactionTypelinkedin_search_content— raw keyword post search
LinkedIn — Historical search (with classifier)
linkedin_search_history— one-shot historical search with firing rule + classifier verdict per resultlinkedin_search_history_list/linkedin_search_history_get
LinkedIn — Signals (real-time intent watchers)
linkedin_signal_create— keyword | engagement | job_change_watchlist | connection_accepted | message_receivedlinkedin_signal_create_engagement/linkedin_signal_create_watchlist— kind-specific helperslinkedin_signal_list/linkedin_signal_get/linkedin_signal_update/linkedin_signal_deletelinkedin_signal_run— force-poll nowlinkedin_signal_matches— historical match listlinkedin_signal_deliveries— webhook delivery loglinkedin_signal_test_webhook— fire a synthetic test eventlinkedin_signal_watchlist_list/linkedin_signal_watchlist_add/linkedin_signal_watchlist_remove— manage watchlist signal entries
Cadences — server-side outreach sequences
cadence_create— create with optional inlinestepsarraycadence_list/cadence_get/cadence_update/cadence_deletecadence_replace_steps— atomically replace the step listcadence_enroll_lead— enroll a lead (idempotent on (cadenceId, leadExternalId))cadence_list_enrollments— filter by state (active / paused / completed / replied / ...)cadence_run_now— force a runner tick (debug)enrollment_get— one enrollment + step-run historyenrollment_patch— pause / resume / unenroll
Key tiers
myagentmail has four key types — pick the narrowest that fits the job:
| Prefix | Scope | Use |
|---|---|---|
| tk_ | Tenant master — every workspace | Server-side admin, dev |
| wk_ | Workspace master — one workspace | Reseller customers |
| ak_ | Inbox scoped — one inbox | Production agent runtimes |
| mam_ | Legacy inbox key | Backwards compat |
For local Claude Desktop / Cursor use, a tk_ key is fine. For deployed
agents, prefer ak_ to limit blast radius.
Develop locally
git clone https://github.com/kamskans/myagentmail
cd myagentmail/mcp
npm install
npm run build
# Test interactively
MYAGENTMAIL_KEY=tk_... node dist/index.jsThe server speaks JSON-RPC over stdio. Use the MCP Inspector for interactive testing during development.
Architecture
This package is a thin wrapper. The actual API lives at
https://myagentmail.com/v1 — every tool here just translates an MCP
tool call into a fetch against the matching REST endpoint and returns
the JSON response.
If you don't want the MCP layer, you can call the same endpoints directly:
curl -H "X-API-Key: $MYAGENTMAIL_KEY" https://myagentmail.com/v1/inboxesSee the full API reference and the knowledge base for concept guides.
SDK
For programmatic use in your own code, install the SDK instead: npm install myagentmail
(npm).
License
MIT
