@sendforai/mcp
v0.1.2
Published
Model Context Protocol server for SendForAI. Send email, verify domains, check cost and capacity from an AI agent.
Maintainers
Readme
@sendforai/mcp
MCP server for SendForAI: email at cost, built for agents.
Configure
{
"mcpServers": {
"sendforai": {
"command": "npx",
"args": ["-y", "@sendforai/mcp"],
"env": {
"SENDFORAI_DOMAIN": "example.com",
"SENDFORAI_PRIVATE_KEY_FILE": "/path/to/sendforai.key",
"VERCEL_TOKEN": "optional: lets setup_dns publish DNS records on Vercel DNS",
"CLOUDFLARE_API_TOKEN": "optional: same, for Cloudflare (Zone:Read + DNS:Edit)"
}
}
}
}No identity yet? Start the server without env and call generate_identity. With a domain it returns the DNS record to publish; without one it returns a sandbox identity that works immediately against the simulator. SENDFORAI_TOKEN (a connection token) can replace the domain and key.
Hosted server
Nothing to install: connect an MCP client to https://sendforai.com/mcp (Streamable HTTP) with the header Authorization: Bearer <connection token>. Mint the token with npx sendforai token or the local create_connection_token tool. It is a bearer token, not OAuth. The hosted server has every tool except the three that need a local secret.
Tools
whoami, get_account, get_pricing, get_capacity, get_usage, plan_email, send_email, list_domains, add_domain, get_domain_status, verify_domain, upsert_contact, list_contacts, import_contacts, create_broadcast, get_broadcast, send_broadcast, cancel_broadcast, add_credit, set_budget, set_auto_topup, billing_portal, operator_link, list_events.
Local only: generate_identity (omit domain for a no-DNS sandbox identity), setup_dns, create_connection_token.
Every tool returns cost and capacity where relevant. Every error returns a fix. Broadcasts wait for a human unless told otherwise.
Automatic DNS
With VERCEL_TOKEN (plus VERCEL_TEAM_ID for team-owned domains) or CLOUDFLARE_API_TOKEN in the server's environment, the setup_dns tool publishes the identity or delegation record, SES's DKIM and MAIL FROM records, and DMARC if missing, waiting for propagation between steps. The token is used locally and never sent to SendForAI. Without a token, get_domain_status lists the records for your operator to add.
