Coders In Hoods
  • Courses
  • Roles
  • Blog
  • Setup

Coders In Hoods AI Academy

Every course is free. Sign in to start, and your progress, quiz scores and bookmarks follow you.

AI Academy

  • Courses
  • Paths
  • Setup guides
  • How we teach

Role roadmaps

  • AI Engineer
  • Forward Deployed Engineer
  • Machine Learning Engineer
  • All roles

Coders In Hoods

  • The agency
  • Coaching for teams
  • Blog
  • LinkedIn
  • X (Twitter)

Contact

codersinhoods@gmail.com

© Coders In Hoods · since 2019

Course overview

Building MCP Servers

Free · sign in to start and track progress

1 · The protocol and its mental model

  • 1MCP and REST: two mental models
  • 2The protocol on the wire

2 · Designing servers agents use well

  • 3Designing tools, not endpoints
  • 4Testing and evaluating servers
  • 5Resources, prompts and asking for input

    Exercise answers

    • Answer: Add resources, a prompt and signed confirmations

3 · Running servers in production

  • 6Remote servers and authorization
  • 7Securing MCP servers
  • 8Shipping and evolving servers
CapstoneShip an MCP server for an existing REST APIReference implementation

Module 2 · Designing servers agents use well · Lesson 5

Resources, prompts and asking for input

Expose read-only context as resources with cache hints, workflows as prompts the user picks, and ask the user to confirm an action through a multi round-trip request whose state the server signs.

60 min 2 videos 2 exercises 8-question quiz Answers
Setup for the exercises:Install Claude CodeNode.js, pnpm and TypeScriptMCP servers in Claude CodeThe Larchmere Desk mock API

By the end of this lesson you can

  • Choose between a tool, a resource and a prompt by asking who decides when each one is used
  • Expose resources and resource templates with cache hints, and link to them from tool results
  • Write a prompt with completable arguments that carries a workflow without carrying untrusted text
  • Ask the user to confirm an action through a multi round-trip request, and protect the state that request carries
  • Explain why roots and sampling were deprecated, what replaces them, and which hosts support resources and prompts

On this page

  • Three primitives, three deciders
  • Resources and templates
  • Cache hints
  • Linking resources from tools
  • Prompts: workflows the user picks
  • Asking the user: elicitation through a multi round-trip request
  • requestState is attacker-controlled
  • The same handler for 2025-era clients
  • Roots and sampling are deprecated
  • What hosts support
  • Misconceptions and limits
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01Three primitives, three deciders
  2. 02Resources and templates
  3. 03Prompts: workflows the user picks
  4. 04Asking the user: elicitation through a multi round-trip request
  5. 05Roots and sampling are deprecated
  6. 06What hosts support
  7. 07Misconceptions and limits
  8. 08Connections
  9. 09Summary

Sources & further reading

  • An Empirical Study of Model Context Protocol ApplicationsPaper · Muhammad Hamza Arshad Majeed, May Mahmoud, Sarah Nadi · 2026A recent preprint and the only large study of the host side: 1,723 applications mined from GitHub, of which only 37.2% gate tool execution behind a blocking approval step. Read the abstract and the human-oversight results: a server can't assume someone approves each call.
  • Multi Round-Trip Requests (2026-07-28)Docs · Model Context Protocol · 2026How a stateless server asks for input: the input_required result, the retry with a new id, and the server requirements for requestState (integrity, principal, expiry, request digest). Read Server Requirements twice.
  • Elicitation (2026-07-28)Docs · Model Context Protocol · 2026Form mode and URL mode, the accept, decline and cancel actions, and why secrets must never go through a form.
  • Resources (2026-07-28)Docs · Model Context Protocol · 2026URIs and RFC 6570 templates, contents, subscriptions through subscriptions/listen, and the -32602 rule for a missing resource. Pair it with the Caching page for ttlMs and cacheScope.
  • SEP-2577: Deprecate Roots, Sampling, and LoggingDocs · Model Context Protocol · 2026The reasons in the maintainers' own words (low adoption, vague semantics, implementation burden) and the replacement for each feature. Ten minutes.
  • input_required (TypeScript SDK v2)Docs · Model Context ProtocolThe SDK side of this lesson's code - inputRequired, acceptedContent, createRequestStateCodec and the legacy shim - with runnable examples.
  • Connect Claude Code to tools via MCPDocs · AnthropicHow one host surfaces the primitives - resources as @-mentions, prompts as slash commands, elicitation as a dialog. Read the sections on resources, prompts and elicitation.
Free · sign in to start

Sign in to keep reading.

Free, no card. We use your account to save progress, quiz scores, bookmarks and occasionally send updates from our team.

  • 9 more sections
  • 2 hands-on exercises
  • A 8-question quiz
  • Progress, quiz scores and bookmarks