Skip to content
Docs

How-to

Run the open-source @emailit/emailit-mcp package over stdio or local HTTP with an API key, and configure Claude, Cursor and VS Code to use it.

Updated Oct 2, 2026

@emailit/emailit-mcp is the open-source version of the Emailit MCP server. It runs on your machine, talks to the Emailit API with your API key, and works with clients that only support local (stdio) servers. Most people should use the hosted server instead; this page explains when the local package makes sense and how to configure it.

Local or hosted

Local package Hosted server
Runs On your machine, started by your MCP client At https://api.emailit.com/mcp
Sign-in API key only OAuth or API key
Tools The original set: emails, domains, API keys, audiences, contacts, templates, suppressions and webhooks 109, the full API v2, including campaigns, automations, forms, DMARC, verification and events
Workspaces The API key’s workspace Several workspaces per connection with OAuth, chosen per request
Roles and scopes The API key’s scope Your role in each workspace and the approved scope
Default sender and reply-to Configurable Not available; the assistant passes from on each send
Updates You control the version you run Automatic

Choose the local package when:

  • your client only supports stdio servers, or can’t do OAuth for remote servers,
  • you want a default From and Reply-To address applied to every send, or
  • you want to read, pin or modify the server code.

Before you begin

  • Node.js 18 or later, so npx is available.
  • An API key. Use a Sending Only key, restricted to one domain, if the assistant only needs to send; the other tools need Full Access.
  • A verified sending domain for the sender address.

Configure your client

The client starts the server as a subprocess and talks to it over stdio. Pass the API key through the EMAILIT_API_KEY environment variable.

Terminal
claude mcp add emailit \
  -e EMAILIT_API_KEY=secret_•••••••• \
  -e SENDER_EMAIL_ADDRESS=hello@acme.com \
  -- npx -y @emailit/emailit-mcp

Always use the scoped package name, @emailit/emailit-mcp.

Environment variables

Variable Required Description
EMAILIT_API_KEY For stdio Your Emailit API key. In HTTP mode, clients send their own key instead.
SENDER_EMAIL_ADDRESS No Default From address, on a verified sending domain.
REPLY_TO_EMAIL_ADDRESSES No Comma-separated default Reply-To addresses.
MCP_PORT No Port for HTTP mode. Defaults to 3000.

If you don’t set a sender, the server asks the assistant for a From address on each send.

Command-line flags

Flags override the matching environment variables.

Flag Description
--key <key> API key for stdio mode.
--sender <email> Default From address.
--reply-to <email> Default Reply-To address. Repeat the flag for several addresses.
--http Serve Streamable HTTP instead of stdio.
--port <port> Port for --http. Defaults to 3000 or MCP_PORT.
-h, --help Print usage.

Run over HTTP

To share one local server between several clients, start it in HTTP mode:

Terminal
npx -y @emailit/emailit-mcp --http --port 3000

The server listens on http://127.0.0.1:3000/mcp and is only reachable from your machine. Each client authenticates with its own API key as a bearer token:

Terminal
claude mcp add emailit --transport http http://127.0.0.1:3000/mcp \
  --header "Authorization: Bearer $EMAILIT_API_KEY"

Run from source

Terminal
git clone https://github.com/emailit/emailit-mcp.git
cd emailit-mcp
npm install
EMAILIT_API_KEY=secret_•••••••• node src/index.js

Add --http --port 3000 to the last command for HTTP mode.

Troubleshooting

Problem Fix
API key is required for stdio mode. Use --key or set EMAILIT_API_KEY. Add EMAILIT_API_KEY to the env block of your client configuration.
The client can’t start npx Desktop apps don’t always see your shell’s PATH. Use the full path to npx (find it with which npx) as the command.
Domain not verified when sending Use a sender on a verified domain, or set SENDER_EMAIL_ADDRESS to one.
Permission errors on non-send tools The key is Sending Only. Use a Full Access key for domains, templates, contacts and other tools.
A scheduled email can’t be canceled Scheduled emails can only be canceled or rescheduled up to 3 minutes before their send time.
Hosted vs local, scopes and security.
Every hosted tool and its arguments.
Create a key for the server.
Connect editors to the hosted server.

Was this page helpful?

Thanks for the feedback.

Thanks, we read every message.