PythonAnywhere Model Context Protocol Server

PythonAnywhere Model Context Protocol Server

Bridge AI-powered tools with PythonAnywhere for secure, programmatic environment management.

8
Stars
4
Forks
8
Watchers
4
Issues
PythonAnywhere Model Context Protocol Server implements the MCP, allowing AI clients and automation tools to securely manage files, web apps, and scheduled tasks within a PythonAnywhere account. It offers a standardized interface to perform core operations like editing files, deploying or managing web apps, and handling scheduled jobs with fine-grained access control. Designed for integration with tools such as Claude Desktop, GitHub Copilot, and Cursor, it ensures auditability of actions and supports multiple installation workflows.

Key Features

Read, upload, and delete files within PythonAnywhere
List directory structures and access log files
Create, delete, reload, and list ASGI web apps
Reload WSGI web apps
Manage scheduled tasks, including creation, updating, listing, and deletion
Standardized MCP interface for AI tools
Supports integration with Claude Desktop, GitHub Copilot, and Cursor
Secure API token-based authentication
Fine-grained access control and auditability
Multiple installation and configuration methods for diverse client tools

Use Cases

Automated deployment and management of web applications on PythonAnywhere
Remote file management and debugging through AI assistants
Programmatic scheduling and control of recurring tasks or jobs
Integration of PythonAnywhere environment management into AI coding assistants
Facilitation of LLM-driven DevOps workflows for rapid prototyping
Monitoring and manipulation of server logs via AI-powered interfaces
Scheduled execution of tasks with automated time handling
Empowering non-technical users to manage web resources through AI bots
Implementing secure, auditable changes in production environments
Centralized access management for multiple AI assistants or automation clients

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: Reload only (at the moment).
  • 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.

Desktop Extension - works with Claude Desktop

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

  1. Open Claude Desktop.
  2. Download the latest .dxt 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:

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

GitHub Copilot in PyCharm:

Add it to your mcp.json.

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

Claude Desktop (manual setup) and Cursor:

Add it to claude_desktop_config.json (for Claude Desktop) or (mcp.json for Cursor).

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

Caveats

Direct integration of an LLM with your PythonAnywhere account offers significant capabilities, but also introduces risks. We strongly advise maintaining human oversight, especially for sensitive actions such as modifying or deleting files.

If you are running multiple MCP servers simultaneously, be cautious -- particularly if any server can access external resources you do not control, such as GitHub issues. These can become attack vectors. For more details, see this story.

Implementation

The server uses the python mcp sdk in connection with the pythonanywhere-core package (docs), which wraps a subset of the PythonAnywhere API and may be expanded in the future as needed.

Star History

Star History Chart

Repository Owner

pythonanywhere
pythonanywhere

Organization

Repository Details

Language Python
Default Branch master
Size 72 KB
Contributors 4
License MIT License
MCP Verified Nov 11, 2025

Programming Languages

Python
100%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • TickTick MCP

    TickTick MCP

    MCP server for AI-powered TickTick task management integration

    TickTick MCP is a Model Context Protocol (MCP) server that enables standardized integration of TickTick's task management features with AI assistants and developer applications. It allows programmatic access to create, update, retrieve, complete, or delete tasks and projects in TickTick via Python. Using this MCP server, AI systems can leverage TickTick's API to help automate and manage user's to-do lists and projects through natural language or other interfaces.

    • 6
    • MCP
    • ekkyarmandi/ticktick-mcp
  • Aiven MCP Server

    Aiven MCP Server

    Model Context Protocol server enabling LLMs to access and manage Aiven cloud data services.

    Aiven MCP Server implements the Model Context Protocol (MCP) to provide secure access to Aiven's PostgreSQL, Kafka, ClickHouse, Valkey, and OpenSearch services. It enables Large Language Models (LLMs) to seamlessly integrate and interact with these cloud data platforms, supporting full stack solution development. The server offers streamlined tools for project and service management via standardized APIs and supports integration with platforms like Claude Desktop and Cursor. Environment variable configuration and explicit permission controls are used to ensure secure and flexible operations.

    • 11
    • MCP
    • Aiven-Open/mcp-aiven
  • Pica MCP Server

    Pica MCP Server

    A Model Context Protocol (MCP) server for seamless integration with 100+ platforms via Pica.

    Pica MCP Server provides a standardized Model Context Protocol (MCP) interface for interaction with a wide range of third-party services through Pica. It enables direct platform integrations, action execution, and intelligent intent detection while prioritizing secure environment variable management. The server also offers features such as code generation, form and data handling, and robust documentation for platform actions. It supports multiple deployment methods, including standalone, Docker, Vercel, and integration with tools like Claude Desktop and Cursor.

    • 8
    • MCP
    • picahq/mcp
  • CipherTrust Manager MCP Server

    CipherTrust Manager MCP Server

    Enables AI assistants to access CipherTrust Manager securely via the Model Context Protocol.

    CipherTrust Manager MCP Server provides an implementation of the Model Context Protocol (MCP), offering AI assistants such as Claude and Cursor a unified interface to interact with CipherTrust Manager resources. Communication is facilitated through JSON-RPC over stdin/stdout, enabling key management, CTE client management, user management, and connection management functionalities. The tool is configurable via environment variables and integrates with existing CipherTrust Manager instances using the ksctl CLI for secure resource access.

    • 7
    • MCP
    • sanyambassi/ciphertrust-manager-mcp-server
  • OpenAI MCP Server

    OpenAI MCP Server

    Bridge between Claude and OpenAI models using the MCP protocol.

    OpenAI MCP Server enables direct querying of OpenAI language models from Claude via the Model Context Protocol (MCP). It provides a configurable Python server that exposes OpenAI APIs as MCP endpoints. The server is designed for seamless integration, requiring simple configuration updates and environment variable setup. Automated testing is supported to verify connectivity and response from the OpenAI API.

    • 77
    • MCP
    • pierrebrunelle/mcp-server-openai
  • TickTick MCP Server

    TickTick MCP Server

    Enable powerful AI-driven task management for TickTick via the Model Context Protocol.

    TickTick MCP Server provides comprehensive programmatic access to TickTick task management features using the Model Context Protocol. Built on the ticktick-py library, it enables AI assistants and MCP-compatible applications to create, update, retrieve, and filter tasks with improved precision and flexibility. The server supports advanced filtering, project and tag management, subtask handling, and robust context management for seamless AI integration.

    • 35
    • MCP
    • jen6/ticktick-mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results