Skip to content

[BUG] [v0.0.7] cortex-mcp-types Root accepts non-file URIs even though MCP 2024 roots must start with file:// #53319

@marvinayisi

Description

@marvinayisi

Project

cortex

Description

A Root with an https:// URI deserializes successfully, even though the 2024-11-05 MCP schema says root URIs must start with file://.

Error Message

ROOT_NON_FILE_PARSE=Ok(Root { uri: "https://example.com/project", name: Some("demo") })

Debug Logs

N/A

System Information

Cortex crate: cortex-mcp-types 0.0.7
Commit: 7954d02
Date: 2026-04-10
OS: macOS

Screenshots

https://github.com/marvinayisi/issue-images/blob/main/mcp-root-non-file-20260410-074112.png

Steps to Reproduce

  1. Create a tiny Rust crate depending on cortex-mcp-types from this workspace.
  2. Deserialize a Root value whose uri is https://example.com/project.
  3. Print the parse result.

Expected Behavior

The invalid non-file root should be rejected.

Actual Behavior

Deserialization succeeds and produces a Root with an https:// URI.

Additional Context

  • Authoritative spec: https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/refs/heads/main/schema/2024-11-05/schema.ts
  • Code path: /Users/odeili/Projects/platform/cortex/src/cortex-mcp-types/src/roots.rs
  • Duplicate check on 2026-04-10:
  • cortex-mcp-types Root non-file uri
  • Root file:// cortex-mcp-types

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