mcp-python-repl
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| REPL_HOST | No | HTTP host (when using HTTP transport) | 127.0.0.1 |
| REPL_PORT | No | HTTP port (when using HTTP transport) | 8000 |
| REPL_SANDBOX | No | Enable sandboxing (true/false) | false |
| REPL_TIMEOUT | No | Max execution time in seconds | 30 |
| REPL_WORKDIR | No | Working directory for executions | cwd |
| REPL_TRANSPORT | No | Transport: stdio or streamable-http | stdio |
| REPL_MAX_OUTPUT | No | Max stdout/stderr capture (bytes) | 1048576 |
| REPL_SESSION_TTL | No | Session expiry in minutes | 120 |
| REPL_MAX_SESSIONS | No | Maximum concurrent sessions | 50 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| repl_run_codeA | Execute Python code with a PERSISTENT namespace. Variables you assign are STORED and available in subsequent calls.
Access them DIRECTLY by name (e.g. The Correct workflow:: Returns: JSON with execution result, new/modified variables, and namespace summary. |
| repl_run_fileA | Execute a Python file inside the persistent session. Variables defined in the file become available for later use. Args: params: File path, optional session ID, and optional CLI args. Returns: JSON with execution result, file metadata, and namespace summary. |
| repl_install_packageA | Install a Python package using pip (or uv if available). The package becomes importable in all sessions immediately. Args:
params: Package specifier (e.g. Returns: JSON with installation status and output. |
| repl_list_namespaceB | List all variables stored in a session's namespace. Returns: JSON with variable names, types, and preview values. |
| repl_get_variableA | Retrieve the full value of a variable from a session. Returns: JSON with the variable name, type, and serialized value. |
| repl_set_variableA | Set a variable in a session from a JSON string. Useful for injecting data from external sources. Returns: Confirmation with variable type and preview. |
| repl_delete_variableA | Delete a specific variable from a session's namespace. Returns: Confirmation with remaining variables. |
| repl_clear_namespaceA | Clear ALL variables from a session. Cannot be undone. Returns: Confirmation with list of cleared variables. |
| repl_list_sessionsA | List all active REPL sessions. Returns: JSON array of sessions with IDs, timestamps, and variable counts. |
| repl_delete_sessionB | Delete a session and all its data. Returns: Confirmation message. |
| repl_get_historyA | Get the last N execution records for a session. Useful for debugging what happened in previous calls. Returns: JSON array of execution records. |
| repl_server_statusA | Get current server status and configuration. Returns: JSON with Python version, session count, configuration, and limits. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/aazizisoufiane/mcp-python-repl'
If you have feedback or need assistance with the MCP directory API, please join our Discord server