Command Palette

Search for a command to run...

Весь каталог
MCP-сервер № 64398

Pexpect

Provides remote process control and debugging capabilities through Python's pexpect library, enabling spawning, interaction with, and control of command-line pr

Бесплатно
GitHubEmbed

Установить Pexpect в Claude Desktop, Claude Code, Cursor

unyly install pexpect

Ставит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.

$ unyly install pexpect

Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh

Пошаговые гайды: как установить Pexpect

Описание

Provides remote process control and debugging capabilities through Python's pexpect library, enabling spawning, interaction with, and control of command-line programs, debuggers, and interactive shells with session persistence and timeout handling.

README

An MCP (Model Context Protocol) server that provides remote pexpect session control for debugging and process interaction.

Overview

This MCP server enables AI assistants to execute Python code with pexpect functionality, allowing for interactive debugging sessions with tools like LLDB, GDB, and other command-line utilities that require programmatic interaction.

In some sense this is less of a pexpect MCP as one that is just maintaining a stateful Python session.

Installation

uv tool install git+https://github.com/mitsuhiko/pexpect-mcp

Usage

As an MCP Server

Add to your Claude Code configuration:

{
  "mcpServers": {
    "pexpect": {
      "command": "pexpect-mcp"
    }
  }
}

Tool Usage

The server provides a single tool: pexpect_tool

Parameters:

  • code (string): Python code to execute with pexpect support
  • timeout (optional int): Timeout in seconds (default: 30)

Example Usage:

# Start a debugging session
child = pexpect.spawn('lldb ./my-program')
child.expect('(lldb)')

# Run the program
child.sendline('run')
child.expect('(lldb)')
print(child.before.decode())

# Get backtrace
child.sendline('bt')
child.expect('(lldb)')
print(child.before.decode())

Demo

The repository includes a demo with a buggy C program (demo-buggy.c) that can be debugged using LLDB through the pexpect interface. This demonstrates the server's capability for interactive debugging sessions.

The program `./demo-buggy` crashes when executed. Use LLDB to:

- Start the program under the debugger
- Identify where and why it crashes
- Examine variables, memory, and call stack
- Report the root cause of the crash

Requirements

  • Python ≥ 3.12.1
  • pexpect ≥ 4.9.0
  • mcp ≥ 1.13.0

License

See LICENSE file for details.

from github.com/mitsuhiko/pexpect-mcp

FAQ

Pexpect MCP бесплатный?

Да, Pexpect MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Pexpect?

Нет, Pexpect работает без API-ключей и переменных окружения.

Pexpect — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Pexpect в Claude Desktop, Claude Code или Cursor?

Открой Pexpect на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Сравнить Pexpect с

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории development