Skip to main content
Glama
angrysky56

LocalREPL MCP Server

by angrysky56

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
run_shellA

Run a shell command inside a REPL context with structured output.

    Returns a dict so the caller can branch on exit_code and parse
    stdout without string-scraping. Every call is logged to evolution.db
    for later recall via `query_command_history`.

    Args:
        command: The shell command to execute.
        repl_id: REPL whose cwd the command runs in.
        timeout_seconds: Kill the process if it exceeds this (capped at 600).
        cwd: Override the REPL's cwd for this one call.
        use_shell: If True, pass to /bin/sh (enables pipes, redirects,
            glob expansion). Default False = tokenized exec, safer.
        env_extra: Additional env vars merged onto os.environ.
        stdin_input: Optional string piped to the command's stdin.
            Enables first-class stdin piping so CLI tools that read
            from stdin (jq, wc, grep, etc.) work without shell pipe
            syntax.  When None the child's stdin is /dev/null.
    
set_repl_cwdC

Change a REPL's tracked working directory for future shell calls.

get_repl_cwdB

Return the REPL's current working directory.

spawn_shellA

Spawn a long-running process. Returns a proc_id for follow-up calls.

    Use this for watchers (watchexec, tail -f), servers, REPLs, or any
    command you want to poll output from over time. For one-shot
    commands use run_shell instead — it's simpler and auto-logs.

    Returns proc_id which is passed to tail_shell_output, send_to_shell,
    kill_shell, and wait_shell.
    
tail_shell_outputA

Return the most recent lines from a spawned process's output.

    Args:
        proc_id: From spawn_shell.
        n_lines: How many recent lines to return (capped at 500).
        stream: 'stdout', 'stderr', or 'both'.
        drain: If True, remove returned lines from the buffer so the
            next call sees only NEW output. Useful for polling loops.
    
send_to_shellB

Write to a spawned process's stdin. Useful for interactive REPLs.

kill_shellB

Send a signal to a spawned process.

    Args:
        signal_name: 'SIGTERM' (graceful, default), 'SIGKILL' (force),
            or 'SIGINT' (Ctrl-C equivalent).
        remove_from_registry: Drop from _PROCESSES after signalling.
    
wait_shellC

Block until a spawned process exits (or timeout). Returns exit info.

list_shellsA

Return info on all spawned processes (live and recently-exited).

reap_exitedA

Remove exited processes from the registry. Call occasionally to keep list_shells tidy, especially after running many short spawns.

query_command_historyA

Search the command execution log.

    Args:
        pattern: SQL LIKE pattern against the command text (case-insensitive).
            Use % as wildcard, e.g. '%ripgrep%' or 'git commit%'.
        repl_id: Filter to commands run in a specific REPL.
        only_failures: Return only non-zero exit codes.
        only_timeouts: Return only commands that hit the timeout.
        since: ISO timestamp, or relative like '1h', '30m', '2d'.
        limit: Max rows to return (capped at 200).

    Returns:
        List of CommandLogEntry dicts, newest first.
    
command_statsA

Aggregate metrics across the command log.

    Args:
        since: Window to analyze (ISO or '1h'/'1d' etc). None = all time.
        top_n: How many entries to return in each top-list.
    
tag_commandC

Attach tags to a logged command for later recall.

Useful for marking commands as e.g. 'flaky', 'slow', 'solved', 'security-review'. Replaces any existing tags on that row.

forget_commandB

Delete a command log row. Use when a logged command captured a secret (token in argv, etc.) that shouldn't persist on disk.

vacuum_memoryA

Keep only the most recent N rows and reclaim disk space. Call occasionally to prevent unbounded growth.

run_python_in_venvA

Run Python code inside a project's virtual environment.

    Spawns a fresh subprocess running `<venv>/bin/python -c CODE`.
    No namespace carries over between calls — each invocation is a
    new interpreter. Use this when the project has dependencies that
    aren't installed in the MCP server's Python environment.

    Args:
        code: Python source to execute.
        venv_path: Path to the venv directory (e.g., "/proj/.venv")
            OR direct path to the python binary. `~` is expanded.
        repl_id: Optional REPL to inherit cwd from. Falls back to
            cwd argument, then to server's cwd.
        cwd: Explicit working directory override.
        timeout_seconds: Kill after N seconds (capped at 600).
        env_extra: Additional env vars merged onto os.environ.
            PYTHONPATH is NOT auto-set — pass it via env_extra if
            the project uses src-layout and needs it.

    Returns:
        VenvResult dict with ok/python_path/cwd/stdout/stderr/
        exit_code/duration_ms/timed_out/truncation flags/error.
    
find_venvA

Locate a virtual environment in the REPL's current directory.

    Checks, in order: .venv/, venv/, env/. Returns the path to the
    python binary if found, so it can be fed directly to
    run_python_in_venv.

    Args:
        repl_id: REPL whose cwd to search under.
    
create_python_replC
Create a new Python REPL environment.

Returns:
    str: ID of the new REPL
run_python_in_replB
Execute Python code in a REPL. (Create new or use an existing REPL)

Args:
    code: Python code to execute
    repl_id: ID of the REPL to use

Returns:
    str: Result of the execution including stdout, stderr, and the return value
list_active_replsA

List all active REPL instances and their IDs.

get_repl_infoC
Get information about a specific REPL instance.

Args:
    repl_id: ID of the REPL to get info for

Returns:
    str: Information about the REPL
delete_replA
Delete a REPL instance.

Args:
    repl_id: ID of the REPL to delete

Returns:
    str: Confirmation message
initialize_modular_empowermentC
Initialize the Modular Empowerment Framework in a specific REPL.

Args:
    repl_id: ID of the REPL to initialize in

Returns:
    str: Result of the initialization

Prompts

Interactive templates invoked by user choice

NameDescription
test_prompt_workflow A testing prompt to verify the external prompts system is working.
strategic_capability_enhancement
repl_agent_system_prompt Prompt template showing AI how to use the REPL Agent System.
data_analysis_workflow A prompt template for data analysis workflow.
system_discovery_workflow
simple_data_analysis_workflow
agent_demo_simulation
empowered_agent_basic_setup A prompt template for Modular Empowerment Framework integration. Updated based on actual testing results.
advanced_workflow_orchestration
collosal_acc_implementation
basic_python_repl_workflow A prompt template showing how to use the Python REPL.
basic_system_check A prompt template to verify that the REPL server is working correctly.
full_empowerment_workflow A prompt template showing how to use the Modular Empowerment Framework with Persistent Agents.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/angrysky56/local-repl-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server