fastmcp.server.providers.filesystem
FileSystemProvider for filesystem-based component discovery.
FileSystemProvider scans a directory for Python files, imports them, and
registers any Tool, Resource, ResourceTemplate, or Prompt objects found.
Components are created using the standalone decorators from fastmcp.tools,
fastmcp.resources, and fastmcp.prompts:
Example:
Classes
FileSystemProvider
Provider that discovers components from the filesystem.
Scans a directory for Python files and registers any Tool, Resource,
ResourceTemplate, or Prompt objects found. Components are created using
the standalone decorators:
- @tool from fastmcp.tools
- @resource from fastmcp.resources
- @prompt from fastmcp.prompts
root: Root directory to scan. Defaults to current directory.reload: If True, re-scan files on every request (dev mode). Defaults to False (scan once at init, cache results).

