drio
Open app

pty-mcp

Source

An MCP tool server that provides a stateful terminal.

Catalog onlyCatalog onlySTDIO

Overview

pty-mcp is an MCP tool server that provides a stateful terminal, allowing users to interact with a terminal environment that maintains its state across sessions.

To use pty-mcp, install it using pipx for an isolated environment, and then run the server using the command pty-mcp in your terminal.

  • Provides a stateful terminal experience - Easy installation with pipx - Maintains session state across terminal interactions
  1. Developing applications that require persistent terminal sessions.
  2. Running scripts that need to maintain state between executions.
  3. Enhancing productivity by providing a reliable terminal environment.

Add to your AI client

Use these steps to connect pty-mcp in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "pty-mcp-qododavid": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-pty-mcp-qododavid"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "pty-mcp-qododavid": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-pty-mcp-qododavid"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "pty-mcp-qododavid": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-pty-mcp-qododavid"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "pty-mcp-qododavid": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-pty-mcp-qododavid"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "pty-mcp-qododavid": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-pty-mcp-qododavid"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "pty-mcp-qododavid": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-pty-mcp-qododavid"
      ]
    }
  }
}

FAQ

Is pty-mcp easy to install?

Yes! It is recommended to install using pipx for an isolated environment.

Can I use pty-mcp for multiple projects?

Yes! Since it maintains state, you can use it across different projects without losing your terminal context.

What is the advantage of using a stateful terminal?

A stateful terminal allows you to keep your session data, making it easier to manage long-running processes and scripts.