{"slug": "my-mcp-stack-how-i-run-my-own-agent-tools", "title": "My MCP Stack: How I Run My Own Agent Tools", "summary": "A developer has published a personal stack of local-first Go utilities, including an open-source terminal tool called Thermal, that read the SQLite and JSON session stores left by coding agents such as Codex, Devin, OpenCode, MiMoCode and Claude to tally token usage and spend. Thermal runs strictly read-only and generates a cross-tool census in under 20 milliseconds; in the author's sample output, Devin shows 19.2B tokens at roughly $20,134.07 and Codex 1.0B tokens at roughly $538.30. The stack is built around the Model Context Protocol (MCP) and aims to answer what a session cost, which skills agents carry, and how to keep their work grounded.", "body_md": "A few months ago, I caught myself looking at a completed pull request with a lingering sense of unease.\n\nThe diff itself was clean. Twelve lines of Go in an HTTP router, a straightforward unit test, and a green badge on the CI runner. If you inspected the git commit log, the entire change looked like a ten-minute task.\n\nWhat the git log failed to record was the invisible churn that produced it.\n\nBehind those twelve lines was an autonomous agent session that ran for nearly forty minutes. It had traversed eighteen files, triggered thirty-two model turns, burned through four hundred thousand tokens, and silently stumbled down two architectural dead ends before finding the right file. I was paying the API invoice for an entire engineering afternoon, yet my tools treated the work as if it had cost nothing more than a few keystrokes.\n\nWe are living through a curious transition in software engineering. We have welcomed autonomous coding agents into our daily workflow, yet we still manage them with nineteenth-century habits and twentieth-century terminal tooling. We know the exact memory footprint of our compiled binaries, but we have zero visibility into the token burn of our daily coding sessions. We collect procedural agent skills like browser bookmarks, scattering them across dozens of vendor-specific dotfile directories until our context windows choke on alphabetical truncation.\n\nOver the past year, I stopped treating agents as black-box appliances and started building the missing scaffolding. The goal was never to wrap them in complicated enterprise orchestration platforms. Instead, I wanted small, local-first utilities built in Go that run on my own workstation, read ordinary SQLite databases, speak standard protocols like the Model Context Protocol (MCP), and answer three basic questions: What did this session cost, what skills are my agents actually carrying, and how do we keep their work grounded in reality?\n\nHere is the stack I run every day.\n\n## Thermal: Financial Vision from Read-Only SQLite\n\nThe first missing piece was accounting. When an agent runs in your terminal, it writes session telemetry somewhere on your local disk. OpenCode, Devin, Codex, MiMoCode, and Claude each maintain local stores. Some use JSON lines, others use SQLite, and a few store raw session state in proprietary caches.\n\nRather than running an intercepting proxy daemon that injects network latency\nor wrapping agent binaries in fragile shell shims, I built [Thermal](https://jadmadi.net/project/thermal/).\n\nThermal is an open-source terminal utility written in Go. Its operating philosophy is strictly read-only: it reaches directly into the local databases already left behind by your coding tools on disk, parses token usage and model identifiers, and calculates running streaks, daily volume, and real financial spend. Because it reads local files directly with SQLite memory-mapped I/O, generating an entire cross-tool census takes less than twenty milliseconds.\n\nWhen I run `thermal` in my workspace today, it does not give me vague\nestimates or cloud dashboard spinners. It prints an immediate, concrete\nleaderboard:\n\n```\n  THERMAL : Don't break the streak.\n\n  ╭─ Token Warriors ────────────────────────────────────── tokens & spend ─╮\n  │    #  Tool              Strk    Best    Days       Tokens         Cost │\n  │  ───────────────────────────────────────────────────────────────────── │\n  │   1.  Codex               3d      7d     49d     1.0B tok     ~$538.30 │\n  │   2.  Devin               2d     33d     45d    19.2B tok   ~$20134.07 │\n  │   3.  OpenCode            1d     11d     30d    10.6B tok       $62.91 │\n  │   4.  MiMoCode            1d      7d     16d     1.2B tok       $56.14 │\n  │   5.  ZCode               1d      6d     11d   871.0M tok      ~$25.01 │\n  │   6.  DeepSeek (DSH)      1d      1d      5d    18.0M tok       ~$0.07 │\n  │   7.  Grok                1d      1d      1d   692.7K tok        $0.44 │\n  │   8.  codewhale           1d      1d      3d   110.1K tok        $0.02 │\n  │   9.  Claude              1d      1d      3d    55.5K tok       ~$0.16 │\n  ╰────────────────────────────────────────────────────────────────────────╯\n\n  ╭─ Activity Hunters ────────────────────── messages & steps ─╮\n  │    #  Tool              Strk    Best    Days      Activity │\n  │  ───────────────────────────────────────────────────────── │\n  │   1.  Agy                49d     49d     59d   214.2K step │\n  │   2.  command-code        1d      9d     49d     11.2K msg │\n  │   3.  Droid               1d      1d      2d        14 msg │\n  │   4.  Muse                1d      1d      1d      1 prompt │\n  ╰────────────────────────────────────────────────────────────╯\n\n  >> Agy is on fire with a 49-day streak!\n\n  Recorded cost: $119.52 from 4 tools. Estimated: ~$20697.60 across 5 tools (~ prefix).\n```\n\nSeeing the raw numbers changes how you work. You immediately notice when a harness gets stuck in a repetitive prompt loop, or when a model switch cuts daily expenditure by two orders of magnitude. For single-tool deep dives, Thermal renders eight-week activity heatmaps directly in the terminal, drawing inspiration from contribution graphs:\n\n``` bash\n$ thermal --tool opencode --weeks 8\n\n  ╭─ OpenCode Activity ───────────────────────────────────── ~/.local/share/opencode/opencode.db ─╮\n  │  10.6B tokens / 8 weeks   ·   30 active days  |  1 day streak  |  11 best  |  10.6B all-time  │\n  │                                                                                               │\n  │       Aug Sep                                                                                 │\n  │       ■■■■■■■■                                                                                │\n  │   Mon ■■■■■■■■                                                                                │\n  │       ■■■■■■■■                                                                                │\n  │   Wed ■■■■■■■■                                                                                │\n  │       ■■■■■■■                                                                                 │\n  │   Fri ■■■■■■■                                                                                 │\n  │       ■■■■■■■                                                                                 │\n  │       Less ■■■■■ More                                                                         │\n  │  ──────────────────────────────────────────────────────────────────────────────────────────── │\n  │  $62.91 spent  ·  98% cache  ·  256 sessions                                                  │\n  │  · agents  build: 95  reviewer: 59  general: 58                                               │\n  ╰───────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n\nAs I wrote earlier in my essay on\n[why coding agents burn tokens in the dark](https://jadmadi.net/posts/why-your-coding-agents-burn-tokens-in-the-dark/),\nvisibility is the prerequisite for discipline. You cannot optimize what you\ncannot measure.\n\nThermal is distributed as an open-source Go binary:\n\n```\ngo install github.com/jadmadi/thermal/cmd/thermal@latest\n```\n\n## Skill Cabinet Go: Ordering the Drawers\n\nOnce you can see token consumption, the next bottleneck becomes context pollution.\n\nEvery agent tool now supports the concept of skills: specialized Markdown\ninstruction files with YAML frontmatter that tell the model how to perform\nspecific tasks, such as auditing database migrations or debugging memory\nleaks. But every tool also insists on its own directory convention.\nCursor uses `.cursor/`, Claude Code uses `.claude/`, Codex uses `.codex/`,\nand cross-agent tools look in `.agents/`.\n\nWhen you maintain dozens of projects and hundreds of skills, this setup\ndevolves into chaos. You either copy skill folders by hand across fifty\ndrawers, creating stale forks that drift over time, or you symlink\neverything into a giant global bucket. As I documented in\n[The Skill Bloat Dilemma](https://jadmadi.net/posts/the-skill-bloat-dilemma/), loading several\nhundred skills indiscriminately into an agent system prompt causes silent\nalphabetical truncation past fifty tools and consumes fifty thousand tokens\nbefore you have typed your first instruction.\n\nTo solve this, I built `skill-cabinet-go`, a high-performance Go companion\nto the open-source `subsy/skill-cabinet` standard.\n\nSkill Cabinet treats your machine as a house with distinct drawers. It scans every tool drawer, detects physical files versus symlinks, flags broken links, audits executable script permissions, and deduplicates identical skills.\n\nRunning a census across my workstation reveals the scale of the problem:\n\n``` bash\n$ skill-cabinet-go count\nskill-cabinet-go 0.3.0 (commit c6260ed, built 2026-09-02T17:33:20Z)\nin house 10574 · physical 667 · references 9599 · broken 308 · 90 copies · 5.5 MB\n```\n\nMore than ten thousand skill cards live across fifty-eight different drawers on my workstation. Without a tool to inspect them, three hundred broken symlinks would be quietly failing inside agent tool registries without warning.\n\nWith `skill-cabinet-go`, I can inspect individual drawers, verify their risk\nratings, and check modification dates at a glance:\n\n``` bash\n$ skill-cabinet-go ls --scope codex\ndrawer  name                       storage    risk      copies  modified\n------  -------------------------  ---------  --------  ------  ----------\n.codex  adapt                      physical   none      1       2026-09-21\n.codex  agents-sdk                 physical   none      3       2026-09-14\n.codex  animate                    physical   none      1       2026-09-21\n.codex  audit                      physical   none      1       2026-09-21\n.codex  bolder                     physical   none      1       2026-09-21\n.codex  brief                      physical   none      1       2026-09-21\n.codex  clarify                    physical   none      1       2026-09-21\n.codex  cloudflare                 physical   none      1       2026-09-14\n.codex  cloudflare-email-service   physical   none      3       2026-09-14\n.codex  cloudflare-one             reference  none      -       2026-08-15\n.codex  cloudflare-one-migrations  reference  none      -       2026-08-15\n.codex  colorize                   physical   none      1       2026-09-21\n.codex  craft                      physical   none      1       2026-09-21\n.codex  critique                   physical   none      1       2026-09-21\n.codex  delight                    physical   none      1       2026-09-21\n.codex  distill                    physical   none      1       2026-09-21\n.codex  durable-objects            physical   none      3       2026-09-14\n.codex  extract                    physical   none      1       2026-09-21\n```\n\nInstead of spraying skills everywhere, I keep a single canonical source of\ntruth and use `skill-cabinet-go link` and `dedupe` to synchronize\nreferences. The binary also exposes a native MCP server (`skill-cabinet-go mcp`),\nallowing agents to search and inspect skills dynamically rather than loading\nall six hundred physical cards into the static system prompt.\n\nThe code and specification live at `github.com/jadmadi/skill-cabinet-go`.\n\n## The Judgment Layer: Agent Skills That Guard the Work\n\nHaving meters and tidy drawers is still just mechanical hygiene. The real difference in day-to-day coding comes from the procedural judgment you hand to the model.\n\nIn `github.com/jadmadi/skills`, I maintain the core operational playbooks\nthat my agents load during work. As explored in\n[Demystifying Agent Skills](https://jadmadi.net/posts/demystifying-agent-skills/), an effective\nskill is not a polite prompt asking the model to write clean code. It is an\nopinionated execution harness that restricts choices and enforces empirical\nverification.\n\nTwo skills in particular anchor almost every session:\n\n1. \n**Pre-flight Check (`pre-flight-check`):** A pre-commit and pre-deploy checklist for backend and full-stack\nmodifications. It forces the agent to verify API response envelopes,\ncheck route ordering so static routes are not swallowed by dynamic\nwildcards, verify database column schemas before issuing writes, and\nrefuse to commit code without verifying local exit code zero.\n2. \n**Doubt-Driven Development & Context Engineering:** Skills that require the agent to cross-examine its own assumptions before\ntouching shared interfaces. When an agent encounters an unexpected error,\ninstead of guessing random workarounds or modifying configuration files\nat random, the skill directs it to check persistent project memory and\nisolate root causes.\n\nWhen you pair procedural skills with native MCP tools, the agent stops acting like an overeager junior intern writing speculative code. It behaves like a disciplined pair programmer who reads the manual, checks the database schema, and writes verified tests.\n\n## Where the Scaffolding Led: Mahak and Sila\n\nBuilding this local harness changed how I think about larger AI systems. Once you start measuring things locally with real numbers, you realize how much of the wider industry still relies on vibes and marketing claims.\n\nThat realization led directly to two larger projects.\n\n### Mahak: Measuring Arabic Fluency Empirically\n\nWhen evaluating models for non-English languages, especially Arabic, public benchmarks are notoriously misleading. Synthetic multiple-choice tests rarely reflect whether a model can draft a legally sound contract in contemporary Arabic or handle nuanced technical discourse without awkward literal translations.\n\nApplying the same empirical philosophy behind Thermal, I built\n[Mahak (مَحَكّ)](https://mahak.waqf.dev), an open community benchmark\nranking frontier and open-weights models on native Arabic fluency across\npractical domains.\n\nOn the live [Results Matrix](https://mahak.waqf.dev/en/matrix/) today, Mahak\nindexes 65 frontier and open-weights models across 25 rigorous tasks spanning\nlegal contracts, creative writing, customer support, business\ncommunication, and instruction following. Running the evaluation CLI on this\nvery machine:\n\n```\nmahak start --model claude-3-7-sonnet --domains all\n```\n\ncollects blind model outputs that enter community evaluation and Elo scoring. No marketing spin, no cherry-picked prompts. Just transparent, verifiable results.\n\n### Sila: Multi-Agent Continuity and Goal Governance\n\nThe second evolution addressed the biggest limitation of all: agent amnesia.\n\nWhen you switch between different coding sessions or collaborate across multiple specialized agents, knowledge evaporates. One agent solves an obscure SQLite concurrency issue on Tuesday; by Thursday, a different agent hits the exact same error and burns thirty minutes rediscovering the fix.\n\nTo solve this cross-harness continuity gap, I created Sila (صِلَة). Sila is a multi-agent governance and persistent memory substrate built on local SQLite stores. It continuously indexes session messages across tools like OpenCode, Devin, Codex, and Claude Code, distills reusable lessons, and coordinates roadmaps through an explicit goal system.\n\nBefore starting work on this very essay, I checked the local goal status:\n\n``` bash\n$ sila goals\n---------------------------------------------------------------\n🟢 RECENTLY IMPLEMENTED & VERIFIED (3):\n---------------------------------------------------------------\n  ✔ 🚢 ⚡ seo-audit-fixes                            [commit e2a5954] (11 tasks)\n  ✔ 🚢 ⚡ sila-onboarding                            [commit a846e1e] (4 tasks)\n  ✔ 🚢 ⚡ webmcp-projects                            [commit 99580a3] (5 tasks)\n\n🟡 GOALS READY TO CLAIM & EXECUTE (1):\n---------------------------------------------------------------\n  ▶ mcp-stack-post 🚢 🗺️ [Roadmap] ⚡ [Independent]\n    Title:  MCP stack post : how I run my own agent tools\n    Status: ready to claim; awaiting implementation commit\n    Claim:  sila goals claim mcp-stack-post --agent=<name>\n    Plan:   [░░░░░░░░] 0/9 tasks (0%)\n---------------------------------------------------------------\n```\n\nThe agent claims a goal, locks its boundaries, completes the planned steps, and verifies the done conditions before recording a verifiable handoff. Session context does not get lost in terminal scrollback; it enters a permanent, queryable local knowledge base.\n\nSila is currently in active private development as I refine its multi-tool ingestion pipelines and MCP tool surfaces, and I will share more about its architecture when it is ready for public preview.\n\n## The Local-First Philosophy\n\nIf there is a unifying thread across these tools, it is a stubborn commitment to local-first software.\n\nWe do not need to ship every keystroke and prompt to opaque cloud services just to benefit from intelligent coding assistants. The most reliable, responsive, and private developer experience happens right here on your own machine. When you give agents fast, compiled tools written in Go, back them with lightweight SQLite databases, and govern them with clear procedural skills, you reclaim control over your environment.\n\nYou stop wondering why your API bill doubled. You stop dreading context exhaustion. And you start treating coding agents for what they truly can be: sharp, dependable partners in the craft of building software.\n\n### The Stack at a Glance\n\nFor those who want to explore or run these tools locally:\n\n- \n**Thermal:** Local-first agent FinOps and token tracking.\n Repository:[github.com/jadmadi/thermal](https://github.com/jadmadi/thermal)\n Install:`go install github.com/jadmadi/thermal/cmd/thermal@latest`\n Project Overview:[/project/thermal/](https://jadmadi.net/project/thermal/)\n- \n**Skill Cabinet Go:** Census, audit, and deduplication for agent skills.\n Repository:[github.com/jadmadi/skill-cabinet-go](https://github.com/jadmadi/skill-cabinet-go)\n Upstream Standard:[subsy/skill-cabinet](https://github.com/subsy/skill-cabinet)\n- \n**Agent Skills:** Curated procedural skills and verification harnesses.\n Repository:[github.com/jadmadi/skills](https://github.com/jadmadi/skills)\n- \n**Mahak Benchmark:** Open Arabic fluency benchmark and evaluation CLI.\n Live Matrix:[mahak.waqf.dev/en/matrix/](https://mahak.waqf.dev/en/matrix/)\n- \n**Profile & Catalog:** Overview of open-source tooling and standards.\n GitHub:[github.com/jadmadi](https://github.com/jadmadi)\n Projects Catalog:[/projects/](https://jadmadi.net/projects/)\n\nRecommended\n\n## Continue reading\n\nSelected from shared topics, related tags, and the recent archive.", "url": "https://wpnews.pro/news/my-mcp-stack-how-i-run-my-own-agent-tools", "canonical_source": "https://jadmadi.net/posts/my-mcp-stack/", "published_at": "2026-11-09 10:20:22.232215+00:00", "updated_at": "2026-11-09 10:20:25.489574+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "developer-tools", "mlops"], "entities": ["Thermal", "Model Context Protocol", "Codex", "Devin", "OpenCode", "MiMoCode", "Claude", "Go"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/my-mcp-stack-how-i-run-my-own-agent-tools", "markdown": "https://wpnews.pro/news/my-mcp-stack-how-i-run-my-own-agent-tools.md", "text": "https://wpnews.pro/news/my-mcp-stack-how-i-run-my-own-agent-tools.txt", "jsonld": "https://wpnews.pro/news/my-mcp-stack-how-i-run-my-own-agent-tools.jsonld"}}