0Pricing
MCP Academy · Lesson

What Roots Tell a Server

Know which folders the client makes available.

What Roots Tell a Server 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.

Servers Are a Little Blind

Your server runs as its own process, so it cannot just see the user's project. It needs the client to tell it which folders are fair game. That hint is called a root. 🧭

What a Root Really Is

A root is a single location a client says your server may work within, usually one project folder. It marks the edge of where you should reach.

Roots Are Usually file:// URIs

Most roots are file:// URIs pointing at a directory on disk. The scheme makes it explicit that you are looking at a local folder, not a web address.

file:///home/ada/projects/my-app

A Friendly Name Too

Each root can carry an optional name, a short label like "My App". It is just for humans, so logs and prompts read clearly instead of showing raw paths.

More Than One Root

A client can expose several roots at once, like a code folder plus a docs folder. Your server should treat the list as the full set of places it may touch.

Roots Are a Suggestion, Not a Cage

Roots are guidance, not hard enforcement by the protocol. They tell you where to focus, but it is on you to actually stay inside them. ✋

Why This Keeps Users Safe

Roots let a user say "work here, nowhere else." That scoping stops a server from wandering into private files far outside the project the user actually opened.

The Client Owns the List

The client decides what counts as a root, often from the workspace folder the user opened. Your server never sets its own roots; it only reads what it is given.

Roots Can Change

Roots are not frozen. If the user opens a new folder, the set changes, and a capable client can tell your server the list has been updated.

Not Every Client Has Them

Roots are an optional client feature. Some hosts offer them, some do not, so a well-built server works gracefully whether the list is full or empty.

How a Root Looks in JSON

On the wire a root entry is tiny: just a uri and an optional name. That small shape is all your server needs to know where it can operate.

{ "uri": "file:///home/ada/projects/my-app", "name": "My App" }

Quick Check

Make sure the purpose of a root is clear.

Recap: Roots in a Nutshell

You learned a root is a client-given location, often a file:// folder with an optional name, that scopes where your server should work. The client owns the list, and it can change. 🎯

Frequently asked questions

Is the “What Roots Tell a Server” lesson free?

Yes — the full text of “What Roots Tell a Server” 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 “What Roots Tell a Server”?

Know which folders the client makes available. 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 “What Roots Tell a Server” 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. What Roots Tell a Server
  2. Request the Client's Roots
  3. Negotiating Capabilities
  4. Respect Client Boundaries
← Back to MCP Academy