Skip to main content

Connect an MCP client to the discovery server

Path
5 of 5 · Build on it
For
Developers
Status: SHIPPED

Discovery runs locally today; criteria mode is BROKEN (mcp#15), and investigator use is a DESIGN GOAL (vyom#323).

The discovery server is the part of Vyom that searches the MAST archive for observations. Vyom's own tools are built around JWST and Hubble. This page shows how to run it on your own machine and connect an MCP client to it, so you can call its tools directly.

It covers local use only. There is no public hosted endpoint, and this page doesn't describe connecting to a deployed server (README; README).

What this page is not

Connecting a client here lets you call the discovery tools yourself. It doesn't mean the AI Investigator runs live investigations through this server today; that path is a DESIGN GOAL · vyom#323.

Diagram: a tested MCP client (MCP Inspector CLI, the TypeScript SDK client, or Claude Code, which was tested for connecting only) connects over stateless Streamable HTTP to localhost:8787/mcp. If SERVICE_TOKEN is set, each request needs a Bearer token. The vyom-mcp-discovery server exposes four tools and needs a .dev.vars file, or it returns 500. It queries the MAST archive for observations. There is no stdio transport.Diagram: a tested MCP client (MCP Inspector CLI, the TypeScript SDK client, or Claude Code, which was tested for connecting only) connects over stateless Streamable HTTP to localhost:8787/mcp. If SERVICE_TOKEN is set, each request needs a Bearer token. The vyom-mcp-discovery server exposes four tools and needs a .dev.vars file, or it returns 500. It queries the MAST archive for observations. There is no stdio transport.

What the server exposes​

The server is a Cloudflare Worker with two routes (src/index.ts; README):

RouteWhat it does
GET /healthHealth check. No auth, and it never calls MAST.
/mcpStandard MCP over Streamable HTTP.

/mcp is stateless: every request gets a fresh server, with no session carried between calls. A persistent session per Investigation is PLANNED and belongs to the investigator service, not this server (src/index.ts; README). There is no stdio transport, so clients that only speak stdio can't connect directly (src/index.ts; L47-L48).

It offers four tools (server.ts):

ToolStatusNotes
search_observationsSHIPPEDCriteria mode is BROKEN · mcp#15. mcp#15
get_observationSHIPPED
get_productsSHIPPED
query_catalogSHIPPEDVerified catalogs: Hsc, Gaia and Galex. Plato is unverified; PanSTARRS, Tic, Ctl and DiskDetective aren't supported. README; ADR-003

When you pass a mission, get_observation accepts only jwst or hst. Search by object can return rows from other missions too; for M57 it returned only TESS rows. Narrowing search to one collection needs criteria mode, which is BROKEN (mcp#15). (Mission enum. Tested 9 Oct 2026 against vyom-mcp-discovery at commit 49ce3f2. The run log isn't public.)

Run it locally​

vyom-mcp-discovery isn't public yet. Vyom is under development, and the code will be available after the pilot release. The steps below are for when it is.

You need Node 20 or later (README).

npm install
cp .dev.vars.example .dev.vars
npm run dev

npm run dev starts the server at http://localhost:8787 (package.json; README).

caution

Don't skip the .dev.vars copy. The repo's config sets ENVIRONMENT=production, so without .dev.vars every /mcp call returns 500 "Service authentication is not configured", even on your own machine. .dev.vars switches it to development (wrangler.jsonc; auth.ts; .dev.vars.example).

Check it's up:

curl http://localhost:8787/health

Connect a client​

Point any MCP client that supports Streamable HTTP at:

http://localhost:8787/mcp

The repo's README names MCP Inspector as one way to try the tools (README). To list the tools from the command line:

npx -y @modelcontextprotocol/inspector@2.10.1 --cli http://localhost:8787/mcp --method tools/list

You should see the four tools from the table. If you set SERVICE_TOKEN, add --header "Authorization: Bearer <token>". (Tested 9 Oct 2026 against vyom-mcp-discovery at commit 49ce3f2. The run log isn't public.)

Three clients have been tested against this server. Each one connected. (Tested 9 Oct 2026 against vyom-mcp-discovery at commit 49ce3f2. The run log isn't public.) Inspector and the SDK client also listed the four tools:

  • MCP Inspector CLI 2.10.1
  • The TypeScript MCP SDK client, versions 1.32.1 and 2.3.1, with {"type":"http","url":"http://localhost:8787/mcp"}
  • Claude Code 2.1.295, added with claude mcp add --transport http. This was tested for connecting only, not for using the tools in a session.

Other clients haven't been tested.

Local auth

With no SERVICE_TOKEN in .dev.vars, local requests go through without auth. If you set SERVICE_TOKEN locally, every request needs Authorization: Bearer <token>, even in development. If your client reports an auth or OAuth error, check .dev.vars first (auth.ts).

A wrong or missing token can look like a sign-in problem. The 401 doesn't say which kind of auth it wants, so clients guess OAuth: Inspector shows auth_required, and Claude Code shows "Dynamic Client Registration rejected (HTTP 404)". Both mean the Bearer token is missing or wrong. This is tracked in mcp#27. (Tested 9 Oct 2026 against vyom-mcp-discovery at commit 49ce3f2. The run log isn't public.)

Why production is out of scope​

A deployed server requires Authorization: Bearer <SERVICE_TOKEN> on every request. A wrong or missing header returns 401; a production server with no token configured returns 500 (auth.ts). That token is meant for trusted Vyom services, not readers, so there's no reader path to a deployed server (README; README).

Things to know before you rely on it​

  • Responses are cached and retried on 429 and 5xx, but the defaults aren't benchmarked. Don't treat them as limits or guarantees (README; retry.ts).
  • You can pass investigation_id and user_request for provenance. These fields are opt-in, and the full provenance record is IN PROGRESS (README; schemas.ts).

Next​