MCP架构Python项目

一个遵循模型-控制器-展示器(MCP)架构模式的Python项目,用于构建结构化的应用程序。

  • by Paritoshandroid
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 Paritoshandroid/mcp-test

使用说明

Python MCP 项目

一个遵循模型-控制器-呈现器(MCP)架构模式的Python项目。

项目结构

mcp_project/
├── README.md
├── requirements.txt
├── src/
│   ├── model/          # Data models and business logic
│   ├── controller/     # Application logic and flow control
│   ├── presenter/      # Presentation layer
│   └── main.py         # Application entry point
└── tests/              # Unit and integration tests

设置

  1. 创建一个虚拟环境:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  2. 安装依赖项:

    pip install -r requirements.txt
    

运行应用程序

python -m src.main

运行测试

python -m pytest tests/