MCP.so
登录

MCP Python Interpreter

@yzfly

基本信息

分类

其他

许可证

NOASSERTION

传输方式

stdio

作者

yzfly

关于 MCP Python Interpreter

MCP Python Interpreter: run python code. Python-mcp-server, mcp-python-server, Code Executor

MCP Python Interpreter 配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

MCP Python Interpreter 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is MCP Python Interpreter?

MCP Python Interpreter is a Model Context Protocol (MCP) server that enables LLMs to interact with Python environments, read and write files, execute Python code, and manage development workflows.

How to use MCP Python Interpreter?

Install the server with pip install mcp-python-interpreter or uv install mcp-python-interpreter. Configure it in Claude Desktop by adding a server entry in claude_desktop_config.json with the command uvx mcp-python-interpreter, the required --dir argument (working directory), and optional --python-path and MCP_ALLOW_SYSTEM_ACCESS environment variable. The uv package manager must be installed first.

Key features of MCP Python Interpreter

  • List and use system and conda Python environments
  • Run Python code or scripts in any environment
  • Install and list installed Python packages
  • Read text, source code, and binary files
  • Write text and binary files securely
  • Provides prompts for function templates, refactoring, and debugging

Use cases of MCP Python Interpreter

  • Ask an LLM to list available Python environments on your system
  • Execute Python code in a specific conda or system environment
  • Create, read, or edit Python files and other text files
  • Install new Python packages or list installed packages
  • Run a Python script from a file with custom arguments

常见问题

1

What prerequisites are needed?

The `uv` package manager must be installed. Installation commands for macOS/Linux and Windows are provided in the README.

2

How does the server ensure file and environment security?

The server operates within an isolated working directory set by `--dir`. It prevents writes outside that directory, limits file reads to 1MB, requires explicit overwrite confirmation, and includes an `MCP_ALLOW_SYSTEM_ACCESS` environment variable to control system access.

3

What Python environments can I manage?

The server can list and use both system Python environments and conda environments.

4

Can I install packages with this server?

Yes, the `install_package` tool allows installing Python packages in any available environment.

5

What file types and sizes are supported?

The server can read and write text files, source code, and binary files. File reads are limited to 1MB; binary files are shown in hex representation.

评论

其他 分类下的更多 MCP 服务器