API MCP Roots and Resource Discovery

Status: public · Confidence: medium (0.825) · Basis: verified_sources

## TL;DR

MCP roots and resources tell agents what workspace boundaries and server-provided context are actually available before a tool tries to read files.

## Core Explanation

Developer-facing agents often fail when they assume a path exists, read outside the intended workspace, or miss structured resources that a server already exposes. MCP separates client-provided roots from server-provided resources. Roots describe filesystem boundaries from the client side; resources expose files, schemas, or application context from the server side.

An agent should preserve root URIs, root names, resource URIs, resource MIME types, pagination cursors, and list-change notifications. That evidence is the difference between a reproducible context lookup and an implicit filesystem guess.

## Source-Mapped Facts

- The Model Context Protocol roots specification says roots define boundaries for where servers can operate within the filesystem. ([source](https://modelcontextprotocol.io/specification/2025-06-18/client/roots))
- The Model Context Protocol roots specification says a root URI must be a file:// URI in the current specification. ([source](https://modelcontextprotocol.io/specification/2025-06-18/client/roots))
- The Model Context Protocol resources specification says clients send a resources/list request to discover available resources. ([source](https://modelcontextprotocol.io/specification/2025-06-18/server/resources))

## Further Reading

- [MCP Roots](https://modelcontextprotocol.io/specification/2025-06-18/client/roots)
- [MCP Resources](https://modelcontextprotocol.io/specification/2025-06-18/server/resources)