Skip to content

MCP integration tests don't verify static assets are served #558

@paddymul

Description

@paddymul

Problem

The MCP integration tests (test_mcp_uvx_install.py) stop at tools/list — they never call tools/call view_data. The proposed test_view_data_call test would close that gap, but even it wouldn't catch missing static assets like widget.js / standalone.js.

The view_data tool's data path (ensure_server() → Tornado → POST /load → text summary) works fine without the JS bundle. The failure only surfaces when a browser loads the session page and tries to fetch the JS. This means a broken wheel (missing static files) passes all MCP protocol tests.

How this bit us

When widget.js was missing from a fresh install, view_data appeared to work (the MCP text response came back) but the browser page it opened was blank. No test caught it.

Suggested fix

After calling tools/call view_data through the MCP protocol, also HTTP-fetch the static JS asset from the Tornado server that ensure_server() started. Something like:

  1. Parse the view_data response to extract the server URL / port
  2. GET /static/standalone.js (or whatever the entry point is)
  3. Assert 200 and non-empty body

This would verify the full user-visible path: MCP protocol → server startup → data load → static assets present.

Alternatively

A simpler check: after installing the wheel, assert the static file exists on disk inside the installed package directory. This is less end-to-end but faster and doesn't need a running server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    mcp-serverMCP server / tool integration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions