0Pricing
MCP Academy · Lesson

Resource URIs Explained

How resources are addressed with scheme and path.

Resource URIs Explained is a free MCP Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the MCP Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

What a Resource Is

An MCP resource is read-only context your server hands the model, like a file, config, or record. The AI reads it, but never changes it.

Why an Address

Each resource needs a stable name so a client can ask for it by reference. That name is its URI, just like a web page has a URL. 🔗

Scheme Then Path

A resource URI is built from a scheme, then a colon and slashes, then a path. The scheme says what kind of thing the URI points to.

file:///notes/today.txt
config://app/settings

Pick Your Own Scheme

You are free to invent a scheme that fits your server, such as config or db. The scheme groups related resources under one clear label.

The file Scheme

The file scheme is common for documents on disk. Three slashes mean the path starts at the root, just like file URLs in a browser.

file:///home/data/report.md

Custom Scheme Example

For app data, a tidy custom scheme keeps things readable. The model sees a name that tells it exactly what the resource holds.

users://profile/active
weather://city/london

URIs Must Be Unique

Every resource needs its own distinct URI so requests are never ambiguous. Two resources sharing one URI would collide and confuse clients.

Declare It in FastMCP

In the Python SDK you attach a URI to a function with the resource decorator. That string is the address clients use to read it.

from mcp.server.fastmcp import FastMCP
mcp = FastMCP("Demo")

@mcp.resource("config://app")
def config(): ...

Clients List URIs

When a client connects, it asks the server to list every resource it offers. Each entry carries its URI, a name, and a short description.

Read by URI

To fetch content, the client sends a read request naming the exact URI. The server matches that URI to a handler and returns the body.

Keep URIs Stable

Treat a published URI like a promise. Renaming it later breaks any client or saved reference that pointed at the old address.

Quick Check

Spot the part that defines the resource type.

Recap

Resources are read-only context named by a URI: a scheme plus a path. Keep URIs unique and stable so clients can rely on them. ✅

Frequently asked questions

Is the “Resource URIs Explained” lesson free?

Yes — the full text of “Resource URIs Explained” is free to read here on the web, and the MCP Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the MCP Academy course, upgrade to CoddyKit PRO.

What will I learn in “Resource URIs Explained”?

How resources are addressed with scheme and path. You practise MCP Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start MCP Academy?

No prior experience is required. MCP Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Resource URIs Explained” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this MCP Academy lesson?

Yes. Every MCP Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Resource URIs Explained
  2. Serve a Static Text Resource
  3. Read a File from Disk
  4. Set the Right MIME Type
← Back to MCP Academy