Skip to content

VS Code

Visual Studio Code runs MCP servers in GitHub Copilot’s agent mode. Servers are defined in an mcp.json file. Use the hosted server with a header token, or the local stdio server for full read/write.

Create .vscode/mcp.json in your workspace (or run MCP: Open User Configuration from the Command Palette for a global config), and add an HTTP server:

{
"servers": {
"oceanum-datamesh": {
"type": "http",
"url": "https://mcp.oceanum.io/datamesh",
"headers": {
"X-DATAMESH-TOKEN": "${input:datamesh-token}"
}
}
},
"inputs": [
{
"type": "promptString",
"id": "datamesh-token",
"description": "Datamesh token",
"password": true
}
]
}

The inputs block prompts you for your Datamesh token the first time the server starts and keeps it out of the file. You can also paste the token directly into headers if you prefer.

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:

{
"servers": {
"oceanum-datamesh": {
"type": "stdio",
"command": "uvx",
"args": ["oceanum-mcp", "datamesh"],
"env": { "DATAMESH_TOKEN": "${input:datamesh-token}" }
}
},
"inputs": [
{
"type": "promptString",
"id": "datamesh-token",
"description": "Datamesh token",
"password": true
}
]
}

This requires uv on your PATH. Open the Chat view, switch to Agent mode and select Tools to confirm the Datamesh tools are available.

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.