home / mcp / emails mcp server
MCP Server for JMAP (Fastmail) over stdio
Configuration
View docs{
"mcpServers": {
"jahfer-jmap-mcp-server": {
"command": "npx",
"args": [
"-y",
"@jahfer/jmap-mcp-server"
],
"env": {
"JMAP_TOKEN": "<your-jmap-token>",
"JMAP_SESSION_URL": "https://api.fastmail.com/jmap/session"
}
}
}
}You run a MCP server that reads emails through a JMAP backend, letting you access mailbox data from your MCP client. This connector bridges JMAP with MCP so you can fetch messages, threads, and related metadata in a consistent MCP workflow.
To read emails via your MCP client, first ensure the JMAP-MCP server is configured and running as part of your MCP environment. You’ll reference the configured server name (emails) in your MCP client commands to fetch messages from your JMAP-enabled mailbox. The server handles authentication with your JMAP provider using an API token and the JMAP session endpoint you specify.
Typical usage flow after setup: - Start the MCP environment with the JMAP-MCP server included in the mcpServers configuration. - From your MCP client, issue read-list, fetch, or search-like operations to retrieve messages from the JMAP server. - Use standard MCP workflows to paginate results, filter by mailbox or thread, and refresh token/session as needed.
Prerequisites: ensure you have Node.js installed on your machine.
Step 1: Prepare your MCP configuration to include the JMAP-MCP server. Use the following snippet as a starting point in your MCP setup.
{
"mcpServers": {
"emails": {
"command": "npx",
"args": ["-y", "@jahfer/jmap-mcp-server"],
"env": {
"JMAP_SESSION_URL": "https://api.fastmail.com/jmap/session", // for example
"JMAP_TOKEN": "<your-jmap-token>"
}
}
}
}Step 2: Install dependencies if you are integrating the server into a local MCP project. Run these commands in your project directory.
npm installStep 3: Start or reload your MCP environment so the JMAP-MCP server is active and ready to handle requests from your MCP clients.
Configuration notes: the JMAP session URL and token must be provided to authenticate with your JMAP provider. Keep your API token secure and rotate it according to your security policy. You may adjust the session URL to point at your specific JMAP service endpoint.
Security considerations: treat the JMAP token as sensitive data. Store it in a secure environment variable or secret management system, and avoid hard-coding it into files that are checked into source control.