MCP resource
Updated November 24, 2026
An MCP resource is a piece of data that an MCP server shares with an AI application as context, such as a file, a database schema or API documentation. Each resource has a unique URI. The host application, not the model, decides which resources to read and how their contents reach the model.
In short: An MCP resource is URI-identified data, such as a file or schema, that an MCP server exposes through resources/list and resources/read so the host application can add it to a model's context.
How an MCP resource works
An MCP server that offers resources declares a resources capability 1. Two optional flags sit inside it. The listChanged flag says the server will announce changes to its list of resources, and the subscribe flag says it supports update notifications for individual resources 1.
The MCP client finds resources with a resources/list request, which supports pagination and caching 1. Each entry carries a uri and a name, plus an optional title, description, mimeType, size and icons 1. The list may differ by the authorization on the request, so a caller sees only the resources its granted scopes permit 1.
To get the data, the client sends resources/read with the URI 1. The server returns the contents as text or as base64-encoded binary data, and it may return several contents at once, such as the files inside a directory resource 1. Responses can include caching hints, ttlMs and cacheScope, that tell the client how long it may reuse a result 1.
Some data does not fit a fixed list. Resource templates describe parameterized resources with URI templates, and clients discover them with resources/templates/list 1. The MCP server guide shows templates for weather forecasts by city and date and for flights between two cities, each turning one definition into many readable resources 2.
Resources differ from tools in who decides to use them. Resources are application-driven, and the protocol leaves the interface to the host application 1. An application can show resources in a tree or list for the user to pick, offer search and filters, or include context automatically based on heuristics or the model's selection 1. The model does not call a resource the way it calls an MCP tool through tool calling. The application reads the resource and decides what reaches the model's context window.
Annotations help with that choice. A resource can carry an audience of user or assistant, a priority from 0.0 to 1.0 and a lastModified timestamp 1. Clients can use them to filter by audience, rank what to include and sort by recency 1.
Resource URIs, errors and security
The URI is the resource's identity, and its scheme tells the client how to treat it. The specification lists common schemes and lets servers define custom ones that follow RFC 3986 1.
https:// marks a resource on the web. Servers should use it only when the client can fetch the resource directly without going through the MCP server 1.
file:// marks resources that behave like a filesystem, even when no physical filesystem sits behind them 1.
git:// marks Git version control integration 1.
Custom schemes cover everything else, such as the calendar and travel schemes in the MCP server guide 2.
Errors changed in the current revision. A server must answer a request for a resource that does not exist with JSON-RPC error -32602, and clients should still accept -32002, the code earlier protocol versions used 1. Servers must not return an empty contents array for a missing resource, because an empty array could also mean a resource with no content 1. Internal errors should use -32603 1.
Servers carry the security duties. They must validate every resource URI, must encode binary data properly and must sanitize file paths to prevent directory traversal when serving file resources 1. They should apply access controls to sensitive resources and check permissions before each operation 1. A server that exposes CRM records or customer files as resources needs the same access rules its API would apply.
Example of reading an MCP resource
A RevOps team runs an internal MCP server in front of its CRM. It exposes the contact object's field list as a resource, so an assistant that drafts enrichment mappings knows which CRM fields exist before it calls any tool.
The client lists the server's resources, shortened here.
{"jsonrpc": "2.0", "id": 1, "method": "resources/list"}The server answers with one entry.
{"uri": "crm://schema/contact", "name": "contact-schema",
"title": "Contact object fields", "mimeType": "application/json"}The user picks Contact object fields in the host application, and the client reads it.
{"jsonrpc": "2.0", "id": 2, "method": "resources/read",
"params": {"uri": "crm://schema/contact"}}The server returns a contents array with the uri, mimeType and text of the schema, which follows the shape the specification gives for text content 1. The application adds the schema to the conversation. When the model then needs company data, it calls an enrichment tool, and the mapping it writes uses field names that already exist in the CRM.
The schema changes when an admin adds a field. A client that wants to hear about it opens a subscriptions/listen request for the schema URI, and the server sends notifications/resources/updated on that stream when the resource changes 1. The application then reads the resource again before the next mapping.
If the assistant asks for a URI that does not exist, such as a misspelled object name, the server returns error -32602 1. The application can show that error to the user, who picks the right resource from the list.
MCP resource vs MCP tool
Both come from an MCP server, and they differ in who decides to use them. The MCP server guide marks tools as model-controlled and resources as application-controlled 2.
| MCP resource | MCP tool | |
|---|---|---|
| What it answers | What context can the app read? | What action can the model take? |
| Input | A URI or a URI template | Arguments that match an input schema |
| Output | Text or binary contents with a MIME type | A result with content and an error flag |
| Cost driver | Each read the application makes | Each call the model decides to make |
| Main risk | Stale or oversized context | The model runs the wrong action |
| Use it when | The model needs reference material | Something has to run or change |
Frequently asked questions
What is a resource in MCP?
A resource is data an MCP server shares as context, such as a file, a database schema or application-specific information 1. Each one has a unique URI, and the client fetches it with a resources/read request 1. The host application decides how the contents reach the model.
What is the difference between an MCP resource and an MCP tool?
A tool is a function the model can call to take an action, and a resource is data the application reads for context. The MCP server guide marks tools as model-controlled and resources as application-controlled 2. Use resources for reading and tools for anything that has to run.
What is an MCP resource template?
A resource template describes a family of resources with a URI template instead of one fixed URI 1. Clients list templates with resources/templates/list, fill in the parameters and read the result like any other resource. Arguments can be auto-completed through the completion API 1.
Can an MCP resource change after it is read?
Yes. A server can announce changes to its resource list, and a client can watch specific resources through a subscriptions/listen request and receive notifications/resources/updated when one changes 1. Both features are optional, so check the capabilities the server declares 1.
The bottom line
An MCP resource is URI-identified data that a server shares as context, fetched with resources/read and chosen by the host application rather than the model 1. Use resources for reference material such as schemas and documentation, and use tools for anything that has to run. Check how each client surfaces resources before relying on them, because the protocol leaves that interface to the application 1.
Sources
- Resources (specification, version 2026-07-28), Model Context Protocol
- Understanding MCP servers, Model Context Protocol
- RichAPI llms-full.txt, RichAPI