PythonAnywhere MCP Server

PythonAnywhere MCP Server

Enables AI tools to manage files, web apps, and scheduled tasks on PythonAnywhere through the Model Context Protocol.

Category
Visit Server

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.

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",
      "args": ["pythonanywhere-mcp-server"],
      "env": {
        "API_TOKEN": "yourpythonanywhereapitoken",
        "PYTHONANYWHERE_USERNAME": "yourpythonanywhereusername"
      }
    }
  }
}

Claude Desktop (manual setup) and Cursor:

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

{
  "mcpServers": {
    "pythonanywhere-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": ["pythonanywhere-mcp-server"],
      "env": {
        "API_TOKEN": "yourpythonanywhereapitoken",
        "PYTHONANYWHERE_USERNAME": "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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured