# Pythonanywhere Mcp Server

> MCP server from pythonanywhere/pythonanywhere-mcp-server.

- **Type:** MCP server
- **Install:** `agentstack add mcp-pythonanywhere-pythonanywhere-mcp-server`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [pythonanywhere](https://agentstack.voostack.com/s/pythonanywhere)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [pythonanywhere](https://github.com/pythonanywhere)
- **Source:** https://github.com/pythonanywhere/pythonanywhere-mcp-server

## Install

```sh
agentstack add mcp-pythonanywhere-pythonanywhere-mcp-server
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# PythonAnywhere Model Context Protocol Server

A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction)
server acts as a bridge between AI-powered tools and your
[PythonAnywhere](https://www.pythonanywhere.com/) 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](https://help.pythonanywhere.com/pages/ASGICommandLine))_
- **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](https://pypi.org/project/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](https://www.pythonanywhere.com/account/#api_token).

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](https://github.com/modelcontextprotocol/mcpb) for Claude Desktop.

1. Open Claude Desktop.
2. **[Download the latest .mcpb file](https://github.com/pythonanywhere/pythonanywhere-mcp-server/releases/latest/download/pythonanywhere-mcp-server.mcpb)**.
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 PYTHONANYWHERE_USERNAME=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",
        "PYTHONANYWHERE_USERNAME": "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",
        "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](https://simonwillison.net/2025/Jul/6/supabase-mcp-lethal-trifecta/).

## Implementation

The server uses the [python mcp sdk](https://github.com/modelcontextprotocol/python-sdk)
in connection with the [pythonanywhere-core](https://github.com/pythonanywhere/pythonanywhere-core)
package ([docs](https://core.pythonanywhere.com/)), which wraps a subset of the [PythonAnywhere
API](https://help.pythonanywhere.com/pages/API/) and may be expanded in
the future as needed.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [pythonanywhere](https://github.com/pythonanywhere)
- **Source:** [pythonanywhere/pythonanywhere-mcp-server](https://github.com/pythonanywhere/pythonanywhere-mcp-server)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-pythonanywhere-pythonanywhere-mcp-server
- Seller: https://agentstack.voostack.com/s/pythonanywhere
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
