Cover image
Try Now
2025-04-14

MCP将代码推向pythonanywhere

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars

PythonAnywhere MCP (model context protocol)

This MCP tool allows you to easily push your local Python code to your PythonAnywhere account.

Setup

  1. Install the required dependencies:

    pip install -r requirements.txt
    
  2. Create a .env file based on the .env.example template:

    cp .env.example .env
    
  3. Edit the .env file and add your PythonAnywhere API token and username.

Configuration

Before using the MCP, you need to configure it:

python pythonanywhere_mcp.py configure --local-dir "/path/to/your/local/project" --remote-dir "/home/your_username/path/on/pythonanywhere"

Optional configuration arguments:

  • --excluded: Patterns to exclude (e.g., --excluded .git __pycache__ *.pyc .env)
  • --auto-reload: Whether to automatically reload the web app after pushing changes (True or False)

Usage

Push a Directory

Push a directory and all its contents to PythonAnywhere:

python pythonanywhere_mcp.py push-dir

You can override the configured directories:

python pythonanywhere_mcp.py push-dir --local-dir "/path/to/your/local/project" --remote-dir "/home/your_username/path/on/pythonanywhere"

Push a Single File

Push a single file to PythonAnywhere:

python pythonanywhere_mcp.py push-file /path/to/your/local/file.py

You can specify a custom remote path:

python pythonanywhere_mcp.py push-file /path/to/your/local/file.py --remote-file "/home/your_username/path/on/pythonanywhere/file.py"

Example Workflow

  1. Configure the MCP:

    python pythonanywhere_mcp.py configure --local-dir "/Users/you/myproject" --remote-dir "/home/your_username/myproject"
    
  2. Push your entire project:

    python pythonanywhere_mcp.py push-dir
    
  3. After making changes to a specific file, push just that file:

    python pythonanywhere_mcp.py push-file /Users/you/myproject/app.py
    

The MCP will automatically reload your web app after pushing changes (unless disabled in configuration).

相关推荐

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • hkr04
  • 轻巧的C ++ MCP(模型上下文协议)SDK

  • sigoden
  • 使用普通的bash/javascript/python函数轻松创建LLM工具和代理。

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • RockChinQ
  • 😎简单易用、🧩丰富生态 -大模型原生即时通信机器人平台| 适配QQ / 微信(企业微信、个人微信) /飞书 /钉钉 / discord / telegram / slack等平台| 支持chatgpt,deepseek,dify,claude,基于LLM的即时消息机器人平台,支持Discord,Telegram,微信,Lark,Dingtalk,QQ,Slack

  • dmayboroda
  • 带有可配置容器的本地对话抹布

  • paulwing
  • 使用MCP服务创建的测试存储库

    Reviews

    3.6 (7)
    Avatar
    user_6uGlGFsg
    2025-04-24

    As a dedicated user of PythonAnywhere-MCP, I find it to be an exceptional tool for managing Python projects in the cloud. Created by Swathi Uppadi, the platform offers seamless integration and a user-friendly interface, which simplifies the deployment and management of applications. The initial setup is straightforward, and the welcome information provided is clear and helpful. Highly recommended for anyone looking to streamline their Python development workflow!

    Avatar
    user_yo8CUwsw
    2025-04-24

    pythonanywhere-mcp by SwathiUppadi is an outstanding application for Python enthusiasts! This tool offers a seamless experience for coding directly in the cloud, without the hassle of local setup. The intuitive interface and quick start URL make it easy to dive right into development. Highly recommended for anyone looking for a reliable and efficient Python development environment.

    Avatar
    user_k1w18RlA
    2025-04-24

    pythonanywhere-mcp by SwathiUppadi is a fantastic tool for managing Python environments online. It offers a user-friendly interface and a robust set of features, making it easy to write, run, and debug Python code in the cloud. The product's welcoming information ensures newcomers can get started quickly. Highly recommended for Python enthusiasts and developers!

    Avatar
    user_Cb7cton8
    2025-04-24

    PythonAnywhere-MCP by SwathiUppadi is a fantastic tool offering seamless integration for Python developers. The intuitive interface and robust features make coding and deploying applications a breeze. Highly recommend checking it out for enhancing productivity and automating tasks efficiently. Welcome message and easy start URL ensure smooth onboarding. A must-have for Python enthusiasts!

    Avatar
    user_r7wRm7Q4
    2025-04-24

    PythonAnywhere-MCP by Swathi Uppadi is a versatile and user-friendly platform that seamlessly supports Python programming and web development. Its intuitive interface makes it easy for both beginners and experienced developers. I've found the comprehensive tools and resources exceptionally helpful for my projects. Highly recommended!

    Avatar
    user_Sbv3VxxF
    2025-04-24

    I've been using pythonanywhere-mcp by SwathiUppadi for a few months now and it's been a game changer for my projects. The platform is incredibly user-friendly and offers seamless integration which has significantly boosted my productivity. The welcoming interface makes it easy to get started even for beginners. Highly recommended for anyone looking to enhance their coding workflow!

    Avatar
    user_BDbvtCVp
    2025-04-24

    PythonAnywhere-MCP is a fantastic tool for developers who want a seamless experience for coding in Python. Created by Swathi Uppadi, it offers a user-friendly interface and robust features. The start URL makes it easy to dive right in, and the welcome information helps to get you acquainted quickly. This application is a must-have for any Python enthusiast looking to enhance their coding workflow.