The friction between ideating on a phone and executing on a server has long been the Achilles' heel of mobile-first AI development. Developer sirmmo has addressed this workflow gap by building stairway, a lightweight MCP server that allows users to spawn Claude Code sessions directly from a chat interface. Announced on October 12, 2026, the tool eliminates the tedious cycle of SSH-ing into a server, creating directories, and manually pasting context, effectively turning a conversational idea into a running code experiment in seconds.

Architecture and Core Functionality

Stairway is remarkably lean, consisting of a single Python file with approximately 1,700 lines of code that relies only on the standard library and Python 3.8+. The server exposes critical MCP tools such as create_experiment, which initializes a Git repository and launches a detached claude --remote-control session inside a GNU screen. It also includes send_prompt to inject instructions into active sessions and attach_folder to integrate existing projects, the latter requiring explicit approval via a status page to ensure security. This architecture allows the resulting Claude Code session to appear immediately in claude.ai/code, enabling users to monitor progress from their mobile devices.

Solving OAuth and TUI Interaction Challenges

A significant technical hurdle was implementing OAuth 2.1 without a database. Stairway acts as its own authorization server, using HMAC-signed blobs for client IDs and tokens rather than storing them, which allows for atomic revocation by rotating a single server secret. Another complex challenge was reliably typing into the Claude Code TUI. Standard screen commands break on multi-line prompts, so the developer implemented bracketed paste sequences (ESC[200~ and ESC[201~) to ensure text is pasted intact. This method ensures that complex, multi-line instructions are queued correctly by the Claude session, even when it is busy.

Integration with Telegram and VS Code

Beyond the web interface, stairway supports integration with Telegram and a browser-based VS Code environment. The tool uses Claude Code's Stop hooks to capture the last_assistant_message and relay it to a bound Telegram group, allowing for collaborative review and permission approvals (/approve or /deny) directly in the chat. For code editing, it proxies code-server instances per experiment using a simple byte pipe, avoiding heavy dependencies while supporting WebSockets. The developer also noted a visual bug where Claude Code's 24-bit color output rendered as red bars in screen 4.x, which was resolved by forcing the dark-ansi theme.

Key Takeaways

  • Stairway enables mobile-initiated Claude Code sessions using a minimal, single-file MCP server.
  • The tool implements a stateless OAuth 2.1 server using HMAC-signed tokens to avoid database dependencies.
  • Bracketed paste sequences are used to reliably inject multi-line prompts into terminal-based AI agents.
  • Integration with Telegram allows for real-time permission management and output monitoring from a chat interface.

The Bottom Line

Stairway proves that the most effective AI infrastructure isn't always a massive platform, but rather a clever bridge that removes the latency between thought and execution. By handling the mundane plumbing of server access and session management, it allows developers to stay in the flow, regardless of their physical location.