logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

pyanywhere-mcp-adapter

Bridge implementation for the Model Context Protocol targeting the PythonAnywhere cloud hosting environment.

Author

MCP Server

pythonanywhere

MIT License

Quick Info

GitHub GitHub Stars 8
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

cloudpythonanywhereplatformpythonanywhere cloudcloud platformcloud platforms

PythonAnywhere Model Context Protocol Adapter

This component serves as a conduit, adhering to the Model Context Protocol (MCP), to facilitate secure, programmatic interaction with your PythonAnywhere resources. It exposes a uniform interface allowing autonomous agents and language models to orchestrate actions—like modifying source code, deploying web applications, or scheduling recurrent jobs—under controlled and auditable conditions.

Core Capabilities

  • Resource Manipulation: Perform CRUD operations on filesystem assets, including listing directories, uploading new content, and deleting existing entries. This is instrumental for log file inspection and debugging.
  • ASGI Application Orchestration: Full lifecycle management for ASGI web services: creation, deletion, listing available deployments, and initiating restarts. (Reference: PythonAnywhere ASGI Configuration Guide)
  • WSGI Application Control: Currently limited to triggering service reloads.
  • Task Scheduling Management: Comprehensive control over scheduled operations, encompassing listing existing jobs, setting up new ones, modifying parameters, and removal. (Security Note: Automated scheduling/deletion carries inherent risk; an LLM might create a task that executes code immediately upon creation. For sensitive automated workloads, consider pairing this adapter with tools like mcp-server-time to mitigate temporal confusion by the model.)

Deployment Instructions

The MCP standard is client-agnostic, but setup procedures vary. Below are the verified methods.

Prerequisite: Ensure the uv package manager is installed and accessible from your system's command path.

Authentication requires both your PythonAnywhere username and a corresponding API access key. Obtain or generate this key via the API management portal on PythonAnywhere.

Claude Desktop Extension Integration

This offers the simplest installation path when utilizing the Claude Desktop client.

  1. Launch the Claude Desktop application.
  2. Retrieve the latest distribution package: Download the .dxt file here.
  3. Import the file by double-clicking it or dragging it into the application window.
  4. Input your provided PythonAnywhere API key and account identifier.
  5. Reinitialize Claude Desktop to activate the integration.

Direct Claude Console Invocation

Execute the following command structure: bash claude mcp add pythonanywhere-mcp-server \ -e API_TOKEN=yourpythonanywhereapitoken \ -e LOGNAME=yourpythonanywhereusername \ -- uvx pythonanywhere-mcp-server

Configuration for GitHub Copilot within PyCharm

Incorporate the server definition into your local mcp.json file:

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

Manual Setup for Cursor and Claude Desktop

For Cursor, use mcp.json. For Claude Desktop, target claude_desktop_config.json. Add the following object structure:

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

Operational Warnings

Integrating an arbitrary AI agent directly with your live PythonAnywhere hosting environment grants substantial power, which mandates corresponding caution. Human oversight remains critical, particularly for destructive or irreversible operations like filesystem alterations or deletion tasks.

Be extremely wary when running multiple active MCP endpoints concurrently. If any adapter has access to external, untrusted resources (e.g., external issue trackers), these connections can be exploited as pathways for malicious execution. Consult security advisories like this detailed analysis for deeper context on multi-server risks.

Architectural Details

This service is built upon the python mcp sdk. It leverages the companion package, pythonanywhere-core (documentation), which provides a localized abstraction layer over the PythonAnywhere REST API. This core library is extensible and subject to future enhancements as API capabilities evolve.

WIKIPEDIA: Google Cloud Platform (GCP) is a comprehensive suite of public cloud computing resources provided by Google, encompassing modular services for computation, data persistence, analytical processing, and artificial intelligence models. It operates on the identical underlying infrastructure that powers Google's consumer-facing services, such as Google Search, Gmail, and Google Docs, as documented by Verma et al. Account activation mandates verifiable financial information, such as a credit card or banking credentials. Google Cloud Platform furnishes environments across Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and serverless computing paradigms. Google first entered the cloud computing domain in April 2008 with the introduction of App Engine, a platform dedicated to the development and hosting of web applications within Google-managed datacenters. General availability for this service was achieved in November 2011. Following App Engine's debut, Google systematically integrated numerous additional cloud services into the platform. Google Cloud Platform forms a component of the broader Google Cloud ecosystem, which includes the public cloud infrastructure, enterprise productivity suites like Google Workspace (formerly G Suite), corporate versions of Android and ChromeOS, and specialized APIs for machine intelligence and enterprise geospatial services. As of 2022, official communications indicate that "Google Cloud" is the preferred nomenclature, replacing "Google Cloud Platform," which can occasionally lead to terminological ambiguity.

== Offerings == Google catalogues over one hundred distinct products under the Google Cloud banner. Key services are summarized below.

=== Computational Resources === App Engine – A PaaS environment supporting application deployment across languages including Java, PHP, Node.js, Python, C#, .Net, Ruby, and Go. Compute Engine – An IaaS offering for provisioning and operating virtual machines running Microsoft Windows or Linux. Google Kubernetes Engine (GKE) or GKE on-prem (part of Anthos) – A managed Container Orchestration service built on Kubernetes. Cloud Functions – A Function as a Service (FaaS) solution for executing event-triggered code written in Node.js, Java, Python, or Go. Cloud Run – A serverless compute engine based on Knative architecture, available in fully managed mode or via Cloud Run for Anthos. It currently supports unified management across GCP, AWS, and VMware environments.

=== Data Persistence and Storage === Cloud Storage – Scalable object storage featuring integrated edge caching for unstructured data repositories. Cloud SQL – A managed Database as a Service supporting MySQL, PostgreSQL, and Microsoft SQL Server backends. Cloud Bigtable – A high-throughput, managed NoSQL database service. Cloud Spanner – A globally distributed, strongly consistent, relational database solution offering horizontal scalability. Cloud Datastore – A NoSQL database optimized for web and mobile application backends. Persistent Disk – Attachable block storage volumes provisioned for Compute Engine VMs. Cloud Memorystore – Managed in-memory caching services leveraging Redis and Memcached protocols. Local SSD: High-performance, temporary, locally attached block storage devices. Filestore: A managed, high-throughput file storage service tailored for Google Cloud workloads. AlloyDB: A fully managed database service compatible with PostgreSQL.

=== Interconnectivity === VPC – Virtual Private Cloud network isolation service.

See Also

`