休假管理系统——FastAPI+SQLite+BasicAuth+MCP
使用以下工具构建的简单休假管理系统 快速API, SQLite, 基本身份验证,以及 FastMCP.\ 支持员工管理、休假余额管理和休假请求跟踪。
______________________________________________________________________
🚀 特性
- 创建员工
- 基本身份验证 使用
username:password - 应用, 信用,以及 检查 假期结余
- 查看员工休假申请历史记录
- SQLite数据库
- FastMCP服务器模式
- 干净的模块化架构
- CORS已启用
______________________________________________________________________
📦 技术栈
| 组件 | 技术 |
|---|---|
| 后端 | FastAPI |
| 身份验证 | HTTP基本身份验证(纯文本比较) |
| 数据库 | SQLite+SQLAlchemy ORM |
| 自动化/MCP | FastMCP |
| 应用服务器 | Uvicorn |
______________________________________________________________________
🛠 安装说明
1.安装依赖项
uv pip install -r requirements.txt
## 📍 API Documentation (Swagger & ReDoc)
Once the server is running, you can access the built-in documentation at:
### **Swagger UI**
http://127.0.0.1:8000/docs
### **ReDoc**
http://127.0.0.1:8000/redoc
---
## 🧠 Running MCP Server (FastMCP)
This project supports **MCP Mode**, allowing tools and automation integrations.
### Run APIuv run uvicorn main:app --reload
Run MCP Interceptor
uv run fastmcp dev main.p````