Skip to content

Cursor

Cursor connects to MCP servers through an mcp.json file. Use the hosted server with a header token for a zero-install setup, or the local stdio server for full read/write.

Create ~/.cursor/mcp.json (global) or .cursor/mcp.json in your project, and add a remote server with the Datamesh endpoint and an X-DATAMESH-TOKEN header:

{
"mcpServers": {
"oceanum-datamesh": {
"url": "https://mcp.oceanum.io/datamesh",
"headers": {
"X-DATAMESH-TOKEN": "your-datamesh-token"
}
}
}
}

Cursor treats an entry with a url (rather than a command) as a remote server. Replace your-datamesh-token with your Datamesh token. To keep the token out of the file, Cursor also supports the ${env:VAR} syntax in header values.

The hosted server is read-only and returns query_data results inline (up to ~50 MB), so large results can’t come back in the conversation. To get large data, call export_query: on the hosted server it returns a time-limited download link to the full result, which you fetch out-of-band (e.g. with curl) — the link needs no token, so treat it like a password. The local server below instead writes export_query output to a file on your machine.

For full read/write, and to have export_query write results straight to a file on your machine (NetCDF, Parquet or CSV) rather than return a download link, run the server locally:

{
"mcpServers": {
"oceanum-datamesh": {
"command": "uvx",
"args": ["--python", "3.13", "oceanum-mcp", "datamesh"],
"env": { "DATAMESH_TOKEN": "your-token-here" }
}
}
}

This requires uv on your PATH. The --python 3.13 argument has uv run the server on Python 3.13 (downloading it if needed), as some of the server’s dependencies don’t yet install on Python 3.14. After saving, open Cursor’s Settings → MCP to confirm the server is connected and its tools are listed.

Your Datamesh token grants access to all of your organisation’s permissioned datasources — including the ability to modify or delete them. Treat it as a secret, and prefer the hosted read-only server for exploratory use.