Enables execution of Python code with pexpect functionality for interactive process control and debugging sessions with command-line tools like LLDB and GDB
pexpect-mcp
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.
Related MCP server: Python Local MCP Server
Installation
Usage
As an MCP Server
Add to your Claude Code configuration:
Tool Usage
The server provides a single tool: pexpect_tool
Parameters:
code(string): Python code to execute with pexpect supporttimeout(optional int): Timeout in seconds (default: 30)
Example Usage:
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.
Requirements
Python ≥ 3.12.1
pexpect ≥ 4.9.0
mcp ≥ 1.13.0
License
See LICENSE file for details.
This server cannot be installed
Related Resources
Appeared in Searches
- AI tools for debugging Python code
- MCP servers for monitoring application power and memory usage on Windows and macOS
- MCP server for real-time console interaction and log monitoring in Cursor IDE
- Information about Telnet Protocol or Usage
- General search for programming code or coding-related information