Project: Excel MCP Server

The capstone: build a real Excel MCP server — read tools, SAFE write tools, batch updates, audit trails — applying every discipline from AG-02 through AG-08.

▶ Watch this reel

What you'll learn

  1. Read tools first
  2. Safe write tools
  3. Batch operations
  4. Audit, permissions & recap

Remember this

Read path

Safe writes

Batch

Audit & permissions

Capstone: AG-02→AG-08 embodied in ~300 lines.

Code: The complete tool surface (7 tools, one policy)

# READS (always allowed, capped)
list_workbooks()                     # map first
read_range(file, sheet, "A1:F50")   # ≤5,000 cells
read_table(file, sheet, header_row)  # JSON records

# WRITES (guarded: backup → preview → token → bounds)
preview_write(file, sheet, range, values)   # → diff + confirm_token
write_cells(..., confirm_token=...)         # refuses without valid token
batch_update(sheet, range, values, files,
             dry_run=True)                  # idempotent, per-file results

# EVERYWHERE
#   _wb(): ALLOWED-folder scoping            (AG-03/07)
#   audit.jsonl: append-only, outside fence  (AG-07)
#   docstrings: when / when-not / limits     (AG-02)
#   FastMCP + Inspector-tested               (AG-08)
#
# Total: ~300 lines. That's the whole production server.