Get the FREE Ultimate OpenClaw Setup Guide →

mcpterm

An MCP tool server that provides stateful, TUI-compatible terminal sessions.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio dwrtz-mcpterm mcpterm

How to use

mcpterm provides stateful, TUI-compatible terminal sessions as an MCP tool server. It exposes two primary tools through Claude Desktop: run, which executes a command inside a persistent terminal session (so working directory changes persist across commands), and runScreen, which runs a command or sequence of keystrokes and captures the screen output (useful for TUI apps like vim or interactive Python REPL). This setup enables Claude to drive traditional terminal-based workflows inside an interactive session, including editing Dockerfiles or running containers and installers within the session context. To use it, add the mcpterm entry to Claude Desktop's MCP configuration and restart Claude Desktop so the tools appear in the UI. Once loaded, you can start a session with run to execute commands, or use runScreen to interface with programs that require continuous output or keyboard input, such as text editors or REPLs.

How to install

Prerequisites:

  • A Unix-like environment with git and make installed
  • Go toolchain installed (required to build the mcpterm binary)

Install steps:

  1. Install Go if needed (example for macOS/Homebrew):
    • brew install go
  2. Clone the repository and build:
  3. Move the built binary to a directory in your PATH:
    • sudo mv bin/mcpterm /usr/local/bin/mcpterm
  4. (Optional) Confirm installation:
    • mcpterm --help
  5. Add to Claude Desktop configuration (as shown in the README) and restart Claude Desktop to expose the tools: { "mcpServers": { "mcpterm": { "command": "mcpterm", "args": [] } } }

Additional notes

Tips and notes:

  • mcpterm is a PoC tool built around mcp-go, intended to provide stateful terminal sessions for Claude Desktop users.
  • The runtime is a binary built from source; ensure the binary is accessible in your PATH or specify the full path in your MCP config if needed.
  • If you plan to automate or script heavy interactions, prefer runScreen for sequences of keystrokes and screen captures (e.g., interacting with vim or a Python REPL).
  • If you encounter permission or path issues, ensure the binary is executable (chmod +x bin/mcpterm) and that PATH includes the directory containing mcpterm.
  • This server relies on Claude's MCP integration; compatibility and behavior may depend on Claude Desktop versions and how they map the MCP tools to UI actions.
  • Since this is a proof-of-concept, expect occasional quirks with interactive sessions and adjust the keystroke mappings as needed (see the provided control sequence mappings in the README for guidance).

Related MCP Servers

Sponsor this space

Reach thousands of developers