Skip to main content
New in version 2.0.0 Resources are data sources exposed by MCP servers. They can be static files or dynamic templates that generate content based on parameters.

Types of Resources

MCP servers expose two types of resources:
  • Static Resources: Fixed content accessible via URI (e.g., configuration files, documentation)
  • Resource Templates: Dynamic resources that accept parameters to generate content (e.g., API endpoints, database queries)

Listing Resources

Static Resources

Use list_resources() to retrieve all static resources available on the server:

Resource Templates

Use list_resource_templates() to retrieve available resource templates:

Filtering by Tags

New in version 2.11.0 You can use the meta field to filter resources based on their tags:
The _meta field is part of the standard MCP specification. FastMCP servers include tags and other metadata within a _fastmcp namespace (e.g., _meta._fastmcp.tags) to avoid conflicts with user-defined metadata. This behavior can be controlled with the server’s include_fastmcp_meta setting - when disabled, the _fastmcp namespace won’t be included. Other MCP server implementations may not provide this metadata structure.

Reading Resources

Static Resources

Read a static resource using its URI:

Resource Templates

Read from a resource template by providing the URI with parameters:

Content Types

Resources can return different content types:

Text Resources

Binary Resources

Working with Multi-Server Clients

When using multi-server clients, resource URIs are automatically prefixed with the server name:

Raw MCP Protocol Access

For access to the complete MCP protocol objects, use the *_mcp methods:

Common Resource URI Patterns

Different MCP servers may use various URI schemes:
Resource URIs and their formats depend on the specific MCP server implementation. Check the server’s documentation for available resources and their URI patterns.