PP

pythonanywhere/pythonanywhere-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

17 stars 10 forks 品質 79 トレンド 29MIT

モデルコンテクストプロトコル(MCP)サーバーは、AI搭載ツールとPythonAnywhereアカウント間のブリッジとして機能し、ファイル、ウェブサイト、ウェブアプリ、スケジュールされたファイルのセキュリティ、プログラム管理を実現します.

概要

モデルコンテクストプロトコル(MCP)サーバーは、AI搭載ツールとPythonAnywhereアカウント間のブリッジとして機能し、ファイル、ウェブサイト、Webapp、スケジュールされたタスクのセキュリティ、プログラム管理を実現します。 標準化されたインターフェイスを公開することにより、言語モデルと自動化クライアントは、編集ファイル、Webアプリのデプロイ、またはスケジューリングジョブなどの操作を実行できます。 - : 読み込み、アップロード、ファイル削除、ディレクトリツリーのリスト。 (また、ログファイルへの直接アクセスでデバッグを有効にします。これは、PythonAnywhereのファイルだけです) - : 作成、削除、リロード、リスト。 (PythonAnywhere ASGI ドキュメントで説明) - : 作成、削除、リロード、パッチ、リスト、情報の取得 - :リスト、作成、更新、削除。 (これは、LLM が実行後に作成および削除された後、タスクが遅すぎると任意のコマンドを実行できるようにすることに注意してください.

概要(AI 翻訳)

モデルコンテキストプロトコル(MCP) サーバは、AI 搭載ツールとあなたの間のブリッジとして機能します。 PythonAnywhere のアカウントでセキュアに、 ファイル、ウェブサイト、ウェブアプリ、スケジュールされたタスクのプログラム管理。 によって 標準化されたインターフェイスを公開し、言語モデルと自動化を可能にします クライアントは、編集ファイル、Webアプリのデプロイ、または scheduling ジョブ – 代りに、すべてが細かい管理を維持しながら 監査性。

##特徴 -ファイル管理: 読み込み、アップロード、ファイル削除、ディレクトリツリーの一覧 (また、ログファイルへの直接アクセスでデバッグを有効にします。 PythonAnywhereのファイル -ASGI Webアプリ管理: 作成、削除、リロード、リスト。 (PythonAnywhere ASGIで説明) ドキュメント -WSGI Webアプリ管理: 作成、削除、リロード、パッチ、リスト、取得 インフォメーション

  • スケジュールされたタスク管理: リスト、作成、更新、削除。 (LLM はタスクがなければ任意のコマンドを実行できるようにすることに注意してください) 実行後に作成し、削除した後に遅すぎる予定。 そのためには mcp-server-time で実行する モデルは時間について簡単に混乱させる。)

インストール

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

PythonAnywhere Model Context Protocol Server

A Model Context Protocol (MCP) server acts as a bridge between AI-powered tools and your PythonAnywhere account, enabling secure, programmatic management of files, websites, webapps, and scheduled tasks. By exposing a standardized interface, it allows language models and automation clients to perform operations—such as editing files, deploying web apps, or scheduling jobs – on your behalf, all while maintaining fine-grained control and auditability.

Features

  • File management: Read, upload, delete files and list directory trees. (also enables debugging with direct access to log files, which are just files on PythonAnywhere)
  • ASGI Web app management: Create, delete, reload, and list. (as described in the PythonAnywhere ASGI documentation)
  • WSGI Web app management: Create, delete, reload, patch, list, and get info.
  • Scheduled task management: List, create, update, and delete. (Note that this enables LLMs to execute arbitrary commands if a task is scheduled too soon after creation and deleted after execution. For that we would suggest running it with mcp-server-time as models easily get confused about time.)

Installation

The MCP protocol is well-defined and supported by various clients, but installation is different depending on the client you are using. We will cover cases that we tried and tested.

In all cases, you need to have uv installed and available in your PATH.

Have your PythonAnywhere API token and username ready. You can find (or generate) your API token in the API section of your PythonAnywhere account.

If your account is on eu.pythonanywhere.com, you also need to set PYTHONANYWHERE_SITE to eu.pythonanywhere.com (it defaults to www.pythonanywhere.com).

MCP Bundle - works with Claude Desktop

Probably the most straightforward way to install the MCP server is to use the MCP Bundle for Claude Desktop.

  1. Open Claude Desktop.
  2. Download the latest .mcpb file.
  3. Double-click on the downloaded .dxt file or drag the file into the window.
  4. Configure your PythonAnywhere API token and username.
  5. Restart Claude Desktop.

Claude Code

Run:

claude mcp add pythonanywhere-mcp-server \
-e API_TOKEN=yourpythonanywhereapitoken \
-e PYTHONANYWHERE_USERNAME=yourpythonanywhereusername \
-- uvx pythonanywhere-mcp-server

GitHub Copilot in PyCharm:

Add it to your mcp.json.

{
  "servers": {
    "pythonanywhere-mcp-server": {
      "type": "stdio",
      "command": "uvx",
GitHub で README 全文を見る

インストール

uvx pythonanywhere-mcp-server
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "pythonanywhere-mcp-server": { "type": "stdio", "command": "uvx", "args": ["pythonanywhere-mcp-server"], "env": { "API_TOKEN": "yourpythonanywhereapitoken", "PYTHONANYWHERE_USERNAME": "yourpythonanywhereusername" } } } }