Skip to content
MCP Five

The Whole Picture50 / 51

Run it all yourself

Clone table, prerequisites, env vars — and which commands spend money and which don't.

All five projects are public, deployed, and runnable. This page is everything you need to get any of them going, and — explicitly — which commands cost money.

The five repos

Each one is a sequel that copies the previous repo's lib/ wholesale, so project #5 contains all five projects' worth of machinery. If you only clone one, clone #5 — every earlier checkpoint still runs in it.

Prerequisites

  • Node 20+ and npm.
  • Project #1 needs nothing else. A server costs nothing to run and nothing to deploy.
  • Projects #2–#5 need an ANTHROPIC_API_KEY.
  • Projects #3–#5 also need a Postgres DATABASE_URL.

Getting a database without a credit card

bash
npx vercel install neon
npx vercel env pull .env.local

It provisions from the Vercel Marketplace, bills through Vercel, suspends rather than charges if you exceed the free tier, and never asks for a card.

Getting any of them running

bash
git clone https://github.com/ketankshukla/learn-mcp-agent-ledger.git
cd learn-mcp-agent-ledger
npm install
cp .env.example .env.local     # add ANTHROPIC_API_KEY and DATABASE_URL
npm run db:init                # creates the schema and stocks the pantry
npm run dev

Free · these cost nothing at all

No model calls. Run these first, in this order — each proves one layer before the next is stacked on it, so you are never more than one layer away from the bug.

bash
npm run mcp:list         # transport — can we reach the servers at all?
npm run mcp:translate    # schemas convert, and what the gate would stop
npm run readonly         # resources + prompts            (#5)
npm run ledger           # who spent what                 (#5)
npm run evals:replay     # THE $0 SUITE — 13/13 from stored traces  (#5)
npm run replay           # rewind a past run, including sub-agents  (#3+)

💸 Paid · these spend real money

≈$3.00what all of project #5 cost~730k tokens, whole build
~$0.65the live eval suite, one passnpm run evals -- --all --attempts 1
~0.1¢one sampling demonpm run sampling
bash
npm run agent            # the loop, one agent                  — cents
npm run approval         # THE GATE — approve and deny          — cents
npm run crew             # THE CREW — the pause bubbles up      — more
npm run sampling         # a server asks you to think           — ~0.1¢
npm run sampling -- --deep   # …and gets REFUSED, for $0.00
npm run evals -- --all --attempts 1     # the live suite        — ~$0.65
npm run compare          # delegate off vs on                   — expensive

The demo worth running

Three commands, and it is the whole of project #5:

bash
npm run ledger -- --ceiling kitchen 2     # two cents per request
npm run sampling -- --deep                # 🛑 your host tells your own server no
npm run ledger -- --grant kitchen 8       # a human says "yes, this once"
npm run sampling -- --deep                # …and now it goes through
terminal
🛑 The Kitchen → summarise_week  [claude-sonnet-5]  6.0¢ estimated — REFUSED, $0.00 spent

tokens on the tab   : 0
refused (not spent) : 6.0¢  ← what the ceiling saved you

Plug project #1 into Claude

The cheapest way to feel MCP working, and it costs nothing:

bash
claude mcp add --transport http cookie-jar https://learn-mcp-5-year-old.vercel.app/api/mcp

Then say "roll me three twenty-sided dice" and watch it reach into the jar.

Or poke the live server directly, with no client at all:

bash
curl -X POST https://learn-mcp-5-year-old.vercel.app/api/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'