Set up Cursor and other clients
Any MCP client that starts local servers over stdio can use Mbox Viewer, and Cursor is one of
them. The client needs three values. The command is the path of the Mbox Viewer executable, the
argument is --mcp, and the environment variable MBOX_VIEWER_MCP_TOKEN holds your access
token. The Settings dialog copies these values for you, so you never type the path or the token.
Where do I copy the configuration?
- Open Settings and go to the MCP server (AI agents) section. Enable the MCP server must be ticked.
- Open Other ways to connect.
- Click the button that matches your client.
| Button | What it copies | Use it for |
|---|---|---|
| Copy for Claude Desktop | A complete JSON document with the mcpServers key |
Cursor and any client that reads the same JSON format |
| Copy for Claude Code | A claude mcp add command |
Claude Code |
| Copy for other clients | A command line that sets the token and starts the server | Any other stdio client, or a test by hand |
How do I set up Cursor?
Cursor reads the same JSON format as Claude Desktop.
- Click Copy for Claude Desktop.
- Open
~/.cursor/mcp.jsonin a text editor. Create the file if it does not exist. - If the file is empty, paste the copied text as it is. If it already has an
mcpServerskey, add thembox-viewerentry inside it and keep the servers already there. - Save the file and restart Cursor.
The result looks like this on macOS:
{
"mcpServers": {
"mbox-viewer": {
"command": "/Applications/Mbox Viewer.app/Contents/MacOS/mbox-viewer",
"args": ["--mcp"],
"env": { "MBOX_VIEWER_MCP_TOKEN": "<token>" }
}
}
}
On Windows the copied JSON already doubles the backslashes of the path, as JSON requires. On Linux
the path is /usr/bin/mbox-viewer for the .deb package, or the path of the AppImage file.
How do I set up another stdio client?
Give the client the three values in its own configuration format.
| Field | Value |
|---|---|
| Command | The path of the executable. On macOS it is usually /Applications/Mbox Viewer.app/Contents/MacOS/mbox-viewer. On Linux it is /usr/bin/mbox-viewer for the .deb package, or the .AppImage file. |
| Arguments | --mcp |
| Environment variable | MBOX_VIEWER_MCP_TOKEN set to the token |
| Transport | stdio |
Copy for other clients gives a command line with all three values. On macOS it has this shape:
MBOX_VIEWER_MCP_TOKEN=<token> '/Applications/Mbox Viewer.app/Contents/MacOS/mbox-viewer' --mcp
On Linux the command has the same shape, with the path of your installation:
MBOX_VIEWER_MCP_TOKEN=<token> '/usr/bin/mbox-viewer' --mcp
MBOX_VIEWER_MCP_TOKEN=<token> '/home/alex/Applications/mbox-viewer.AppImage' --mcp
On Windows the copied command is written for cmd.exe:
set "MBOX_VIEWER_MCP_TOKEN=<token>" && "<path to mbox-viewer.exe>" --mcp
In PowerShell, run this form instead:
$env:MBOX_VIEWER_MCP_TOKEN = "<token>"; & "<path to mbox-viewer.exe>" --mcp
In a client configuration, enter the command, the argument and the variable in separate fields as the JSON above does. The command is started without a shell, so the path needs no quotes there.
What if the client cannot set environment variables?
The server also accepts the token as an argument after --mcp:
'/Applications/Mbox Viewer.app/Contents/MacOS/mbox-viewer' --mcp --token <token>
What errors can stop the server at startup?
The server checks its arguments before the MCP handshake. On a problem it writes one line on its error output and exits with code 2, and the client shows the server as failed.
| Cause | Message after mbox-viewer --mcp: |
|---|---|
No token in the variable or in --token |
missing token: set MBOX_VIEWER_MCP_TOKEN as copied from Mbox Viewer > Settings > MCP server |
An unknown argument after --mcp |
unknown argument after --mcp (accepted: --token <token>) |
--token without a value |
--token needs a value |
The variable and --token differ |
MBOX_VIEWER_MCP_TOKEN and --token are both set and differ: keep only MBOX_VIEWER_MCP_TOKEN |
A wrong token does not stop the server. The handshake succeeds, and every tool call answers
invalid_token until you paste the current token.
Which paths can break a copied configuration?
The configuration starts the copy of the app that you were running when you copied it. The Settings dialog shows its path and warns you in these cases.
- On macOS, a copy opened from the disk image or from a quarantined download runs from a temporary path. Move Mbox Viewer to Applications, open it from there and copy the configuration again.
- On Windows, a path that contains
",%,$or a backtick cannot be quoted safely for a command line. Only Copy for Claude Desktop stays available, and its JSON works in Cursor and in most clients. - On Linux, an AppImage runs from a temporary mount point that changes at each launch. The copied
configuration names the
.AppImagefile instead, so keep that file at a fixed path. An AppImage whose name contains the version breaks the configuration when an update replaces it, unless you give the file a fixed name such asmbox-viewer.AppImage. - If you move or reinstall the app elsewhere, copy the configuration again.
Frequently asked questions
Which file does Cursor read for MCP servers?
Cursor reads ~/.cursor/mcp.json for servers available in every project. Paste the JSON that Copy for Claude Desktop gives you, because Cursor uses the same mcpServers format.
Can any MCP client use Mbox Viewer?
Yes, if the client can start a local server over stdio and set an environment variable for it. Mbox Viewer has no HTTP transport, so a client that only connects to remote servers cannot use it.
What are the three values a client needs?
A client needs the path of the Mbox Viewer executable as the command, --mcp as the only argument and the token in the MBOX_VIEWER_MCP_TOKEN environment variable. Copy for other clients gives all three in one command line.
My client cannot set environment variables. What can I do?
Pass the token as an argument with --mcp --token <token>. Prefer the variable when you can, because other accounts of the computer can read command-line arguments in the process list.
What happens if I set both the variable and --token?
The server uses the token when both values are equal. When they differ, it stops at once with an error on its error output and exit code 2.
What does the server do when the token is missing?
It stops before the MCP handshake and exits with code 2. It writes missing token: set MBOX_VIEWER_MCP_TOKEN as copied from Mbox Viewer > Settings > MCP server on its error output, which most clients show in their logs.
Why does the copied command not work in PowerShell?
On Windows the command copied by Copy for other clients is written for cmd.exe. PowerShell needs the form $env:MBOX_VIEWER_MCP_TOKEN = "<token>"; & "<path>" --mcp instead.
Do I need to restart Cursor after changing mcp.json?
Yes. The first setup and a token change need a client restart. Other changes in Mbox Viewer, such as ticking a mailbox, reach the tools on the next request.
Which executable path do I give on Linux?
Give /usr/bin/mbox-viewer for the .deb package. For the AppImage, give the path of the .AppImage file itself, which Copy for other clients already writes for you.
Can I run the server by hand to test it?
Yes. Run the command from Copy for other clients in a terminal. The server then waits for MCP messages on its standard input, and it ends when that input closes.