- Home
- MCP servers
- pexpect-mcp
pexpect-mcp
- python
69
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mitsuhiko-pexpect-mcp": {
"command": "pexpect-mcp",
"args": []
}
}
}You can run a remote pexpect session controller as an MCP server to interact with command-line tools and debuggers from AI-assisted workflows. This server maintains a Python session and exposes a tool to execute pexpect-enabled code, enabling interactive debugging with utilities like LLDB and GDB.
How to use
To use this MCP server, install it, then load it into your MCP client configuration. You will access a single tool named pexpect_tool that runs Python code with pexpect support inside a persistent session. Use this to spawn interactive processes, send input, and read outputs from tools requiring programmatic interaction.
How to install
Prerequisites you need before installation:
- Python 3.12.1 or newer
- A working runtime for the MCP client (Node/UV tool is used for installation in this guide)
- Access to the internet to install packages
Step 1: Install the MCP server package using the UV tool. Run this command in your terminal.
uv tool install git+https://github.com/mitsuhiko/pexpect-mcp
Configuration to run with your MCP client
{
"mcpServers": {
"pexpect": {
"command": "pexpect-mcp"
}
}
}
Available tools
pexpect_tool
Executes Python code with built-in pexpect support, enabling interactive session control and automated command-line interactions.