Python REPL MCP サーバー
このMCPサーバーは、Python REPL(Read-Eval-Print Loop)ツールを提供します。これにより、MCPプロトコルを介して永続セッションでPythonコードを実行できます。
設定
セットアップは不要です。このプロジェクトでは依存関係の管理にuv
を使用します。
サーバーの実行
次のコマンドを実行するだけです:
Claude Desktopでの使用
この構成を Claude Desktop 構成ファイルに追加します。
サーバーは次の 3 つのツールを提供します。
execute_python
: 永続変数を使用してPythonコードを実行するcode
: 実行するPythonコードreset
: セッションをリセットするためのオプションのブール値
list_variables
: 現在のセッション内のすべての変数を表示するinstall_package
: pypiからパッケージをインストールする
例
変数を設定します。
次の変数を使用します:
すべての変数を一覧表示します。
セッションをリセットします:
貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。貢献できる方法は次のとおりです。
- バグを報告する
- 新機能を提案する
- ドキュメントの改善
- テストケースを追加する
- コードの改善を送信する
PR を送信する前に、次の点を確認してください。
- コードは既存のスタイルに従います
- 必要に応じてドキュメントを更新しました
- いくつかテストを書いてみませんか?
大きな変更については、まず問題を開いて、何を変更したいのか話し合ってください。
local-only server
The server can only run on the client's local machine because it depends on local resources.
MCP プロトコルを通じて永続的な Python REPL 環境を提供し、Python コードの実行、変数の管理、パッケージのインストールを可能にするサーバーです。
Related Resources
Related MCP Servers
- -securityFlicense-qualityThis is an MCP server that facilitates building tools for interacting with various APIs and workflows, supporting Python-based development with potential for customizable prompts and user configurations.Last updated -Python
- -securityFlicense-qualityA Python-based server that helps users easily install and configure other MCP servers across different platforms.Last updated -2Python
- AsecurityAlicenseAqualityA template repository for creating custom Model Context Protocol (MCP) servers in Python that can be integrated with applications like Claude Desktop or Cursor.Last updated -35PythonMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that allows LLMs to interact with Python environments, enabling code execution, file operations, package management, and development workflows.Last updated -9Python