A Critical User Journey (CUJ) case study on building one personal hub of MCP servers, with one shared core, so every agent I run gets the same tools, the same rules, and no way to act without my yes.
π The Problem Space
Context
I run several AI agents every day: Muse, Claude, Grok Bot and a few others. Each one is good in conversation and useless the moment the question touches my actual life. "Is the media server up?" "Is the earbud case charged?" "Can you start parking for two hours?" They can't see my Macs, my devices or my house, so they ask me, and I go and look.
The Core Friction
I had already built a few one-off MCP servers. Every new one re-solved the same hard parts, slightly differently:
- Who is calling? Each server had its own idea of auth, so there was no single answer to "which agent did that, and what is it allowed to touch?"
- Writes are scary. Reading a disk percentage is harmless. Restarting a service, unlocking a door or paying for parking isn't. Every server would need its own approval logic, and one forgotten check would be one too many.
- No shared view. Logs, analytics and the catalogue of what each server can do lived in different places in different shapes.
The real job: one home for all of these tools, where the hard parts are solved once and every new module inherits them.
π¦ Critical User Journeys (CUJs)
CUJ 1: What's Running Where
- Statement: I want my agent to tell me what's running, stopped or full on my home Macs while avoiding opening a terminal on each machine to find out so that I can get a home service working again from wherever I am.
- User Scenario: Movie night, and the media server won't stream. Instead of walking to the closet with a laptop, I ask Muse. It checks the fleet and answers: the media server's container has stopped, and the always-on Mac's data disk is 96% full. I know what to fix before I stand up.
CUJ 2: Is Everything I'm Taking Charged?
- Statement: I want my agent to check the battery of the devices I'm about to take with me while avoiding finding a dead earbud case at the gate so that I can charge what needs it before I leave.
- User Scenario: The night before a flight I ask, "is everything charged?" The agent reports the phone at 82% from its last check-in, the earbuds fine, and the case at 12%, flagged for attention. It also says plainly which device it couldn't check, instead of guessing.
CUJ 3: Agents Can Ask, Only I Can Say Yes
- Statement: I want my agents to be able to propose real actions while avoiding any agent being able to approve its own request so that I can let them help with the house and errands without handing them the keys.
- User Scenario: An agent wants to do something that changes the world, like turning on a scene at home. It doesn't get to just do it. It gets back "approval required", with a one-line summary, and relays that to me as a draft. I approve on my own machine, and only then can the agent run exactly that action, once.
πΊοΈ The Ideal Flows
Flow 1: What's Running Where
- Trigger: Something at home isn't working, or I'm just curious.
- Action: I ask whichever agent I'm talking to. It calls
service_statusorfleet_statuson the Mac Fleet module. - Automated Response: The module checks each configured service its own way (a launchd job, a Docker container, a process or an HTTP health URL) and each Mac's uptime, load, memory, disk and power. A Mac it can't reach is reported as unreachable, never silently checked from somewhere else. Known gaps, like a Mac without remote login, are surfaced, not hidden.
- Resolution: The agent tells me what's down and why, and can pull the last lines of that service's log (with obvious credentials redacted) if I want to dig in.
Flow 2: Pre-Flight Battery Check
- Trigger: I'm packing, or about to leave.
- Action: The agent calls
device_status. - Automated Response: For each device I've configured, the module takes the freshest battery reading from its sources: Bluetooth on the Mac the device pairs with, or a small snapshot file my phone writes on a schedule with a Shortcuts automation. Anything low, stale, missing, or waiting on a sign-in is listed under
attention. - Resolution: I charge the case, not the thing that was already full.
Flow 3: Propose, Approve, Execute
- Trigger: An agent calls a tool marked
write. - Action: Nothing runs. The shared core stores a pending approval request (which tool, which arguments, which agent, a human-readable summary, and the amount when money is involved) and returns its id.
- Automated Response: I approve or deny it from the command line on the machine that runs the module. There's deliberately no MCP tool that approves, so an agent's token can propose and check, but never say yes.
- Resolution: The agent calls the same tool again with the approval id. Core runs it only if the request is approved, unexpired (15 minutes), unused, has exactly the same arguments, and comes from the same agent. Every step lands in an audit log.
π οΈ The Solution: One Core, Many Modules
The hub is a TypeScript monorepo. A module is a small package that declares its tools and their access (read or write) and holds only its domain logic. Everything cross-cutting comes from one shared core, so a new module gets tokens, the approval gate, logging, analytics and catalogue metadata for free, and can't opt out of the gate.
graph TD
Muse[Muse] --> Core
Claude[Claude] --> Core
Grok[Grok Bot] --> Core
Core[Shared core: per-agent tokens, approval gate, audit, redacted logs, analytics] --> Fleet[Mac Fleet v0.1, read-only]
Core --> Devices[Devices v0.1, read-only]
Core -.-> Parking[Parking, in review]
Core -.-> Home[Home, in review]
Me[Me, on my own machine] -->|approve or deny| Core
Modules that need my home network or macOS run as background services on an always-on Mac at home and are reachable only over my private network, never from the internet. Modules built on cloud APIs will run on Cloud Run in their own isolated slice of a GCP project.
π» Under the Hood (Code & Architecture)
The repository is private, so these are paths rather than links.
1. Per-Agent Tokens (packages/core/src/tokens.ts)
- Approach: Every agent gets its own token, shown once. Only a SHA-256 hash is stored, along with the agent name and the modules the token may use.
- Key Code Logic:
- A token for one module doesn't open another: Muse's Mac Fleet token gets a 403 on anything else.
- The same check runs for local (stdio) and remote (Streamable HTTP) connections, so every call is attributed to an agent.
- Tokens are created, listed and revoked with a small
hmcpcommand-line tool.
2. The Approval Gate (packages/core/src/approvals.ts)
- Approach: Core wraps every tool declared
write. A module can't register a write tool without it. - Key Code Logic:
- The first call only proposes and returns
approval_requiredwith a summary and expiry. - Execution requires an approved, unexpired, single-use request whose arguments hash matches exactly and whose agent is the one that proposed it.
- Modules can make the gate stricter, never looser. In the Parking and Home modules now in review, parking must show the amount before any approval, and unlocking a door can never be pre-approved.
- Tests cover every rejection path.
- The first call only proposes and returns
3. Logs and Analytics That Can't Leak (packages/core/src/log.ts, analytics.ts)
- Approach: Structured JSON logs go to stderr, and any value whose key looks like a token, secret, password, cookie or authorization header is redacted.
- Key Code Logic:
- Each call emits one
herrington.usage.v1event: the tool, its duration, an error code if any, and whether it returned nothing. - The agent appears only as a salted hash. Arguments, results and log text are never recorded.
- Events are kept for 90 days, and
ANALYTICS=offturns it all off.
- Each call emits one
4. Mac Fleet v0.1 (servers/fleet/)
- Approach: Read-only status for the Macs at home, through
fleet_status,service_statusandservice_logs. - Key Code Logic:
- Tool inputs only select names from my config; they never reach a shell.
- Every command is fixed text owned by the code, with arguments passed separately, and the config schema rejects shell metacharacters.
- Parsers are tested against recorded output from macOS tools, not live machines.
5. Devices v0.1 (servers/devices/)
- Approach: Read-only battery and last-seen for my own devices, through
device_listanddevice_status. - Key Code Logic:
- Only devices in my config are ever reported. Other nearby Bluetooth devices, hardware addresses and serial numbers never appear in output.
- Location is out of scope for v0.1, and any location field in a snapshot is dropped.
- Sources that need my sign-in report
needs_signininstead of guessing.
π Status
The shared core, Mac Fleet v0.1 and Devices v0.1 are merged and tested, all read-only. They aren't installed on the home Mac yet; that's a deploy, and it waits for my go. Parking and Home, the first modules with real write tools behind the approval gate, are in review.
What's next: install Fleet and Devices, then the Home and Parking modules, then more read-only modules before anything that touches money.
π Repository & Source Code
- The Herrington MCP Hub is a personal project in a private repository.
- Herrington MCP Hub project page