Skip to main content
New in version 2.0.0 Use this when you need to read data from server-exposed resources like configuration files, generated content, or external data sources. Resources are data sources exposed by MCP servers. They can be static files with fixed content, or dynamic templates that generate content based on parameters in the URI.

Reading Resources

Read a resource using its URI:
Resource templates generate content based on URI parameters. The template defines a pattern like weather://{{city}}/current, and you fill in the parameters when reading:

Content Types

Resources return different content types depending on what they expose. Text resources include configuration files, JSON data, and other human-readable content:
Binary resources include images, PDFs, and other non-text data:

Multi-Server Clients

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

Version Selection

New in version 3.0.0 When a server exposes multiple versions of a resource, you can request a specific version:
See Metadata for how to discover available versions.

Raw Protocol Access

For complete control, use read_resource_mcp() which returns the full MCP protocol object: