Developer builds a Claude Code statusline with VPS monitoring in a single session

A developer who runs three VPS and works 10–15 hours at a stretch in Claude Code wrote a custom statusline, because no existing one showed context usage and server load at the same time. The tool displays the percentage of the context window filled, signals when to run /compact, and shows CPU/RAM for all servers on a single line. It was built in one session through MCP SSH.

AI-processed from Habr AI; edited by Hamidun News
Developer builds a Claude Code statusline with VPS monitoring in a single session
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1Percentage of the Claude Code context window that is filled
Key metric #2A visual indicator of when to run `/compact`
Key metric #3CPU and RAM on each of the three VPS in real time

A developer who works with three VPS and runs 10–15 hour sessions in Claude Code wrote a custom statusline, a tool that monitors context and server load in real time, inside claude.ai in a single working session.

Why build a custom tool

Long Claude Code sessions create a problem you rarely meet in ordinary programming. The standard interface does not answer the questions that come up every few hours: how much of the context window is still free, whether it is time to run `/compact` right now, and which server is under load.

Timing `/compact` matters. Run it too early and you lose part of the context for no reason; run it too late and you start getting degraded answers. Without an indicator, you rely on intuition or regular manual checks.

With three VPS connected through MCP SSH, the problem gets worse. Every server check means a manual SSH session, a look at `htop`, and a return to the working context. Multiply that by three servers and dozens of times a day, and you get a constant stream of switches that breaks concentration by itself.

The author went through the existing statusline solutions for Claude Code. None combined both kinds of data: the state of the AI assistant's context and the load on the infrastructure.

What the new statusline shows

The custom tool puts everything needed on one status line, with no window switching and no manual SSH checks:

  • Percentage of the Claude Code context window that is filled
  • A visual indicator of when to run `/compact`
  • CPU and RAM on each of the three VPS in real time
  • Network activity of the servers
  • Status of active MCP connections

Visually, it is a familiar status line in the terminal next to the cursor. It is compact and free of the informational noise that would distract from the main task.

Built in one session in claude.ai

How the tool was built is telling. The author worked through claude.ai with MCP SSH connected, so Claude had direct access to the servers through the standard browser interface. All development, from the first idea to working code, fit into one continuous session.

"Three VPS, MCP SSH, 10–15 hour sessions.

Every time it's the same thing: how much context have I used? Time for /compact? Which server is under load? None of the existing statuslines showed this. I built my own, in one session in claude.ai."

The approach is telling in itself: a tool for working with AI was built with the same AI. Claude Code lets a developer go from a noticed annoyance to a working solution without changing environment or switching context.

It is a typical pattern: a developer notices an annoyance while using a tool and fixes it with that same tool. The barrier to entry is low enough that a pragmatic fix appears faster than a wait for an update from the Anthropic team.

What this means

The custom statusline is a small but telling example of how professional workflows with AI assistants grow their own tooling. Developers do not wait for a needed feature to appear in the official interface; they build it themselves, often in a single session.

MCP, as a protocol for connecting external data sources, makes such solutions possible without complex infrastructure. A few hours of work, and Claude Code sees the state of the servers the way it sees the file system. That changes what counts as a "fast" tool for a developer in the first place.

Story

Key Questions Answered

Why build a custom tool?

Long Claude Code sessions create a problem you rarely meet in ordinary programming. The standard interface does not answer the questions that come up every few hours: how much of the context window is still free, whether it is time to run `/compact` right now, and which server is under load. Timing `/compact` matters. Run it too early and you lose part of the context for no reason; run it too late and you start getting degraded answers. Without an indicator, you rely on intuition or regular manual checks. With three VPS connected through MCP SSH, the problem gets worse. Eve

What the new statusline shows?

The custom tool puts everything needed on one status line, with no window switching and no manual SSH checks: Percentage of the Claude Code context window that is filled A visual indicator of when to run `/compact` CPU and RAM on each of the three VPS in real time Network activity of the servers Status of active MCP connections Visually, it is a familiar status line in the terminal next to the cursor. It is compact and free of the informational noise that would distract from the main task.

What are the key details on Built in one session in claude.ai?

How the tool was built is telling. The author worked through claude.ai with MCP SSH connected, so Claude had direct access to the servers through the standard browser interface. All development, from the first idea to working code, fit into one continuous session. "Three VPS, MCP SSH, 10–15 hour sessions. Every time it's the same thing: how much context have I used? Time for /compact? Which server is under load? None of the existing statuslines showed this. I built my own, in one session in claude.ai." The approach is telling in itself: a tool for working with AI was built

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…