Email in Cursor, VS Code, Windsurf and Codex CLI with one MCP server
3 min readBy Fezola
Short answer: Cursor, VS Code, Windsurf and Codex CLI can all add a remote MCP server by URL and sign in with OAuth, so adding Fezola takes one URL, https://api.fezola.com/mcp, and a browser sign-in. Below is the exact config for each, taken from each tool's own documentation on 8 November 2026. Fezola's OAuth works in production for these clients, but a full end-to-end run in each editor is still pending, so every section is "should work", not "tested".
Before you start
Create a free Fezola account and add at least one mailbox in Sources (Gmail, iCloud, OVH, IONOS, Gandi, Yahoo or any IMAP mailbox). Give each a short name, such as "Personal" or "Work": the agent uses it to say where each message comes from. The consent screen you reach during sign-in lists the sources the agent will access.
Why this works with editors: Fezola's backend accepts the return addresses these clients use. That includes http://localhost on any port (the way command-line clients receive the code), vscode.dev, and the cursor, vscode, vscode-insiders and windsurf private schemes. PKCE is always required.
Cursor
According to Cursor's MCP documentation, servers are defined in ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project). A remote server takes a url:
{
"mcpServers": {
"fezola": {
"url": "https://api.fezola.com/mcp"
}
}
}
Cursor signs in with the OAuth authorization code flow with PKCE and registers itself as a public client, which is what Fezola's server supports. After saving the file, open Customize in the sidebar to find the server, then complete the browser sign-in when asked. If an MCP log helps, open the Output panel and choose "MCP Logs".
VS Code
According to VS Code's MCP configuration reference, the MCP: Add Server command in the Command Palette starts a guided flow: choose the HTTP type and enter https://api.fezola.com/mcp. You can also write it in .vscode/mcp.json (workspace) or the mcp.json of your user profile, with a top-level servers object:
{
"servers": {
"fezola": {
"type": "http",
"url": "https://api.fezola.com/mcp"
}
}
}
VS Code's page does not describe how it handles dynamic client registration, so we cannot say more than: it should work, and a browser window should open for the sign-in on the first connection. Do not paste tokens into a shared mcp.json.
Windsurf
Windsurf's documentation describes remote servers with a serverUrl field and OAuth for HTTP servers, but its pages give different config file locations depending on the build. Use the "Open MCP config file" action in Cascade, which opens the file your install reads, and add:
{
"mcpServers": {
"fezola": {
"serverUrl": "https://api.fezola.com/mcp"
}
}
}
This one is the least verified of the four: check the field names against the Cascade MCP page for your version, then sign in when the server shows "Needs authentication".
Codex CLI
According to the Codex documentation, a remote server is added with the CLI:
codex mcp add fezola --url https://api.fezola.com/mcp
codex mcp login fezola
or by a table in ~/.codex/config.toml:
[mcp_servers.fezola]
url = "https://api.fezola.com/mcp"
OAuth is the default for HTTP servers. codex mcp login fezola --no-browser prints a URL for terminals without a browser: open it, then paste the redirect URL back into the terminal. Check with codex mcp list, or /mcp in the interface.
What to ask
- "Which of my mailboxes got an email from the client about the build failure this week?"
- "Find the receipt for the domain renewal, in any mailbox, and tell me the amount."
- "Draft a reply to the last email from the recruiter, from my personal address."
The agent calls tools such as search_messages, get_thread, get_attachment and reply_draft, and every result names its account.
What an editor agent should not do with your mail
- It cannot send by default. Replies are saved as drafts in the mailbox that received the message, with that address as the sender. The
send_messagetool is off by default on the server. - Mail is untrusted input. A message can contain instructions aimed at the model. Because the connector cannot send, a hijacked agent cannot mail anyone, but review what it proposes.
- You can cut the access. Remove the server from the editor, and in Fezola revoke the connected assistant.
For Claude Code specifically, see all your inboxes in Claude Code and Claude Cowork. For a comparison of connectors, see best email MCP servers, and for safety, is it safe to connect your email to an AI?.
Questions
Can I use an email MCP server in Cursor or VS Code?
Yes. Both support remote MCP servers over HTTP with OAuth. You add the URL of the server, here https://api.fezola.com/mcp, and sign in through the browser. Fezola accepts the sign-in return addresses these editors use (localhost, and the cursor, vscode and windsurf schemes).
How do I add an email MCP server to Codex CLI?
Run codex mcp add fezola --url https://api.fezola.com/mcp, then codex mcp login fezola. The same server can be defined in ~/.codex/config.toml with a [mcp_servers.fezola] table and a url.
Has this been tested end to end?
Not yet. Fezola's OAuth works in production for these clients (registration, authorization page, consent screen), but a full run with a real account in each editor is pending. Treat each setup below as should-work and tell us if something fails.
Can the editor's agent send emails?
No by default. Fezola saves replies as drafts in the mailbox that received the message, and the direct send tool is off on the server.
How much does Fezola cost?
Fezola is free for 2 sources. Pro connects up to 20 sources for $9 per month or $90 per year, with a 7-day free trial.
Connect your first inbox in two minutes
Free with 2 sources, no card needed. Nothing to install.
Start for freeKeep reading
· 5 min read
Best email MCP servers for Claude and ChatGPT (November 2026)
An honest comparison of email MCP servers for Claude and ChatGPT: built-in connectors, self-hosted servers and hosted options, with what each one can and cannot do.
Read the article· 3 min read
How to connect a custom domain email to ChatGPT (IMAP, OVH, IONOS, Fastmail)
ChatGPT has no built-in connector for a mailbox on your own domain. Here is how to plug any IMAP mailbox into ChatGPT in a few minutes, step by step.
Read the article· 3 min read
All your inboxes in Claude Code and Claude Cowork
Add Fezola to Claude Code with one command, sign in with OAuth, and search Gmail, iCloud and IMAP mailboxes from your terminal. Cowork too. Honest status inside.
Read the articleIMAP MCP server: connect any mailbox to Claude and ChatGPT
OVH, IONOS, Gandi, Fastmail or a mailbox on your own domain, in Claude and ChatGPT, with nothing to install.
Read the guideHow to bring all your inboxes and chats into Claude or ChatGPT
Gmail, iCloud, your own domain over IMAP, Google Chat and Telegram, searchable together through one connector.
Read the guide