Python REPL MCP Server
파이썬 REPL MCP 서버
이 MCP 서버는 Python REPL(Read-Eval-Print Loop)을 도구로 제공합니다. 이를 통해 MCP 프로토콜을 통해 Python 코드를 영구 세션으로 실행할 수 있습니다.
설정
설정이 필요 없습니다! 이 프로젝트는 종속성 관리를 위해 uv 사용합니다.
Related MCP server: Python REPL MCP Server
서버 실행
간단히 실행하세요:
지엑스피1
Claude Desktop과 함께 사용
Claude Desktop 구성 파일에 다음 구성을 추가하세요.
{
"mcpServers": {
"python-repl": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/python-repl-server",
"run",
"mcp_python"
]
}
}
}서버는 세 가지 도구를 제공합니다.
execute_python: 영구 변수로 Python 코드 실행code: 실행할 Python 코드reset: 세션을 재설정하는 선택적 부울 값
list_variables: 현재 세션의 모든 변수를 표시합니다.install_package: pypi에서 패키지를 설치합니다.
예시
변수를 설정하세요:
a = 42다음 변수를 사용하세요:
print(f"The value is {a}")모든 변수를 나열하세요:
# Use the list_variables tool세션 재설정:
# Use execute_python with reset=true기여하다
기여를 환영합니다! 풀 리퀘스트를 제출해 주세요. 다음과 같은 방법으로 기여하실 수 있습니다.
버그 신고
새로운 기능 제안
문서 개선
테스트 케이스 추가
코드 개선 사항 제출
PR을 제출하기 전에 다음 사항을 확인하세요.
귀하의 코드는 기존 스타일을 따릅니다.
필요에 따라 문서를 업데이트했습니다.
테스트를 몇 개 써보는 건 어떨까요?
중요한 변경 사항이 있는 경우, 먼저 이슈를 열어서 변경하고 싶은 사항을 논의하세요.
Available Tools
3 toolsexecute_pythonB
Execute Python code and return the output. Variables persist between executions.
Inputs: code (required), reset.
install_packageB
Install a Python package using uv
Inputs: package (required).
list_variablesB
List all variables in the current session
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose with no overlap: execute_python runs code, install_package manages dependencies, and list_variables inspects the session state. An agent can easily tell them apart as they target different aspects of the Python REPL workflow.
All tools follow a consistent verb_noun pattern (execute_python, install_package, list_variables) with clear, descriptive names. The naming convention is uniform throughout the set, making it predictable and easy to understand.
With only 3 tools, the set feels thin for a Python REPL server, as it lacks operations like uninstalling packages, clearing variables, or handling errors. While the core functions are covered, the count is borderline low for the domain's typical scope.
The tools cover basic execution, package installation, and variable listing, but there are notable gaps: no way to update or remove packages, delete variables, or manage session state beyond listing. This could cause agent failures in more complex workflows.
Related MCP Connectors
A simple MCP server built with FastMCP and python
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Related MCP Servers
- FlicenseBqualityDmaintenanceA Python-based MCP server implementation that can be easily installed via pip or directly from GitHub, providing a simple way to deploy and run MCP server functionality.1-
- AlicenseNot gradedqualityDmaintenanceProvides a persistent Python REPL session as a tool for executing code, managing files, installing packages, and initializing projects via the MCP protocol.1MIT
- AlicenseAqualityDmaintenanceA production-grade MCP server providing a persistent Python REPL with multi-session support, sandboxing, and timeout protection, enabling LLM agents to execute Python code across multiple turns with variables that persist between calls.1221 PyPI1MIT
- AlicenseNot gradedqualityDmaintenanceAsync Python REPL + Shell execution for MCP. Provides persistent state, background jobs, interactive input() bridging, and crash isolation in a single server.1Apache 2.0