Python REPL MCP Server
Python REPL MCP 服务器
此 MCP 服务器提供了一个 Python REPL(读取-求值-打印循环)工具。它允许通过 MCP 协议以持久会话的方式执行 Python 代码。
设置
无需设置!该项目使用uv进行依赖管理。
Related MCP server: Python REPL MCP Server
运行服务器
只需运行:
uv run src/python_repl/server.py与 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贡献
欢迎贡献代码!欢迎提交 Pull 请求。以下是一些您可以贡献代码的方式:
报告错误
建议新功能
改进文档
添加测试用例
提交代码改进
在提交 PR 之前,请确保:
您的代码遵循现有的风格
您已根据需要更新文档
也许写一些测试?
对于重大更改,请先打开一个问题来讨论您想要更改的内容。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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
- Alicense-qualityDmaintenanceProvides 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.121MIT
- Alicense-qualityDmaintenanceAsync Python REPL + Shell execution for MCP. Provides persistent state, background jobs, interactive input() bridging, and crash isolation in a single server.1Apache 2.0
Related MCP Connectors
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A basic MCP server to operate on the Postman API.
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/hdresearch/mcp-python'
If you have feedback or need assistance with the MCP directory API, please join our Discord server