Skip to content

[Bug]: local MCP inspection drops the loaded extension host #755

Closed

Description

@jimhoyd

Runtime revision and environment

Core main a324cd8, Node 26.8.2, macOS; built runtime in a temporary review snapshot.

Minimal reproduction

Create a synthetic app/urlcode.yaml declaring extension widget and /widget/*: {extension: widget}. Supply an explicit host outside app registering widget with a matching project revision, version 1, targets ['node'], and an object config schema. Start local serveMcp with that hostFile. No extension activation is required for inspection.

In one initialized session:

  1. get_extensions correctly returns widget with declared: true, revisionPinned: true, and targets: ['node'].
  2. explain {target: '/widget/'} omits handler.provider and reports self-hosted compatible: false / support conditional, instructing the caller to supply a host file that is already supplied.
  3. get_context omits project.host.

Control: explainRoute(app, '/widget/', {extensions: registrations}) returns provider registered/revisionMatch true and self-hosted compatible true.

Relevant output

Cause in packages/core/src/mcp.ts: the host is loaded once, but get_context, inspect, validate, explain and get_manifest do not forward its registrations/context. run_tests, get_extensions, plan_feature and review do use the loaded host. The listed explain/get_context discrepancy was executed; the other omitted paths are source inspection.

Expected: project-inspection tools in one operator-hosted session agree on the same registry, without re-importing the host or activating extensions. Test MCP results against the corresponding host-aware SDK results, including target compatibility and policy-schema validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions