Skip to main content
Glama
mcp-interactive-repl

mcp-interactive-repl

by zachsnow

mcp-interactive-repl

An MCP server that provides generic interactive REPL access for Claude and other MCP clients. Useful for working with command-line tools that have prompt-based interfaces, interactively.

I only vibed this so that Claude could help me debug an issue in Quinix using the qvm interactive debugger; hopefully it's useful.

Installation

npm install -g mcp-interactive-repl

Or use directly with npx (no install needed).

Related MCP server: ptywright

Usage

Add to your Claude Code MCP configuration (~/.claude/settings.json):

{
  "mcpServers": {
    "repl": {
      "command": "npx",
      "args": ["mcp-interactive-repl"]
    }
  }
}

Or if installed globally:

{
  "mcpServers": {
    "repl": {
      "command": "mcp-interactive-repl"
    }
  }
}

Tools

repl_start

Start a REPL session with prompt detection. For example, to start the Python REPL:

{
  "command": "python",
  "args": ["-i"],
  "prompt": "^>>> $"
}

Parameters:

  • command (required): Command to run

  • prompt (required): Regex pattern to detect the prompt

  • args: Command arguments (default: [])

  • cwd: Working directory (default: server's current directory)

  • env: Additional environment variables, merged with server's environment (default: {})

  • initialTimeout: Max milliseconds to wait for initial prompt (default: 30000)

repl_send

Send input to a session and wait for the next prompt.

{
  "sessionId": "...",
  "input": "print('hello')",
  "timeout": 30000
}

Parameters:

  • sessionId (required): Session ID from repl_start

  • input (required): Input to send (newline appended automatically)

  • timeout: Max milliseconds to wait for prompt (default: 30000)

repl_read

Non-blocking read of the current output buffer.

{
  "sessionId": "..."
}

Parameters:

  • sessionId (required): Session ID from repl_start

repl_kill

Terminate a session.

{
  "sessionId": "..."
}

Parameters:

  • sessionId (required): Session ID from repl_start

repl_list

List all active sessions. Takes no parameters.

Development

npm install
npm run typecheck   # Type check
npm run build       # Build to dist/
npm run dev         # Build and run

Available Tools

5 tools
repl_killC

Terminate a REPL session

Inputs: sessionId (required).

repl_listB

List all active REPL sessions

Inputs: no named parameters.

repl_readA

Non-blocking read of current output buffer

Inputs: sessionId (required).

repl_sendB

Send input to a REPL session and wait for the next prompt

Inputs: input (required), sessionId (required), timeout.

repl_startC

Start an interactive REPL process with prompt detection

Inputs: prompt (required), command (required), cwd, env, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool maps to a distinct lifecycle action: start, send (blocking), read (non-blocking), kill, list. The blocking vs. non-blocking distinction between repl_send and repl_read is explicitly documented, so overlap is minimal.

    Naming Consistency5/5

    All five tools use the same repl_ prefix followed by a short verb (start, send, read, kill, list). The pattern is fully predictable and readable.

    Tool Count5/5

    Five tools is a tight, well-scoped surface for managing interactive REPL sessions, with no redundant or filler tools.

    Completeness4/5

    Session lifecycle (create, interact, inspect, terminate, enumerate) is fully covered. Minor gaps exist: no explicit interrupt/signal-send or status/exit-code tool, though agents can approximate these via repl_send sending control characters.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers