Resources

Data and content that MCP servers expose to clients for use as context in LLM interactions, including files, database records, API responses, and live system data.

Resources

Resources are a core primitive in MCP that represent any kind of data that servers make available to clients for use as context in LLM interactions. Resources are application-controlled, meaning clients decide how and when to use them.

Resource Types

Type Content Use Cases
Text Resources UTF-8 encoded text Source code, configs, logs, JSON/XML
Binary Resources Base64 encoded binary Images, PDFs, audio, video files

Resource Identification

Resources use URI-based identification:

[protocol]://[host]/[path]

Examples:
file:///home/user/documents/report.pdf
postgres://database/customers/schema
screen://localhost/display1

Discovery Methods

  1. Direct Resources - Static list via resources/list request
  2. Resource Templates - Dynamic URIs using RFC 6570 templates

Real-time Updates

  • List Changes - Servers notify when available resources change
  • Content Updates - Clients can subscribe to specific resource updates
  • Subscription Model - resources/subscribe and resources/unsubscribe

Example Resource Operations

// List resources
{
  "method": "resources/list"
}

// Read resource content  
{
  "method": "resources/read",
  "params": {
    "uri": "file:///logs/app.log"
  }
}

Related Terms

  • MCP Server
  • Tools
  • Prompts
© 2025 👨‍💻 with ❤️ by Full Stack Craft
"Any sufficiently advanced technology is indistinguishable from magic."