- Explore MCP Servers
- mcp-demo-backend
Mcp Demo Backend
What is Mcp Demo Backend
mcp-demo-backend is a lightweight health data API service built on Flask, designed to manage user information and health data.
Use cases
Use cases include managing user profiles, tracking health metrics over time, and providing health data insights for users.
How to use
To use mcp-demo-backend, install the required dependencies with ‘pip install -r requirements.txt’, then run the service using ‘python app.py’. The service will start at http://127.0.0.1:5000.
Key features
Key features include user information management, health data querying by date range and metrics, and the ability to initialize sample data.
Where to use
mcp-demo-backend can be used in healthcare applications, fitness tracking systems, and any platform requiring user health data management.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Demo Backend
mcp-demo-backend is a lightweight health data API service built on Flask, designed to manage user information and health data.
Use cases
Use cases include managing user profiles, tracking health metrics over time, and providing health data insights for users.
How to use
To use mcp-demo-backend, install the required dependencies with ‘pip install -r requirements.txt’, then run the service using ‘python app.py’. The service will start at http://127.0.0.1:5000.
Key features
Key features include user information management, health data querying by date range and metrics, and the ability to initialize sample data.
Where to use
mcp-demo-backend can be used in healthcare applications, fitness tracking systems, and any platform requiring user health data management.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
健康数据 API 服务
这是一个基于 Flask 的轻量级健康数据 API 服务,用于管理用户信息和健康数据。
项目结构
项目/ │ ├── app.py # 主应用文件,包含 API 路由 ├── models.py # 数据模型,处理数据读写 ├── config.py # 配置文件 ├── data/ # 数据目录 │ ├── user.json # 用户数据 │ └── health.json # 健康数据 └── requirements.txt # 项目依赖
安装依赖
pip install -r requirements.txt
运行服务
python app.py
服务将在 http://127.0.0.1:5000 启动
API 端点
初始化示例数据
GET /api/init
生成并保存示例用户数据和健康数据。首次运行应用时需要调用此 API。
用户信息
GET /api/user
返回用户的基本信息(姓名、年龄、联系方式等)。
更新用户信息
PUT /api/user Content-Type: application/json { "name": "李四", "age": 50, "contact": "13900139000" }
通过 JSON 更新用户信息,可以更新任意字段。
健康数据查询
GET /api/health?start_date=2023-01-01&end_date=2023-01-31&metric=blood_pressure
按时间范围和指标查询健康数据。
查询参数:
start_date: 开始日期 (YYYY-MM-DD),可选end_date: 结束日期 (YYYY-MM-DD),可选metric: 健康指标类型,例如 ‘blood_pressure’,可选
不提供任何参数时,返回所有健康数据。
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










