Lockally Email MCP server
Commit Sep 17, 2026Allows AI agents to manage email accounts, send messages, manage domains, and monitor delivery logs via a command-line interface.
Also known as lockallyinc/lockally-cli, lockally-cli
- Stars
- 1
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 1.0.2
- Last commit
- Sep 17, 2026
- License
- MIT
What is Lockally Email MCP?
Lockally Email allows AI agents to manage email accounts, send messages, manage domains, and monitor delivery logs via a command-line interface.
Summary generated from the project's README
About Lockally Email MCP server
Lockally Email provides a command-line interface for managing email infrastructure and communication. It allows developers to handle domain verification, mailbox creation, and template management directly from a terminal. The server supports sending emails with attachments or HTML content and provides tools to monitor delivery status through logs and live event tails.
Users interact with the service by authenticating with an API key via the login command or by setting a LOCKALLY_API_KEY environment variable. The system can be configured for automated environments using a lockally.json file and the deploy command to reconcile settings like domains, mailboxes, and webhooks. It also includes a local webhook listener that performs signature verification to ensure secure event delivery to local development servers.
What you can do with it
- 1Domain and DNS managementA developer can verify domain ownership and check SPF, DKIM, DMARC, and MX records.
- 2Delivery monitoringYou can track email delivery status and export logs for specific timeframes or error types.
Written from the project's README. Every use case is checked against a quote from it.
How to install Lockally Email MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Lockally Email MCP in Claude Code
$ claude mcp add --transport http lockally-cli https://mcp.lockally.com/Install Lockally Email MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"lockally-cli": {
"url": "https://mcp.lockally.com/"
}
}
}Install Lockally Email MCP in VS Code
.vscode/mcp.json
{
"servers": {
"lockally-cli": {
"type": "http",
"url": "https://mcp.lockally.com/"
}
}
}Install Lockally Email MCP in VS Code CLI
$ code --add-mcp '{"name":"lockally-cli","type":"http","url":"https://mcp.lockally.com/"}'Install Lockally Email MCP in Codex
$ codex mcp add lockally-cli --url https://mcp.lockally.com/Install Lockally Email MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.lockally-cli] url = "https://mcp.lockally.com/"
Install Lockally Email MCP in Gemini CLI
$ gemini mcp add -s user --transport http lockally-cli https://mcp.lockally.com/Install Lockally Email MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"lockally-cli": {
"url": "https://mcp.lockally.com/",
"type": "http"
}
}
}Automated checks
Ran Nov 15, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablelockallyinc/lockally-cli is public and reachablegithub.com/lockallyinc/lockally-cli ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-10github.com/lockallyinc/lockally-cli ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeHTTPS endpoint answered 401 (sign-in required)Pass
README
View on GitHubLockally CLI
The official command-line interface for Lockally — send mail, manage domains, mailboxes, templates, API keys and webhooks, tail delivery logs, and run a local webhook listener, all from your terminal.
Install
Homebrew / prebuilt binaries — download the archive for your OS/arch from the
latest release and put lockally
on your PATH.
Go:
go install github.com/lockallyinc/lockally-cli@latest # installs `lockally-cli`
Authenticate
lockally login # paste your API key when prompted
lockally login --api-key lk_live_… # or pass it directly
echo $LOCKALLY_API_KEY | lockally login # or pipe it
The key is stored at ~/.config/lockally/config.json (override the location with
LOCKALLY_CONFIG_DIR). You can also skip login entirely and set LOCKALLY_API_KEY
in the environment (great for CI). lockally whoami shows the active credential.
Commands
lockally send Send an email (--from --to --subject --text/--html --attach --template --var)
lockally domains list · add · verify · check (recheck DNS) · rm
lockally mailboxes list · create · rm
lockally templates list · create · update · rm
lockally keys list · create · revoke (create prints the secret once)
lockally logs View the delivery log (--status --since --follow --download)
lockally events Live-tail delivery events
lockally webhook list · create · rm · listen
lockally init Scaffold a lockally.json
lockally deploy Apply lockally.json to your account
Send
lockally send --from alerts@yourdomain.com --to user@example.com \
--subject "Your code" --text "Code: 847291" --attach invoice.pdf
Domains & DNS
lockally domains add yourdomain.com # prints the DNS records to set
lockally domains verify yourdomain.com # checks ownership (TXT)
lockally domains check yourdomain.com # live SPF/DKIM/DMARC/MX recheck (bypasses caches)
Generate an API key
lockally keys create --label ci --scope send:write --scope send:read
Logs
lockally logs --status bounced --since 2026-08-01T00:00:00Z
lockally logs --follow # live tail
lockally logs --download messages.ndjson # export all matching rows
Local webhook listener
Receive and signature-verify webhook deliveries locally (Stripe-style):
lockally webhook listen --port 4747 --secret whsec_… \
--forward http://localhost:3000/webhooks
Point a webhook (or a tunnel like ngrok/cloudflared) at the listener. It verifies the
X-Lockally-Signature header, pretty-prints each event, and optionally relays the raw
body to your app.
Project config (init + deploy)
lockally init # writes lockally.json + templates/welcome.html
lockally deploy # reconciles it into your account (domains+verify, mailboxes, webhooks, templates)
lockally.json:
{
"domains": ["yourdomain.com"],
"mailboxes": [{ "email": "alerts@yourdomain.com", "quota_gb": 5 }],
"webhooks": [{ "url": "https://yourapp.com/webhooks/lockally", "events": ["delivery.delivered", "delivery.bounced"] }],
"templates": [{ "name": "welcome", "subject": "Welcome", "html_file": "templates/welcome.html" }]
}
deploy is additive and idempotent — it never deletes, and re-running is safe.
Notes
- A secret API key authenticates every command; treat it like a password.
- Most commands accept
--jsonfor scripting. - Lockally has no pollable events feed, so
events/logs --followpoll the message log; for true push events usewebhook listen.
License
MIT © Lockally
Lockally Email MCP questions
How do I add Lockally Email MCP to Claude Code?
Run claude mcp add --transport http lockally-cli https://mcp.lockally.com/ in your terminal. Add --scope user to make it available in every project.
How do I add Lockally Email MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
How do I authenticate with Lockally?
You can authenticate by running lockally login and pasting your API key, passing it directly with the --api-key flag, or setting the LOCKALLY_API_KEY environment variable.
How can I manage my email templates?
The CLI provides commands to list, create, update, and remove templates, and you can use lockally deploy to reconcile a lockally.json configuration file with your account.