MCP.so
ログイン

MCP Python Toolbox

@gianlucamazza

MCP Python Toolbox について

MCP server giving AI assistants a toolbox for Python development.

基本情報

カテゴリ

その他

ライセンス

MIT

ランタイム

python

トランスポート

stdio

公開者

gianlucamazza

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

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

ツール

ツールは検出されませんでした

ツールは 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.

FAQ from MCP Python Toolbox

What are the runtime dependencies?

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

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.

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.

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.

What license does MCP Python Toolbox use?

MIT License.

コメント

「その他」の他のコンテンツ