Email in Cursor, VS Code, Windsurf and Codex CLI with one MCP server
In short
Add one email MCP server to Cursor, VS Code, Windsurf or Codex CLI: exact config for each, how the OAuth sign-in works, and what is verified or still untested.
By FezolaPublished Updated 3 min read

On this page
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 does not 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 only offered if you have switched on direct sending for a mailbox. - Mail is untrusted input. A message can contain instructions aimed at the model. While sending stays off, a hijacked agent cannot mail anyone; if you switch sending on, new recipients are flagged and you should review each send.
- 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?.
New to MCP? Start with what is MCP, the Model Context Protocol.
Questions and answers
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?
Not by default. Fezola saves replies as drafts in the mailbox that received the message, and direct sending is off unless you switch it on for a mailbox.
How much does Fezola cost?
Fezola is free for 2 sources. Pro connects unlimited sources for $9 per month or $90 per year, with a 7-day free trial.
More in MCP basics

Best email MCP servers for Claude (and ChatGPT Business) in November 2026
The best email MCP server depends on your setup: built-in for one Gmail, self-hosted for control, hosted like Fezola for several mailboxes. Checked 15 Nov 2026.
9 min read

How to add all your inboxes to Claude Code and Claude Cowork
Run claude mcp add --transport http with your Fezola URL, then /mcp to sign in. Claude Code can then search Gmail, iCloud and IMAP, results naming accounts.
3 min read

What is an email MCP server, and what can it do with your inbox?
An email MCP server lets Claude or ChatGPT search and draft in your mailbox. What it is, how it works, what it can read and change, and what to check first.
2 min read