Resources
Expose read-only data sources as MCP resources to provide context to AI models.

What are Resources?

Resources are a standardized way for MCP servers to expose read-only data to clients. They provide contextual information that can help AI models understand your application, such as files, database schemas, configuration, or any data accessible via a URI.

Scaffold a new MCP resource

Key concept: Unlike tools which are invoked directly by the AI to perform actions, resources are application-driven. The host application (not the AI) decides when and how to fetch and include resource content in the conversation.

Each resource is uniquely identified by a URI (e.g., file:///project/README.md or api://users/123).

Resources vs Tools

Understanding the difference between resources and tools is essential:

AspectResourcesTools
PurposeProvide context and dataPerform actions
InvocationApplication-driven (user or app selects)AI-driven (model decides to call)
NatureRead-only data accessCan read and modify state
ControlUser/application controls what's includedAI decides when to use
ExamplesFiles, configs, DB schemas, logsSend email, create file, query API

When to use resources:

  • Exposing project files or documentation
  • Sharing database schemas or configurations
  • Providing logs or system information as context

When to use tools:

  • Performing actions that modify state
  • Executing operations the AI should decide to trigger
  • Interacting with external APIs or services

How Resources are Used

Resources follow an application-driven model. The typical flow:

  1. Discovery — the host application calls resources/list to discover available resources.
  2. Selection — the host displays resources in a UI (tree view, search, list) and the user (or application logic) picks which ones to include.
  3. Reading — the host fetches the selected URIs via resources/read.
  4. Context inclusion — the host injects the contents into the AI conversation as context.
The AI model never directly requests resources. It's always the application that decides which resources to include based on user selection, heuristics, or automatic context detection.

Guides

Static resources & structure

File-backed resources, custom handlers, naming, and the defineMcpResource shape.

Templates & handlers

ResourceTemplate, URI variables, and handler signatures.

Metadata, content & errors

MIME types, binary payloads, and error results.

Groups & organization

group / tags, directories, URI schemes, and enabled guards.

If you are new to MCP in Nuxt, start with Tools — resources complement tools but follow a different discovery model.

Copyright © 2026