Skip to main content

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:
Examples:
  • conversation://conv_123 - Conversation history
  • file:///path/to/document.txt - Local file
  • http://api.example.com/data - HTTP endpoint
  • knowledge://product-docs - Knowledge base

Resource Types

Conversation Resources

Access conversation history and context. URI Pattern: conversation://{conversation_id} Example:
Response:

File Resources

Access local or remote files. URI Pattern: file://{path} Example:
Response:

Knowledge Base Resources

Access curated knowledge bases and documentation. URI Pattern: knowledge://{knowledge_base_id} Example:
Response:

HTTP Resources

Access external HTTP/HTTPS endpoints. URI Pattern: http[s]://{url} Example:
Response:

Database Resources

Access database tables and queries. URI Pattern: db://{database}/{table} or db://{database}/query Example:
Response:

Resource Operations

List Resources

Discover available resources:
Response:

Read Resource

Access resource content:
With Parameters:

Subscribe to Resources

Get notifications when resources change:
Notification Format:

Unsubscribe from Resources

Stop receiving updates:

Resource Templates

Define reusable resource patterns:

Resource Permissions

Resources respect authorization rules:
Grant access:

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:
Redis caching:

Resource Monitoring

Track resource access:

Best Practices

Choose descriptive, meaningful URIs:
For large datasets, use pagination:
Stream large files instead of loading fully:
Validate resource content before use:

Troubleshooting

Error: Resource not found: conversation://conv_999Solutions:
Error: User does not have permission to read resourceSolutions:
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!