Back to notes

April 10, 2026

Command Lines and Model Context Protocol Servers

A finance app example of when scripts are enough, and when an agent needs a structured tool surface.

Command-line interfaces (CLIs) and Model Context Protocol (MCP) servers get compared as if one is supposed to replace the other. That framing has never made much sense to me.

A good CLI is still one of the best interfaces we have for deliberate work. It is direct. You can see what happened. You can compose it with other tools.

In my finance app, the command line still does the routine jobs: rebuild generated datasets, sync property listings, import a listing URL, run tests, and start the app. Those are explicit tasks with clear inputs and outputs.

The MCP server exists for a different reason.

The app already has local finance data, a SQLite database, generated browser datasets, calculator engines, property-search files, and domain rules. External outgoings exclude transfers between my own accounts. Mortgage rows can be filtered. Borrowing, deposit, refinance, and buy/keep/sell calculators can prefill inputs from the ledger and asset data.

I wanted Codex to use that app logic from outside the app.

The server exposes that logic as tools: inspect the schema, list example questions, run read-only SQL, inspect evidence rows, return chart-ready series, and call the calculators with ledger defaults.

That matters for property search because the task is not only “find listings”. The task is closer to: find properties that fit my criteria, check them against my financial constraints, and compile the result in a shape the app can show.

Without MCP, the alternatives were worse.

Codex could read the SQLite database directly, but then each session has to rediscover the schema, finance definitions, and query rules. I could build a CLI command for every question, but at that point I am designing an agent tool contract by hand. I could expose a local HTTP API, but that adds routes, server lifecycle, auth decisions, and docs to a personal app. I could put the language model inside the app, but then I am building provider wiring, tool loops, chat UI, logs, retries, and secret handling.

MCP was the smallest useful boundary. The app keeps the deterministic logic. The agent gets typed tool calls and structured output. I still review the results in the app.

That is also why the CLI still matters. Scripts start and refresh the system. MCP lets the agent operate inside it without making a human command surface carry every workflow.

For me, the split is practical. If I need a person to run a direct action, I reach for a CLI. If I need an agent to inspect state, choose a tool, call it safely, and hand back app-shaped output, MCP earns its place.