MCP Python 実行
サンドボックス内で Python コードを実行するためのモデル コンテキスト プロトコルサーバー。
コードはDeno内でPyodideを使用して実行されるため、オペレーティング システムの残りの部分から分離されます。
完全なドキュメントについては、
denoをインストールした状態でサーバーを実行するには、次のコマンドを使用します。
どこ:
-N -R=node_modules -W=node_modules(--allow-net --allow-read=node_modules --allow-write=node_modulesのエイリアス)は、./node_modulesへのネットワークアクセスと読み取り/書き込みアクセスを許可します。これらは、pyodide が Python 標準ライブラリとパッケージをダウンロードしてキャッシュするために必要です。--node-modules-dir=autodeno にローカルのnode_modulesディレクトリを使用するように指示します。stdioStdio MCPトランスポートを使用してサーバーを実行します。プロセスをローカルでサブプロセスとして実行するのに適しています。sseSSE MCPトランスポートを使用してサーバーを実行します。サーバーをHTTPサーバーとして実行し、ローカルまたはリモートで接続します。warmup、Python標準ライブラリをダウンロードしてキャッシュするための最小限のPythonスクリプトを実行します。これは、サーバーが正しく動作しているかどうかを確認するのにも役立ちます。
PydanticAI で@pydantic/mcp-run-python使用する例を次に示します。
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
サンドボックス内で Python コードを実行するためのモデル コンテキスト プロトコル サーバー。
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server that allows management and execution of Blender Python scripts, enabling users to create, edit and run scripts in a headless Blender environment through natural language interfaces.Last updated -8
- -securityAlicense-qualityA Model Context Protocol server that enables seamless execution of commands, Python code, web content fetching, and reusable task management with secure credentials handling.
- -securityAlicense-qualityA streamlined foundation for building Model Context Protocol servers in Python, designed to make AI-assisted development of MCP tools easier and more efficient.Last updated -13MIT License
- -securityFlicense-qualityA Python-based implementation of the Model Context Protocol that enables communication between a model context management server and client through a request-response architecture.Last updated -