MCP servers · agent loops · human-in-the-loop guardrails
Most of my recent work is about one question: what does it take to let a model actually do things, safely? Not demos — hosts that own the loop, gate irreversible actions, and can prove afterward what happened and what it cost.
Five projects built in sequence, each adding one capability the previous one couldn't do. There's a companion course that teaches the protocol through all five.
| # | Project | The capability it adds | Live |
|---|---|---|---|
| 1 | learn-mcp-5-year-old | A complete, working MCP server — the protocol from first principles | ↗ |
| 2 | learn-mcp-agent-loop | An MCP host that owns the agent loop — picks tools across servers, calls them, loops until done | ↗ |
| 3 | learn-mcp-agent-guard | Human-in-the-loop approval gates — stops before anything it can't undo. Postgres persistence, evals, replay | ↗ |
| 4 | learn-mcp-agent-crew | Sub-agents — recursive agent loops where every gated call bubbles to one human queue | ↗ |
| 5 | learn-mcp-agent-ledger | Sampling — the server borrows the host's model. Cost ledger, spend gates, replayable runs | ↗ |
📘 mcp-five — the written course tying all five together · read it ↗
| Project | What it does |
|---|---|
| spendguard-mcp | FinOps monorepo: investigate cloud-spend anomalies, draft a savings action, get independent approval, execute through a deterministic simulated provider. Survives retries and restarts, emits an authoritative receipt. demo ↗ |
| async-agent-workspace | Durable background agent runs on Inngest + Supabase, with a live run timeline. demo ↗ |
| ai-knowledge-base | Signed-in RAG knowledge base — upload documents, chat grounded in your own content. demo ↗ |
| research-agent | Plans research steps, calls web tools, reports back. demo ↗ |
| rag-qa-assistant | Retrieval-augmented Q&A that answers only from a supplied corpus. demo ↗ |
| ai-data-extractor | Messy invoice / receipt / email text in, clean structured JSON out. demo ↗ |
I built an agentic pipeline that takes a book from concept to finished product — manuscript, covers, metadata, EPUB, print PDF, and generated audiobook — and then used it to publish three complete series.
| Series | Books | What it is |
|---|---|---|
| ⚔️ Aztec Samurai Adventures | 12 | Epic fantasy fusing Mesoamerican warrior traditions with samurai philosophy. 3 acts, 288 chapters, 30 characters. site ↗ |
| 🌑 Reality Without Belief | 5 | Non-fiction on belief, clarity, and engaging reality directly. site ↗ |
| 🔁 Repetition — Mother Of Mastery | 5 | Non-fiction on the science of repetition, habit systems, and fast learning. site ↗ |
The pipeline itself, in three generations:
v1 documented agent workflow → v2 IDE-driven, six output formats → v3 standalone Node.js CLI, 13 genres, no IDE required.
A fourth series — Quick Draw, a five-book spaghetti western — is architected and in production.
📖 Catalogue: ketanshukla.com · author-portfolio repo
| Business | What it does |
|---|---|
| Metronagon Media | Book publishing services — covers, series branding, full production pipelines, children's picture books |
| Surplus Recoveries | Helps former homeowners claim surplus funds left after foreclosure sales. Site + 30-chapter operator course |
| Microflipping Properties | Real estate |
Languages · TypeScript · Python · JavaScript · Dart · SQL
AI / Agents · Model Context Protocol · agent loops & tool orchestration · RAG & embeddings · human-in-the-loop approval · evals & replay · sampling and cost control
Web · Next.js (App Router) · React · Tailwind CSS · Node.js
Data · PostgreSQL · Supabase · Drizzle · pgvector · ETL pipelines
Infra · Vercel · Inngest · GitHub Actions · Vitest · Docker
- ISTQB — exam-focused self-study courses for ISTQB certifications, served through a Next.js reader with timed mock exams. live ↗
- python-course — 13-notebook beginner Python course, each module backed by a pytest suite running in CI
- modern-js — modern JavaScript course: 11 lessons, 7 exercise sets, starter and capstone apps
- water-sort · crossword-quest · task-flow — smaller apps, built for the craft
San Diego, CA · Open to opportunities in agentic AI and full-stack engineering
ketanshukla.dev · linkedin.com/in/ketankshukla · ketanshukla.com (books)