MCP overview
Connect an AI client to Data Hub over the Model Context Protocol, including OAuth sign-in, the read and write scopes, and per-client setup.
Data Hub runs a Model Context Protocol (MCP) server at /mcp/v1. MCP is an open standard that lets AI assistants such as Claude use outside tools. An assistant connected to Data Hub can look up instruments, runs, files, and watcher health. When the assistant first connects, it opens your browser so you can sign in.
The tools, prompts, and resources catalogs are generated from the live server, so they match what your client finds when it connects.
Authentication
The MCP server signs you in with OAuth. You give your client only the endpoint URL, for example https://datahub.example.com/mcp/v1.
The first connection opens your browser:
Sign in to Data Hub with Google, unless you already have a session open.
Read the Authorize application screen. It names the client, the host it redirects to, and the access it’s asking for.
Choose Allow.
datahub.example.com/consent

Your client stores the access token it receives and renews it without asking again. Allow grants everything on the screen at once, with no checkbox for each permission. If any line looks wrong, choose Deny.
Scopes
MCP uses two scopes of its own, instead of the REST API’s token scopes such as runs:read:
read: needed to connect at all, and covers every read-only tool, resource, and promptwrite: also needed by tools that change something, including claiming runs, commenting, managing lab notebooks, requesting uploads, reprocessing, and deleting and restoring runs and files
Most clients ask for both, because the server offers both. A client granted only read still connects and still reads. The first tool that changes something fails with a message naming the missing scope.
Each entry in the tools catalog lists the scope that the matching REST route needs, which tells you what data the tool touches. Over MCP, Data Hub checks only read and write.
The client acts as you, with your role. Admin-only actions, such as deleting someone else’s comment, work over MCP only when you’re an admin. Claiming runs and sending feedback work because a signed-in person is behind the client, even though API tokens can’t do either.
Connect a client
Examples use https://datahub.example.com; replace it with your deployment’s host.
Claude Code
Register the server with claude mcp add. Run this in your terminal, not inside a claude session:
claude mcp add --transport http --scope user data-hub https://datahub.example.com/mcp/v1Run claude mcp list to confirm that the server was added. Then start a session with claude and run /mcp to sign in.
Claude Desktop
Add Data Hub through Settings → Connectors → Add custom connector, because the claude_desktop_config.json file handles only local servers. Paste https://datahub.example.com/mcp/v1 as the URL, choose Add, then choose Connect to sign in. Leave the OAuth client fields under Advanced settings empty, because Data Hub registers clients when they connect.
Claude connects to your server from Anthropic’s cloud, not from your own computer, so your deployment must be reachable from the public internet. You can’t add a deployment running on localhost this way; use Claude Code or Cursor for local work.
Cursor
Add the server to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for every project:
{
"mcpServers": {
"data-hub": {
"url": "https://datahub.example.com/mcp/v1"
}
}
}Open Settings → Tools & MCP. The server appears with a Needs authentication label; choose it to sign in through your browser. The tools appear once you approve access.
Other clients
Any client that supports Streamable HTTP and the MCP authorization spec needs one setting: the URL https://datahub.example.com/mcp/v1. For local development, use http://localhost:3000/mcp/v1 instead.
Clients that support MCP but not OAuth can connect through mcp-remote, which runs the browser sign-in for them.
Questions about Data Hub
The assistant can answer questions about Data Hub itself, such as how to install a watcher, what a run status means, or what changed last week. It searches the documentation or the changelog, reads what fits, and links it in its answer. Three tools do this, and all need only the read scope:
search_docsreturns up to five matching sections of the docs, each with a short excerpt and a linkread_docreturns one docs page, or one section of a page, as Markdownsearch_changeloglists changelog entries by date, or finds them by topic, and returns each one in full with a link that opens it in the Changelog
Ask it what changed this week, what’s new since a date, or when something changed. Dates are calendar days, and both the first and the last day count.
The answers come from the docs and changelog that ship with your deployment, so they match the version you run. That includes a staging deployment that’s ahead of the published site. A change appears in the changelog once it has reached your deployment.
Clients that let you attach resources by hand can also attach any docs page by its datahub://docs/ address, for example datahub://docs/manage-tokens.
The assistant reads the guides and the changelog. It doesn’t read the generated API endpoint pages or the tools, prompts, and resources catalogs, because the client already receives the catalog when it connects. When the docs don’t cover a question, the assistant says so and offers to send feedback about the gap.
Delete and restore files
delete_files deletes up to 100 files of one run, and restore_files brings deleted files back. Both answer with a result for each file, so one that can’t be changed doesn’t stop the others. They change only the files you name, unless the assistant passes includeLinked: true to take along the files linked to them: for a raw file, the processed files made from it, and the run.json saved with its capture when every raw file in that folder is being deleted. The assistant is told to check with you before it does.
A deleted file stays in storage and records who deleted it. list_run_files leaves deleted files out unless you pass includeDeleted: true, and then shows when each was deleted and by whom. get_file still finds a deleted file by its ID. A file that’s still being processed can’t be deleted until it finishes.
dismiss_file is deprecated. It deletes one file by its ID, and it will be removed. Use delete_files instead.
Interactive run reports
Clients that support MCP Apps, an extension of the Model Context Protocol, show the same interactive run report as the web app when the assistant calls get_run_report. The report includes image carousels, plate maps, and the Aunty plate with its well charts. Clients without MCP Apps support get the same data as text and describe it instead.
Feedback
The assistant can send feedback about Data Hub for you, for example after a tool call fails. It shows you the draft first and sends it only after you agree. Sending feedback needs only the read scope.
The assistant can also list the reports you sent and read one in full, by report ID or by Linear issue ID such as ENG-1476. Until an admin connects Linear, the feedback tools return an error saying feedback isn’t set up.
For a problem with one run’s data, ask the assistant to post a run comment instead.
Fix a “Structured content does not match” error
Your client may reject a tool’s answer with Structured content does not match the tool's output schema. A client fetches the tool list when it connects, keeps it for the whole session, and checks each answer against it. The error means the tool changed after your session connected, so its answer no longer fits the saved list.
Reconnect Data Hub in your client, or start a new session, so the client fetches the current tool list. The tool list allows fields and values that Data Hub adds later, so an update that only adds them doesn’t cause this error.
Instruments and their watcher
list_instruments and get_instrument describe an instrument’s watcher with these fields:
watcher: the instrument’s one active watcher, ornullwhen it has noneconnection: whether new files can reach Data Hub. Itsstateisonline,restarting,connecting, oroffline, with areasonwhen it’s offline.pastWatcherCount: how many deregistered watchers the instrument has had
The fields match the REST API’s, in camelCase; see Instruments and their watcher. MCP signs you in with OAuth, not with a token that has chosen scopes. So watcher always includes where the watcher runs, as list_watchers and get_watcher do.
Some older fields still come back with the values they had, but they’re deprecated. The tools catalog marks each one and names the field to use instead.
Machine-readable catalog
The catalog pages are built from a JSON document that you can fetch yourself:
curl https://datahub.example.com/mcp/v1/schema.jsonIt lists every tool, prompt, and resource, with JSON Schema for arguments and for each tool’s response. The document needs no sign-in.
What can change
A client keeps the tool list it fetched when it connected, so a change to a schema can reach clients that already hold the old one. You can rely on these rules:
- A response can gain fields. Ignore fields you don’t know.
- A response can gain enum values, such as a new run status. The schema lists the known values and also allows any other string, which the tools catalog shows as
"a" | "b" | string. Accept other values too. - A tool, parameter, or required field that is renamed or removed keeps working for at least 14 days after its replacement reaches production. During that time the catalog marks it deprecated, and its description names the replacement and the earliest removal date.
- A new parameter is optional, so a call that worked before keeps working.
Send a notification to users POST
Requires scope `notifications:create`. PAT only; browser sessions are rejected. Posts a free-text `generic` notification to each recipient, optionally anchored to a run. Delivery is per-recipient preference: in-app bell and/or Slack DM. Exact repeats of an unread message are skipped, so retries are safe. When `run` is given, a token that registered a watcher gets 403 unless the run is on an instrument whose active watcher it registered.
Tools
Catalog of Data Hub MCP tools for instruments, runs, files, watchers, and discovery.