PythonAnywhere MCP Server is a Model Context Protocol (MCP) server designed to act as a bridge between AI-driven tools and PythonAnywhere accounts. By exposing a standardized interface, it allows language models and automation clients to perform actions on behalf of the user, such as editing files, deploying web apps, or scheduling scheduled tasks, while maintaining fine-grained control and auditability.
Main capabilities:
- File management: read, upload, delete files, and list directory trees. It also supports debugging by directly accessing log files (log files are ordinary 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 information.
- Scheduled task management: list, create, update, and delete. Note: if a task is scheduled soon after creation and deleted after execution, this enables the LLM to execute arbitrary commands. For this reason, it is recommended to run it together with mcp-server-time, because models easily confuse time.
How to use: The MCP protocol is clearly defined and supported by many clients, but the installation method varies by client. The following covers tested cases. In all cases, uv must be installed and available in PATH. A PythonAnywhere API token and username must be ready, which can be found or generated in the API section of the PythonAnywhere account. If the account is located at eu.pythonanywhere.com, PYTHONANYWHERE_SITE also needs to be set to eu.pythonanywhere.com (the default is www.pythonanywhere.com).
- MCP Bundle (for Claude Desktop): open Claude Desktop; download the latest .mcpb file; double-click the downloaded .dxt file or drag the file into the window; configure the PythonAnywhere API token and username; restart Claude Desktop.
- GitHub Copilot in PyCharm: add it to mcp.json.
- Claude Desktop (manual setup) and Cursor: add it to claude_desktop_config.json (for Claude Desktop) or mcp.json (for Cursor).
Applicable scenarios and limitations: Integrating an LLM directly with a PythonAnywhere account provides powerful capabilities, but it also introduces risks. Human oversight is strongly recommended, especially for sensitive operations such as modifying or deleting files. Be cautious if running multiple MCP servers at the same time—especially if any server can access external resources you do not control (such as GitHub issues). These may become attack vectors. The server uses the Python MCP SDK to connect with the pythonanywhere-core package (documentation), which wraps a subset of the PythonAnywhere API and may be expanded as needed in the future.
Other facts (such as exact pricing, platform support details, etc.) are not provided for now.