Ask your Mac what’s running, from the terminal or from your agent
statspace port 3000 answers in one line: next dev from acme-web, started by Claude Code 41 minutes ago. Run it with --mcp and your coding agent gets the same answers as tools, so it checks before starting a fourth dev server.
Your agent finished. Its servers didn’t.
Stat Space watches Claude Code, Codex and Cursor sessions: runtime, CPU, child processes and the ports they open. When a session ends, whatever it left running shows up, ready to clean up in one tap.
Your agent can ask too. statspace --mcp gives Claude Code, Codex and Cursor tools for ports, load, sessions and cleanup.
$ claude mcp add --scope user statspace -- \
/Applications/StatSpace.app/Contents/Helpers/statspace --mcp Know before you hit the limit.
How much of your Claude Code and Codex limits is left, per 5-hour and weekly window, when each resets, and whether you’re on pace. One line of it sits on the pinned Agents card too.
Off until you turn it on in Settings › Agents. Codex is read from its local session logs. Claude Code uses Anthropic’s usage endpoint with Claude Code’s own sign-in; the token stays in memory and is never stored or refreshed by Stat Space. It only refreshes while the Agents tab or card is on screen.
Ports and processes
statspace ports,statspace port 3000andstatspace kill 3000. Each port comes with its project folder, framework, launcher and uptime.Load, in one line
statspace loadfor CPU, memory, network, disk and GPU;statspace apps --sort memfor the top apps with helpers grouped;sensorsandbatteryfor the rest.Agents and cleanup
statspace agentslists coding-agent sessions and their leftovers;statspace cleanup <session>andstatspace orphans --killstop them, after asking.Keep awake from a script
statspace awake 2h --displaybefore a long build,statspace awake offafter, andstatspace blockersfor whatever else is holding the Mac awake.JSON everywhere
Add
--jsonto any command for machine-readable output. Exit code 2 means Stat Space isn’t running, so scripts can tell that apart from an error.An MCP server, built in
statspace --mcpruns a stdio MCP server with tools for ports, load, agents, orphans, cleanup and keep-awake.statspace mcp-configprints the setup for each client.
Why a CLI for a menu bar app
The popover is for glancing. The terminal is where you already are when EADDRINUSE hits. statspace port 3000 gives you the project and the launcher instead of a PID, and statspace kill 3000 stops it after showing what it’s about to stop (-y skips the question, --force sends SIGKILL).
The MCP tools
| Tool | What it answers |
|---|---|
list_ports | Every listening port with process, framework, project, launcher, uptime, URL and exposure |
whats_on_port | Who is on one port |
kill_port | Stops the process on a port, only after confirmation |
top_apps | Apps by CPU, memory or network, helpers grouped |
system_load | CPU per core, memory and pressure, swap, network, disk, GPU |
agent_sessions | Running and ended agent sessions and what they left behind |
orphans | Dev processes re-parented to launchd |
cleanup_agent_leftovers | Stops an ended session’s leftovers, only after confirmation |
keep_awake | Holds the Mac awake for a while, until a time, or indefinitely |
sleep_blockers | Apps currently preventing sleep |
explain_slowness | “Why is my Mac slow?” in plain English (Pro) |
what_is_process | What a cryptic process name is |
A typical exchange: you ask your agent to start the app, it calls whats_on_port, sees its own next dev from the last session still on :3000, and asks whether to stop it instead of picking :3001.
Local only
The CLI and the MCP server talk to the app over a unix socket in Stat Space’s Application Support folder. Nothing listens on the network, and no answer leaves your Mac except what you or your agent do with it.
Questions
How do I add it to Claude Code?
One line: claude mcp add --scope user statspace -- /Applications/StatSpace.app/Contents/Helpers/statspace --mcp. Settings › CLI & MCP in the app shows the snippets for Cursor, Codex and others too.
Can my agent kill processes without asking me?
No. kill_port and cleanup_agent_leftovers only describe what they would stop unless the call carries an explicit confirmation, which the tool description tells the agent to send only after you agree. System processes are always refused.
Does the CLI work without the app running?
No. The CLI is a small client that talks to Stat Space over a local unix socket, so the answers come from data the app already has. It exits with code 2 and says so when the app isn’t running.
How do I install the statspace command?
Settings › CLI & MCP › Install statspace CLI symlinks the binary bundled inside the app into /usr/local/bin. macOS may ask for your password.
Know what your Mac is doing, without adding to it.
Free, no account. Pro is $9.99 once for the first 100 buyers.