Self-hosted multi-domain email as MCP tools - register domains, real mailboxes, send/read mail.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Mektup is a fully-managed, multi-domain email platform - Mektup hosts all the mail infrastructure, so there's nothing to self-host; you just sign up and use it. This MCP server lets an AI coding agent (Claude Code, Claude Desktop, Cursor, Lovable, Replit, Base44, or any MCP-compatible client) manage real email for a domain β register it, add the DNS records, create mailboxes, send and read mail, manage drafts/contacts/folders/forwarding/vacation replies β as native tool calls inside its own session, instead of the human hand-writing curl commands or pasting an API key into generated code.
Every tool call is a straight HTTP call to the real Mektup REST API. There's no separate logic to learn β if you understand the API, you understand the MCP server. Full coverage: every REST endpoint has a matching tool, verified with real read and write round-trips against the live production API (create β update β list β delete, confirmed at each step).
Two ways to run it, same tool set either way (lib/build-server.js defines the tools once, shared by both):
https://mcp.usemektup.com/mcp. Point any client that takes a "custom MCP server" URL at it directly, no install. This is what Lovable/Cursor/Replit/Base44-style platforms want.server.js yourself with your key in an env var. For MCP clients that only support launching a local process (Claude Desktop config, etc.).Endpoint: https://mcp.usemektup.com/mcp (Streamable HTTP β supports both the direct-JSON-response and SSE-streaming response modes of the spec).
Stateless: no session is kept between requests β every tool call is already a one-shot passthrough to the REST API, so there's no session state worth keeping.
Tenant isolation: identical to the REST API, because it is the REST API underneath β the server holds no account-specific credential itself, it just forwards whichever token the caller sent (API key or OAuth access token, see below) straight through to api.usemektup.com, which is the only place that actually verifies it. A token only ever sees its own account's data.
Two auth modes, same endpoint, both arrive as the same Authorization: Bearer <token> header:
For a platform with real end users (Lovable, Cursor, Replit, Base44, ...) β the user clicks "connect," signs in with their existing Mektup account, approves, done. No token copy-paste, no dashboard visit.
Clerk (clerk.usemektup.com) is the OAuth 2.1 authorization server β this MCP server is only ever a resource server. Discovery is automatic for any spec-compliant OAuth-capable MCP client: it only needs the endpoint URL above and finds the rest itself via https://mcp.usemektup.com/.well-known/oauth-protected-resource/mcp (RFC 9728), which points at Clerk's own https://clerk.usemektup.com/.well-known/oauth-authorization-server (RFC 8414). From there the client registers itself via Dynamic Client Registration (no manual setup needed on your end) and runs a standard Authorization Code + PKCE flow, ending with a JWT access token used exactly like an API key.
Lovable: Connectors β All β Custom (MCP card) β Server Name Mektup, Server URL https://mcp.usemektup.com/mcp, Auth β OAuth (default when a server supports it) β Add & authorize.
Authorization: Bearer mek_live_... β create one at app.usemektup.com β API keys.
Adding it to a client that supports custom MCP connectors is normally 3 fields:
| Field | Value |
|---|---|
| Server URL | https://mcp.usemektup.com/mcp |
| Auth type | Bearer token / API key |
| Token | your mek_live_... key |
Cursor / Claude Desktop / any client that reads raw MCP JSON config:
Replit / Base44 / other "connect a tool" flows: same three fields as the table above β server URL, Bearer auth, key.
Use this when a client can only launch a local process, not call a remote URL.
1. Get an API key. Sign in to the dashboard at app.usemektup.com, open API keys, and create one. Keys look like mek_live_... and are shown exactly once - copy it immediately.
2. Install dependencies:
3. Configure your MCP client to run server.js with the key as an environment variable. For Claude Desktop / Claude Code, add to your MCP config (e.g. claude_desktop_config.json):
MEKTUP_API_BASE_URL is optional and defaults to https://api.usemektup.com β no need to set it under normal use.
The server refuses to start without MEKTUP_API_KEY set.
Every tool returns its result as JSON text on success. On failure, it returns isError: true with Error: <message> β the message is the same one the underlying REST endpoint returned (see the API reference for exact error conditions, including billing-limit 402s, per endpoint).
| Tool | Input | Description |
|---|---|---|
get_me | β | Get the authenticated account identity. Useful as an auth health check. |
get_usage | β | Current billing tier, its limits, and real usage against them. Check before a bulk operation. |
| Tool | Input | Description |
|---|---|---|
list_api_keys | β | List keys on this account (prefix and status only). |
create_api_key | β | Create a new key. The full key is returned exactly once - surface it to the user immediately so they can save it. |
revoke_api_key | id | Revoke a key immediately. Cannot be undone - confirm with the user first, especially if it might be the key this very session is using. |
| Tool | Input | Description |
|---|---|---|
create_domain | domain | Register a domain, get back the exact DNS records (MX/SPF/DMARC/DKIM) and a setup recommendation. Never touches DNS itself. |
list_domains | β | List every domain on this account. |
get_domain_records | domain | Re-fetch a registered domain's DNS records any time after creation. |
verify_domain | domain | Actively re-check live DNS and flip verified once it matches. Not automatic. |
delete_domain | domain | Delete a domain and everything under it. Destructive β confirm with the user first. |
| Tool | Input | Description |
|---|---|---|
create_mailbox | domain, localPart, password? | Create a mailbox with real IMAP/SMTP-AUTH credentials, usable in any mail client. |
list_mailboxes | domain | List mailboxes on a domain. |
reset_mailbox_password | domain, localPart, password? | Reset a mailbox's login password. Shown once. |
delete_mailbox | domain, localPart | Delete a mailbox. Confirm with the user first. |
| Tool | Input | Description |
|---|---|---|
get_mailbox_webhook | domain, localPart | Check a mailbox's configured webhook URL (never returns the signing secret). |
set_mailbox_webhook | domain, localPart, url, regenerateSecret? | Set/update the URL that fires (HMAC-signed) on every new inbound message - how an agent finds out about new mail without polling list_messages. Returns the signing secret once, on first setup or rotation. |
delete_mailbox_webhook | domain, localPart | Remove a mailbox's webhook. |
| Tool | Input | Description |
|---|---|---|
list_forwards | domain, localPart | List addresses that get a copy of incoming mail. |
add_forward | domain, localPart, forwardTo | Add a forwarding address. |
remove_forward | domain, localPart, id | Remove a forwarding address. |
| Tool | Input | Description |
|---|---|---|
get_identity | domain, localPart | Get display name and signature. |
set_identity | domain, localPart, displayName?, signatureText?, signatureHtml? | Set display name/signature, applied automatically to outgoing mail. |
| Tool | Input | Description |
|---|---|---|
get_vacation | domain, localPart | Get vacation auto-reply settings. |
set_vacation | domain, localPart, enabled, subject?, message? | Enable/configure auto-reply. message required when enabling. |
| Tool | Input | Description |
|---|---|---|
list_folders | domain, localPart | List custom folders. |
create_folder | domain, localPart, name | Create a folder. |
delete_folder | domain, localPart, id | Delete a folder (mail in it falls back to Inbox/Sent). |
Account-level, not per-mailbox.
| Tool | Input | Description |
|---|---|---|
list_contacts | β | List contacts. |
create_contact | name?, email | Add a contact. |
update_contact | id, name?, email? | Partially update β only send fields to change. |
delete_contact | id | Delete a contact. |
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mektup)<a href="https://allmcps.com/mcp/mektup"><img src="https://allmcps.com/api/badge/mektup?style=directory" alt="Mektup on AllMCPs" /></a>