# terminal-use

> terminal-use is an open-source MCP server for developer tools. Lets AI agents drive a real terminal with typing, key presses, clicks and screenshots. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux, Windows
- **Repository:** https://github.com/computer-agent-labs/terminal-use
- **MCP Registry name:** io.github.computer-agent-labs/terminal-use
- **Categories:** developer tools
- **Listing updated:** 2026-11-16

## About

Most agent shell tools run a command and return its output, which fails for anything interactive. This server instead runs sessions on a real pseudo-terminal with a terminal emulator, so programs like vim, htop, REPLs, installers and SSH prompts behave as they do for a person. The agent can read the screen as text or render it as a PNG.

Sessions can be an interactive shell or a single command, in which case the exit status is reported and the final screen stays readable. That makes it suitable for testing a CLI or TUI. Waiting is built in, so the agent can block until a command finishes, a regex appears or output goes quiet. You can also attach your own terminal to a session and type alongside the agent, similar to a shared tmux session.

It needs Node.js 22.12 or newer and runs on macOS, Linux or Windows. A Dockerfile is provided for boxing the agent in, and an optional Agent Skill gives recipes for vim, pagers, REPLs and ssh prompts.

## Features

- **Real PTY and emulator:** Interprets colours, cursor movement and the alternate screen.
- **Text and screenshots:** Read the screen as plain text or as a PNG.
- **Smart waiting:** Wait for command exit, matching text or quiet output.
- **Watch along:** Attach your own terminal to a session and type with the agent.
- **Docker isolation:** Run in a container so the agent sees only mounted files.
- **Bundled skill:** An optional Agent Skill with recipes for common interactive programs.

## Good for

- Let an agent edit a file in vim
- Test a CLI or TUI end to end
- Drive an installer that asks questions
- Walk through an interactive git rebase

## Install

### Claude Code (Terminal)

```sh
claude mcp add terminal-use -- npx -y terminal-use
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "terminal-use": {
      "command": "npx",
      "args": [
        "-y",
        "terminal-use"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "terminal-use": {
      "command": "npx",
      "args": [
        "-y",
        "terminal-use"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "terminal-use": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "terminal-use"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "terminal-use": {
      "command": "npx",
      "args": [
        "-y",
        "terminal-use"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "terminal-use": {
      "command": "npx",
      "args": [
        "-y",
        "terminal-use"
      ]
    }
  }
}
```

## Tools

- `terminal_create`: Starts a session as an interactive shell or running one program.
- `terminal_list`: Lists sessions.
- `terminal_destroy`: Ends a session.
- `terminal_type`: Types text, with optional paste.
- `terminal_press`: Presses a key or combination.
- `terminal_wait`: Waits for a command to finish, a regex or quiet output.
- `terminal_read`: Reads the screen or scrollback as text.
- `terminal_screenshot`: Renders the screen as a PNG.
- `terminal_click`: Left-clicks a cell with a preview step.
- `terminal_scroll`: Turns the mouse wheel over a cell.
- `terminal_batch`: Sends several inputs in one call.
- `terminal_resize`: Changes the terminal size.
- `terminal_reset`: Clears the screen or restarts the shell.

## FAQ

### What are the requirements?

Node.js 22.12 or newer, on macOS, Linux or Windows.

### How do I add it to Claude Code?

Run claude mcp add terminal-use --scope user -- npx -y terminal-use.

### Why does it say command not found?

The server may have inherited a bare environment; enable the login shell with the --login flag or login: true.

### Can I contain what the agent can reach?

Yes, the Docker setup limits it to what you mount.

### Is terminal-use free?

Yes. terminal-use is open source, so you can use and self-host it for free.

### How do I add terminal-use to Claude Code?

Run this command in your terminal: claude mcp add terminal-use -- npx -y terminal-use

### What are the best alternatives to terminal-use?

The closest alternatives to terminal-use are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/terminal-use
