MCPSERV.CLUB
dwrtz

Mcpterm

MCP Server

Stateful terminal sessions for MCP tools

Stale(50)
8stars
1views
Updated Aug 16, 2025

About

Mcpterm is an MCP server that offers persistent, TUI-compatible terminal sessions. It lets AI agents run commands in a shared shell context and interact with text‑based interfaces like Vim or Python REPLs.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Mcpterm in action

Overview

mcpterm is a lightweight Model Context Protocol (MCP) server that delivers fully stateful, terminal‑user‑interface (TUI) sessions to AI assistants. By exposing two core tools— and —it lets an assistant like Claude launch commands, maintain working directories, and interact with full-screen applications such as Vim or a Python REPL. This capability bridges the gap between an AI’s high‑level instructions and low‑level shell interactions, enabling developers to build sophisticated, end‑to‑end workflows that combine natural language reasoning with hands‑on terminal manipulation.

The server solves a common pain point for developers who wish to automate or assist with command‑line tasks: most MCP tools are stateless, meaning each invocation starts a fresh shell. keeps the session alive across calls, preserving environment variables, current working directories, and any open processes. This statefulness is crucial for realistic development scenarios—think of a Docker build that requires multiple and steps, or an interactive debugging session where the assistant must preserve context between queries.

Key features of include:

  • Persistent terminal sessions: Commands run in the same environment, allowing sequential operations without re‑initializing the shell each time.
  • Dual toolset: executes arbitrary commands, while captures the full screen output of TUI programs, making it possible to control editors or interactive scripts.
  • Customizable key bindings: The server ships a comprehensive mapping of control sequences (e.g., for Ctrl+C, for Ctrl+X) that the assistant can inject into TUI sessions, ensuring smooth interaction with programs that rely on keyboard shortcuts.
  • Seamless integration: By registering in the Claude Desktop configuration, developers can instantly expose its tools to the assistant without additional middleware.

In real‑world use cases, shines when an AI needs to write code, test it, and iterate—all within a single conversational thread. For example, an assistant can draft a Dockerfile in Vim, build the image, launch a container, and then open a Python REPL inside that container to execute tests—all while maintaining the same terminal context. This eliminates the friction of manually switching between windows or re‑entering commands, leading to a more fluid and productive developer experience.

Overall, stands out as a proof‑of‑concept that demonstrates how stateful terminal interactions can be harnessed within the MCP ecosystem. Its straightforward tool set, combined with robust key‑binding support and easy integration into existing AI workflows, makes it an invaluable asset for developers looking to embed deep shell capabilities into conversational agents.