What is MCP resource?

An MCP resource is read-only data an MCP server exposes by URI, like a file, a database row, or a document, that the host can load into the model's context without the model taking an action.

An MCP resource is the data primitive of the Model Context Protocol, the counterpart to tools. Where a tool is an action the model invokes, a resource is content the server makes available to be read: a file's contents, a configuration document, a database record, a log, a wiki page. Each resource is identified by a URI and carries metadata like a name and MIME type, and servers can expose either a fixed list or templated URIs that the client fills in. The key design distinction in the spec is that resources are application-controlled rather than model-controlled: the host decides which resources to pull into context and when, rather than the model autonomously fetching them the way it calls a tool. This makes resources a clean way to give a model background material, the file you have open, the ticket you are looking at, without granting it the ability to take side effects. In practice many servers lean on tools for retrieval too, but resources remain the protocol's intended mechanism for read-only context.