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
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
- Create a tiny Rust crate depending on
cortex-mcp-types from this workspace.
- Deserialize a
Root value whose uri is https://example.com/project.
- 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
Project
cortex
Description
A
Rootwith anhttps://URI deserializes successfully, even though the 2024-11-05 MCP schema says root URIs must start withfile://.Error Message
Debug Logs
System Information
Screenshots
https://github.com/marvinayisi/issue-images/blob/main/mcp-root-non-file-20260410-074112.png
Steps to Reproduce
cortex-mcp-typesfrom this workspace.Rootvalue whoseuriishttps://example.com/project.Expected Behavior
The invalid non-file root should be rejected.
Actual Behavior
Deserialization succeeds and produces a
Rootwith anhttps://URI.Additional Context
https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/refs/heads/main/schema/2024-11-05/schema.ts/Users/odeili/Projects/platform/cortex/src/cortex-mcp-types/src/roots.rscortex-mcp-types Root non-file uriRoot file:// cortex-mcp-types