Overview
MCP resources represent data sources, knowledge bases, and contextual information that the AI agent can access. Resources provide a standardized way to expose data through URIs with defined schemas.Resources enable AI agents to access conversation history, documents, databases, APIs, and other data sources in a consistent manner.
Resource URIs
Resources are identified by URIs following this pattern:conversation://conv_123- Conversation historyfile:///path/to/document.txt- Local filehttp://api.example.com/data- HTTP endpointknowledge://product-docs- Knowledge base
Resource Types
Conversation Resources
Access conversation history and context. URI Pattern:conversation://{conversation_id}
Example:
File Resources
Access local or remote files. URI Pattern:file://{path}
Example:
Knowledge Base Resources
Access curated knowledge bases and documentation. URI Pattern:knowledge://{knowledge_base_id}
Example:
HTTP Resources
Access external HTTP/HTTPS endpoints. URI Pattern:http[s]://{url}
Example:
Database Resources
Access database tables and queries. URI Pattern:db://{database}/{table} or db://{database}/query
Example:
Resource Operations
List Resources
Discover available resources:Read Resource
Access resource content:Subscribe to Resources
Get notifications when resources change:Unsubscribe from Resources
Stop receiving updates:Resource Templates
Define reusable resource patterns:Resource Permissions
Resources respect authorization rules:Resource Schemas
Conversation Schema
Knowledge Base Schema
File Schema
MIME Types
Supported MIME types for resources:Custom Resources
Create custom resource providers:Resource Caching
Cache frequently accessed resources:Resource Monitoring
Track resource access:Best Practices
Use Appropriate URIs
Use Appropriate URIs
Choose descriptive, meaningful URIs:
Implement Pagination
Implement Pagination
For large datasets, use pagination:
Handle Large Files
Handle Large Files
Stream large files instead of loading fully:
Validate Content
Validate Content
Validate resource content before use:
Troubleshooting
Resource not found
Resource not found
Error:
Resource not found: conversation://conv_999Solutions:Permission denied
Permission denied
Error:
User does not have permission to read resourceSolutions:Invalid URI format
Invalid URI format
Error:
Invalid resource URI formatSolutions:Next Steps
MCP Tools
Available tools
MCP Messages
Message protocol
MCP Endpoints
HTTP endpoints
Authorization
Resource permissions
MCP Resources Ready: Standardized access to data sources and context!