by pythonanywhere
Provides a Model Context Protocol server that bridges AI tools with a PythonAnywhere account, enabling programmatic management of files, web apps, and scheduled tasks while maintaining fine‑grained control and auditability.
PythonAnywhere MCP Server enables AI‑driven tools to interact securely with a PythonAnywhere account. By exposing a standardized MCP interface, it allows language models and automation clients to read, write, and delete files, manage ASGI/WSGI web applications, and control scheduled tasks.
uv (or ensure it is available in your PATH).uvx:
uvx pythonanywhere-mcp-server
API_TOKEN and PYTHONANYWHERE_USERNAME).Q: Do I need to expose my API token to the AI model? A: The token is passed as an environment variable to the MCP server, which runs locally. The AI client never sees the raw token.
Q: Can I run multiple MCP servers at the same time? A: Yes, but be cautious about overlapping capabilities and external resource access, as it may introduce attack vectors.
Q: What happens if a scheduled task is created with a near‑future execution time?
A: The task could execute arbitrary commands. It is recommended to pair the server with mcp-server-time to avoid time‑related confusion.
Q: Is the server compatible with non‑Claude clients? A: Absolutely. Any client that implements the MCP specification (e.g., GitHub Copilot, Cursor) can connect by providing the appropriate configuration.
Q: How do I set the site for EU accounts?
A: Export PYTHONANYWHERE_SITE=eu.pythonanywhere.com before starting the 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.
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).
Probably the most straightforward way to install the MCP server is to use the MCP Bundle for Claude Desktop.
Run:
claude mcp add pythonanywhere-mcp-server \
-e API_TOKEN=yourpythonanywhereapitoken \
-e PYTHONANYWHERE_USERNAME=yourpythonanywhereusername \
-- uvx pythonanywhere-mcp-server
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"
}
}
}
}
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"
}
}
}
}
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.
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.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
{
"mcpServers": {
"pythonanywhere-mcp-server": {
"command": "uvx",
"args": [
"pythonanywhere-mcp-server"
],
"env": {
"API_TOKEN": "<YOUR_API_TOKEN>",
"PYTHONANYWHERE_USERNAME": "<YOUR_USERNAME>"
}
}
}
}claude mcp add pythonanywhere-mcp-server uvx pythonanywhere-mcp-server