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 wh
Add this skill
npx mdskills install pythonanywhere/pythonanywhere-mcp-serverWell-documented MCP server for PythonAnywhere with comprehensive installation guides and clear security warnings
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.
Install via CLI
npx mdskills install pythonanywhere/pythonanywhere-mcp-serverPythonAnywhere Model Context Protocol Server is a free, open-source AI agent skill. 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 wh
Install PythonAnywhere Model Context Protocol Server with a single command:
npx mdskills install pythonanywhere/pythonanywhere-mcp-serverThis downloads the skill files into your project and your AI agent picks them up automatically.
PythonAnywhere Model Context Protocol Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.