MCP.so
登录

MCP Python Toolbox

@gianlucamazza

基本信息

分类

其他

许可证

MIT

传输方式

stdio

作者

gianlucamazza

关于 MCP Python Toolbox

MCP server giving AI assistants a toolbox for Python development.

#mcp-python-toolbox#python-development#model-context-protocol

MCP Python Toolbox 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mcp_python_toolbox": {
      "command": "python",
      "args": [
        "-m",
        "venv",
        ".venv"
      ]
    }
  }
}

MCP Python Toolbox 工具

工具列表暂未提供

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

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

概览

What is MCP Python Toolbox?

MCP Python Toolbox is a Model Context Protocol (MCP) server that provides a comprehensive set of tools for Python development. It enables AI assistants like Claude to read, write, analyze, format, lint, manage dependencies, and execute Python code within a workspace.

How to use MCP Python Toolbox?

Install by cloning the repository, creating a virtual environment, and running pip install -e ".[dev]". Start the server as a CLI tool with python -m mcp_python_toolbox --workspace /path/to/project. For Claude Desktop, add a JSON configuration entry specifying the Python binary and arguments. Programmatic usage is also supported via the PythonToolboxServer class.

Key features of MCP Python Toolbox

  • Safe file operations with workspace path validation
  • AST-based Python code analysis (imports, functions, classes)
  • Code formatting via Black and PEP8 (autopep8)
  • Code linting using Pylint with detailed reports
  • Virtual environment creation and dependency management
  • Sandboxed code execution using the project’s virtual environment

Use cases of MCP Python Toolbox

  • An AI assistant reading and modifying Python project files.
  • Analyzing code structure (functions, classes, dependencies) for refactoring.
  • Automatically formatting and linting code before committing.
  • Managing virtual environments and installing packages from requirements or pyproject.toml.
  • Safely executing Python code within a project context.

常见问题

1

What are the runtime dependencies?

Python 3, Black, autopep8, Pylint, and a virtual environment. The package is installed in development mode with `.[dev]`.

2

How does the server ensure safety for file operations?

File operations are restricted to the configured workspace directory. Path validation prevents access outside that directory. Code execution uses temporary files and captures stdout/stderr.

3

How do I configure MCP Python Toolbox with Claude Desktop?

Add a JSON entry under MCP tools specifying the command (Python binary), arguments (`-m mcp_python_toolbox --workspace /path`), and environment variables like `PYTHONPATH` and `VIRTUAL_ENV`.

4

Can it execute arbitrary Python code?

Yes. The `CodeExecutor` tool runs code in the project’s virtual environment, capturing output, errors, and exit code. It uses temporary files and supports custom working directories.

5

What license does MCP Python Toolbox use?

MIT License.

评论

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