PaPoo
cover

What is an MCP resource?

An MCP resource is a piece of data that a server exposes to a model or client through the Model Context Protocol, usually as a named, readable thing like a file, document, or other context object.

Why it matters

Resources are how MCP lets an assistant work with context that already exists somewhere else without copying it into the prompt by hand. In practice, they are useful when you want an LLM app to inspect docs, logs, configs, or other stored information in a structured way.

You’d reach for resources when:

How it works

In MCP, a server can expose resources as part of its capabilities. A client can list them, inspect their metadata, and read their contents through protocol methods defined by the specification.

A resource is typically identified by a URI-like identifier and may include metadata such as a name, description, or MIME type. The exact shape comes from the MCP spec and the server’s implementation, but the general idea is stable: resources are readable context items, not instructions and not actions.

Think of it as a server publishing a small catalog of things the assistant can open. The model or host app can then fetch the content it needs at the moment it needs it, instead of stuffing everything into the conversation up front.

Tiny concrete example

A developer connects an MCP client to a docs server.

The server exposes a resource like:

resource: docs://project/architecture

The client asks for it, and gets back the document text. The model can then summarize it, answer questions about it, or compare it with another resource.

A simple scenario:

Common pitfalls / when NOT to use it

Related terms

Related terms

同じ著者の記事