termcp
Provides tools for creating and managing stateful tmux sessions, enabling persistent working directory and environment across shell commands, and for destroying sessions when no longer needed.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@termcp run npm test and show me the output"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
termcp
A local terminal MCP server for AI agents. stdio-based, zero-config, just run commands.
termcp gives any MCP-compatible AI agent (Claude, etc.) a full terminal on your machine - shell commands, file operations, background processes, search, and stateful sessions - all through the standard Model Context Protocol over stdio. No server to deploy, no tokens to manage, no cloud.
Quick start
git clone https://github.com/dbalchunas2-pixel/termcp.git
cd termcp
npm install
npm run buildAdd to your MCP client config (e.g. Claude Desktop):
{
"mcpServers": {
"termcp": {
"command": "node",
"args": ["/path/to/termcp/dist/index.js"]
}
}
}That's it. Your AI agent now has a terminal.
Related MCP server: mcp-interactive-terminal
Tools
Tool | Description |
| Execute a shell command. Supports stdin and tmux sessions. |
| Execute multiple commands in sequence with variable capture ($PREV, $STEP{n}). |
| Read a file. |
| Write a file. Creates parent directories. |
| List files and directories. |
| Search file contents (ripgrep or grep). |
| Get OS, installed tools, and disk info. |
| Get the audit log with filtering. |
| Get version, uptime, workspace, active processes. |
| Start a long-running background process. |
| Poll output from a background process. |
| Kill a background process. |
| Create a stateful tmux session (persists cwd/env). |
| Kill a tmux session. |
| Read output from a byte offset (for truncated output). |
Configuration
All config is via environment variables. All optional.
Variable | Default | Description |
|
| Root directory for file operations. |
|
| Maximum command timeout in ms. |
|
| Default command timeout in ms. |
|
| Output chunk size before truncation. |
Denylist
termcp ships with a configurable denylist for accident protection (not a security boundary). Create a denylist.json file:
{
"patterns": ["rm -rf /", "mkfs", "dd if=", "shutdown", "reboot"]
}Place it in the project root, ~/.termcp/denylist.json, or set TERMCP_WORKSPACE to its directory. Patterns use simple substring matching.
Audit log
termcp maintains a durable JSONL audit log at ~/.termcp/audit.jsonl. Every command is logged with timestamp, tool, input, exit code, and duration. Secrets are redacted at write time (API keys, Bearer tokens, password assignments).
Requirements
Node.js 18+
tmux(optional, forcreate_session/destroy_sessiontools)ripgrep(optional, for fastersearch_files)
License
MIT
Available Tools
15 toolscreate_sessionA
Create a stateful tmux session with persistent cwd and environment.
Inputs: cwd.
destroy_sessionC
Kill a tmux session.
Inputs: session_id (required).
get_audit_logB
Get the audit log of commands executed. Supports filtering.
Inputs: tool, count, since.
get_environmentA
Get info about the local environment: OS, installed tools, disk usage.
Inputs: no named parameters.
get_server_infoA
Get server info: version, uptime, workspace, active processes.
Inputs: no named parameters.
kill_processC
Kill a background process by process_id.
Inputs: process_id (required), signal.
list_filesB
List files and directories in a path.
Inputs: path.
poll_outputC
Poll output from a background process.
Inputs: process_id (required), since.
read_fileC
Read the contents of a text file.
Inputs: path (required).
read_outputA
Read output from a specific byte offset. Used for truncated output.
Inputs: offset, process_id.
run_commandB
Execute a shell command locally. Returns stdout, stderr, and exit code.
Inputs: command (required), cwd, stdin, session_id, +1 more.
run_sequenceB
Execute multiple shell commands in sequence. Supports variable capture ($PREV, $STEP{n}).
Inputs: commands (required), cwd, timeout_ms, stop_on_error.
search_filesB
Search for a pattern in files. Uses ripgrep if available, falls back to grep.
Inputs: pattern (required), glob, path.
start_processA
Start a long-running background process. Returns process_id and pid.
Inputs: command (required), cwd, env.
write_fileA
Write content to a file. Creates parent directories if needed.
Inputs: path (required), content (required), append.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Most tools have clearly distinct purposes (file ops vs command execution vs process lifecycle vs sessions). Some overlap exists between run_command and run_sequence, and between poll_output and read_output, but descriptions provide enough differentiation to avoid major confusion.
All tool names follow a consistent verb_noun snake_case pattern (run_command, read_file, start_process, etc.). No mixing of conventions or vague verbs.
15 tools is within the reasonable range for a terminal/shell server covering command execution, file operations, process management, and sessions. Slightly at the upper bound, but each tool appears to earn its place.
Core workflows are covered: sync/async command execution, file read/write/list/search, process lifecycle, session management, and environment info. Minor gaps exist such as no file delete/move/copy operations and no explicit way to send input to a running process or session.
Maintenance
Related MCP Connectors
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Termalin's hosted MCP server. Claude, ChatGPT or any MCP client runs commands, moves files over SFTP, queries databases and reads server metrics and monitoring alerts on your servers, keylessly through Termalin Connectors: no SSH key is handed over and no inbound port is opened. Per-host command policy and an audit log. Needs a termal.in Pro or Team account (new accounts start with a 14-day Pro trial).
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceA secure and pluggable MCP server to run terminal commands on your local machine or cloud server — remotely, safely, and with LLMs or agentic clients.-
- AlicenseAqualityCmaintenanceMCP server that gives AI agents real interactive terminal sessions for running REPLs, SSH, database clients, and any interactive CLI with clean text output and smart completion detection.778 npm20MIT
- FlicenseNot gradedqualityBmaintenanceThe terminal AI agents can drive: a cross-platform desktop terminal (macOS/Linux/Windows, MIT) that runs a local MCP server. Spawn tabs/panes, run commands with structured output, read screens and full scrollback, take scrolling screenshots, record sessions with secret redaction, switch identity profiles. Auto-registers with Claude Code / Codex / Gemini CLI on install.17-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to interact with real terminal sessions across local and remote hosts, driving multi-turn interactive programs like TUIs, REPLs, and SSH prompts through MCP.67MIT