What is an MCP resource?
An MCP resource is data an MCP server offers clients as context for a language model, each identified by a unique URI, such as files, database schemas or documents. The specification makes resources application-driven: the host decides which to add to context.
Unlike an MCP tool, an operation the model calls to do work, a resource is content that is read and added to context. A knowledge base holds knowledge; an MCP resource exposes it in a standard way.
- Topic
- Agents and protocols
- Also known as
- MCP resources
How an MCP resource works
- The server declares the resources capability; the client fetches URIs, names, descriptions and types with a resources/list request.
- The client reads a resource's content with resources/read; content returns as text or binary data.
- Resource templates let parameterised URIs produce resources, for example for a given customer or date.
- The host may let users choose resources or add them by its own rules; servers that support it announce resource changes through subscriptions.
In more detail
URI templates (RFC 6570) and resource annotations
MCP resource templates follow RFC 6570 URI Template syntax and are discovered separately via 'resources/templates/list'. Servers can also attach optional annotations, such as 'audience' (intended for the user, the assistant or both), 'priority' (0.0 to 1.0) and 'lastModified' timestamps, helping hosts decide which resources deserve scarce context-window space.
Binary payloads and context window limits
In 'resources/read', text payloads are returned as UTF-8 'text' fields while binary files (such as PDFs, images or spreadsheets) are returned as base64-encoded 'blob' payloads paired with a 'mimeType'. Because large resources can easily overflow model context limits, production hosts enforce byte-size caps, strip or chunk oversized blobs and extract structured text before injecting content into prompts.
Authorising reads, IDOR and path traversal protection
Protecting 'resources/list' alone is insufficient: servers must re-verify user permissions on every 'resources/read' call and validate resolved paths or query parameters against IDOR and path-traversal attacks. This is critical when resource templates expose patterns like 'internal://reports/{reportId}' that an attacker or injected prompt might probe sequentially.
Commonly confused terms
| Term | How it differs |
|---|---|
| MCP roots | MCP resources are exposed by servers as context data to read; MCP roots (deprecated in 2026-07-28) were announced by clients to tell servers which local directories to focus on. |
Why an MCP resource matters for on-premises AI
MCP resources open organisational data to AI assistants in a standard way without separate integrations per application. Since the resource list can vary by the requesting user's authorisation, users see only data they may access; this check runs server-side. Content from external sources can hide instructions, so the host controls which resource is added when. When offered in-house, data stays inside.
A manufacturer publishes maintenance manuals and its production database schema as resources on an internal MCP server; an engineer's assistant reads the relevant manual, while documents for lines the engineer cannot access never appear.
Common questions
How does an MCP resource differ from an MCP tool?
A resource is data read into context and managed by the host. A tool is an operation the model calls that produces a result.
Are MCP resources only files?
No. Database schemas, documents, API responses or any application data can be offered as resources identified by URIs.
Related terms
Sources
In the glossary: Glossary, M to Q