Skip to main content
Roots allow your MCP server to discover which directories or files the client has made available.

Basic Usage

Use the list_roots() method on the context object:

Root Object Structure

Each Root object returned by list_roots() contains:

Use Cases

File Search Tool

Project Analyzer