Home Glossary
HomeGlossaryMCP Resource
MCP Glossary

MCP Resource

TL;DR

An MCP resource is a read-only piece of data exposed by a server, identified by a URI. Resources represent files, database records, API responses, or anything the AI can reference. Unlike tools, resources are passive — clients fetch them, servers don't execute side effects.

In depth

An MCP resource is the read-only data primitive of the protocol. Each resource has a URI (which identifies it), a human-readable name, optional description, and a MIME type. Resources are listed via `resources/list` and fetched via `resources/read`.

Think of resources as the 'data' counterpart to tools. Tools DO things (send email, create issue); resources EXPOSE things (file contents, database rows, API responses). Many servers expose both — the filesystem MCP has tools (`write_file`) and resources (the files themselves).

Resources support templates: a URI like `github://repos/{owner}/{repo}/issues/{number}` lets the LLM fetch any issue by parameterizing the URI. This is more efficient than tool calls for large fan-out reads.

Resources can also be subscribed to — the client registers interest in a URI, and the server notifies on change. This enables live dashboards and reactive workflows.

Code example

// Listing resources
{
  "jsonrpc": "2.0",
  "method": "resources/list",
  "id": 1
}

// Response
{
  "resources": [
    {
      "uri": "file:///project/README.md",
      "name": "Project README",
      "mimeType": "text/markdown"
    }
  ]
}

// Reading a resource
{
  "jsonrpc": "2.0",
  "method": "resources/read",
  "params": { "uri": "file:///project/README.md" },
  "id": 2
}

Examples

  • 1
    `file:///path/to/file.md` — filesystem MCP exposes files as resources
  • 2
    `github://repos/acme/app/issues/42` — a specific GitHub issue
  • 3
    `postgres://schema/public/tables/users` — a database table schema
  • 4
    `slack://channels/general/messages` — recent messages in a channel
  • 5
    `notion://pages/abc123` — a specific Notion page

What it's NOT

  • ✗Resources are NOT tools — they have no side effects and cannot be called.
  • ✗Resources are NOT always files — any URI-addressable data is a resource.
  • ✗Resources are NOT always static — they can be dynamic (API responses) and even subscribed to.
  • ✗Resources are NOT the same as context files — Claude Code's @-mentions are closer to this but not identical.

Related terms

MCP ToolMCP ServerModel Context Protocol (MCP)MCP Capability

See also

  • MCP Resources

Frequently asked questions

When should I use a resource vs a tool?

Use a resource for stable, readable data (a file, a record). Use a tool when you need to compute, filter, or act. If the client might want to cache or subscribe, prefer a resource.

Can the LLM read resources directly?

The host decides. Claude Desktop lets the user attach resources via @-mentions; Claude Code lets the LLM auto-fetch via tool calls if enabled.

How are resources secured?

Via URI scoping — servers should validate that the requested URI is within the allowed scope (e.g. filesystem MCPs restrict to approved roots).

Build with MCP

Browse 300+ MCP servers, explore recipes, or continue learning the MCP vocabulary.

Browse MarketplaceAll terms