Skip to main content
This package is no longer updated. The hosted server at https://app.lettr.com/mcp now accepts a lttr_ API key as well as a Lettr sign-in, which was the only thing this package offered that the hosted server could not. New tools and fixes land there.The package keeps working, and its code stays open. This page is here for anyone still running it.
The lettr-mcp npm package runs an MCP server on your machine, giving AI coding assistants access to your Lettr email infrastructure. It authenticates with an API key and communicates over stdio, so it works in Claude Code, Cursor, and Claude Desktop without a browser sign-in.

Switching to the Remote Server

Use the same API key you already have:
For Cursor, Claude Desktop and other clients, see Connect with an API Key. Three differences to expect: A restricted key behaves the same on both: the remote server hides the tools a key’s permissions do not cover, rather than failing when one is called.

Prerequisites

Before setting up the local MCP server, you’ll need:

Setup

Run the following command to add Lettr as an MCP server:
Claude Code will automatically start the server when needed.
Replace lttr_xxxxxxxxx with your actual API key.

Configuration Options

You can pass additional arguments to configure default behavior:
Setting a default sender address avoids the MCP server asking for one each time you send an email. Use an address from a verified sending domain.
For example, in Cursor with all options configured:

Verifying the Connection

After setup, ask your AI assistant a simple question to verify the connection:
“List my sending domains”
The AI should respond with your verified sending domains. If you see domain information, the server is running correctly.

Available Tools

The local server offers the same tools as the remote server, named with hyphens instead of underscores (for example send-email and list-audience-contacts). That covers sending and scheduling emails, templates and folders, sending domains, webhooks, campaigns, and your whole audience: contacts, lists, topics, properties, and segments. A few tools differ between the two servers:
  • Only on the local server — list-scheduled-emails to list emails waiting to be sent, auth-check to validate your API key, and health-check to check the Lettr API status.
  • Only on the remote server — sending health checks, DNS diagnosis, analytics, template statistics, API logs, API key listing, and listing tracking, inbound, and storage domains.
What each tool can do also depends on your API key’s permissions. For the full list and which tools are destructive, see the Tools Reference.

Example Workflows

Sending an Email from Your IDE

“Send an email to john@example.com from hello@mycompany.com with the subject ‘Deployment Complete’ and let them know the release went live”

Working with Templates

“List my templates and show me the merge tags for the ‘welcome-email’ template”
“Create a new template called ‘Password Reset’ in folder 1 with a basic HTML layout”

Managing Domains

“Add the domain notifications.example.com and show me the DNS records I need to set up”
“Verify the DNS records for notifications.example.com”

Inspecting Webhooks

“List my webhook configurations and show me the details for the first one”

Managing Your Audience

“Create a list called ‘Beta testers’ and add jane@example.com and john@example.com to it”

Security

  • API key storage — Your API key stays in your local environment configuration and is never transmitted to third parties
  • Restricted keys — Use API key permissions to limit what the MCP server can do (e.g., sending only, no domain management)
  • No network exposure — The server communicates via stdio, not over the network
Never commit API keys to version control. Use environment variables or your AI client’s secure configuration to store the key.

Source Code

The local MCP server is open source and available on GitHub: lettr-com/lettr-mcp.

Learn More

Remote Server Setup

Connect by signing in from Claude, ChatGPT, Cursor, and more

Tools Reference

Full reference for all MCP tools

API Keys

Create and manage API keys

Sending Domains

Set up domains for sending emails