使用说明
MCP演示
此存储库包含MCP(模型控制协议)演示项目。
项目结构
mcp-demo/
├── main.py # Main application entry point
├── tools/ # Utility tools and helper functions
├── tests/ # Test suite
├── .env # Environment variables (not tracked in git)
└── pyproject.toml # Project dependencies and configuration
设置
-
克隆存储库:
git clone <repository-url> cd mcp-demo -
安装uv(如果尚未安装):
curl -LsSf https://astral.sh/uv/install.sh | sh -
使用uv创建和激活虚拟环境:
uv venv source .venv/bin/activate # On Unix/macOS # OR .venv\Scripts\activate # On Windows -
使用uv安装依赖项:
uv pip install -e . -
配置环境变量:
cp .env.example .env # Edit .env with your configuration
运行应用程序
-
激活虚拟环境(如果尚未激活):
source .venv/bin/activate # On Unix/macOS # OR .venv\Scripts\activate # On Windows -
运行主应用程序:
python main.py
运行测试
要运行测试套件,请执行以下操作:
pytest
发展
本项目使用:
- Python的核心实现
- 依赖管理和虚拟环境的uv
- pytest用于测试
- pyproject.toml用于项目配置
许可证
[在此处添加您的许可证信息]