I turned smailr into an MCP!!!

Kimi’s quota had just reset, and I thought, since letting it sit unused would be a waste, I might as well turn Smailr’s (https://smailr.com) email service into an MCP. Once installed, clients like Claude Desktop, Cursor, Cherry Studio, and Cline can operate your mailbox directly using natural language. For example:

  • “List the 5 most recent emails in my inbox”
  • “Send an email to [email protected] from hello@mydomain”
  • “How much of my storage quota have I used?”

The current implementation includes 23 tools, covering nearly all of Smailr’s API: creating, deleting, updating, and querying mailboxes; listing, viewing, searching, and sending emails; uploading attachments; contacts; folders; tags; as well as read-only interfaces for mail rules, signatures, quotas, and statistics.

The easiest part is logging in: you don’t need to manually create an API key in the settings page, since built-in NodeLoc OAuth lets you log in directly. Just run:

npx smailr-mcp auth

It will automatically open your browser and go through NodeLoc authorization. Once authorization is complete, paste the URL from the address bar back into the terminal (sample URL format: Smailr 邮箱…)(), and it will automatically create a scoped API key and print the MCP client configuration ready to paste. You never need to touch the settings page—the login, key creation, and configuration are all completed in one go.

A few other design considerations:

  • Local-first: the server runs on your own computer via stdio, and the API key never passes through any third party
  • Minimal dependencies: it only uses the official @modelcontextprotocol/sdk and zod, so the code is lightweight and easy to modify

Usage:

npx -y smailr-mcp

Then add the configuration in your MCP client (the README contains the complete JSON).

Known limitations, stated frankly: Smailr does not define a response schema, so tool outputs are passed through as raw JSON; contacts, folders, and tags only support listing and creation (Smailr simply has no update/delete APIs); there is no webhook push, so new mail must be retrieved by polling list_mails.

Project: GitHub - Patrick130306/smailr-mcp: MCP server for Smailr mail - read, search and send email from any MCP-compatible AI client · GitHub

MIT licensed. Stars / issues / PRs are welcome.
Special thanks to @runoneall for the inspiration.
P.S. An MCP related to NodeLoc is currently in development—stay tuned.
Note:


After clicking authorize, seeing this is normal. You just need to paste the URL currently shown in the address bar—something like Smailr 邮箱…—back into your client.

7 Likes

Patrick130306/smailr-mcp — MCP server for Smailr mail - read, search and send email from any MCP-compatible AI client

0 star · TypeScript · MIT · 最后提交 2026-08-30

Nice! You could start another thread explaining how it works. Too bad I can’t like it (24-hour limit).

It’s essentially a protocol converter. Its main function is to implement OAuth login: after the user enters the callback URL, the MCP server sends a request and obtains a cookie, then uses that cookie to create a key.

:ac31:

Awesome, great stuff—very insightful.

Thanks. By the way, is it okay if I make a nodeloc MCP? (Because it would involve an API.)

Also, has the iOS version been released? You’re actually posting from an iPhone?

Absolutely, this deserves our support. Great idea. The iOS version is ready, but it hasn’t been released yet—we’re waiting for the developer account to be approved.

1 Like

Okay, with you saying that, I feel reassured enough to go ahead. Hope your developer account gets approved soon :xhj20:

Zhan, check the TG group—we found a vulnerability…

Can read-only mode be enabled separately, with sending and deleting permissions disabled?