Senechal MCP 服务器
模型上下文协议 (MCP) 服务器作为 Senechal 项目的配套服务器,将 Senechal API 的健康数据提供给 LLM 应用程序。
概述
该服务器为 LLM 提供了一个标准化接口,用于从 Senechal API 访问健康数据。它公开:
- 资源:可以加载到 LLM 上下文中的健康数据
- 工具:LLM 可以调用以获取健康数据的函数
- 提示:用于分析健康数据的可重复使用模板
安装
- 克隆此存储库
- 创建虚拟环境:
- 安装依赖项:
配置
将.env.example
文件复制到.env
并添加您的 Senechal API 密钥和 URL:
服务器要运行,就需要 API 密钥和 API URL。
Windows 配置
在 Windows 上运行时,请确保:
- 在配置中使用反斜杠或正确转义的路径
- 在 claude-desktop-config.json 中使用 Python 虚拟环境的完整路径:
请注意,MCP 配置中的环境变量不使用.env
文件,因此您需要在配置中明确设置它们。
用法
测试客户端/服务器设置
测试设置的最简单方法是运行示例客户端:
启动服务器
使用 MCP Inspector 的开发模式
在 Claude Desktop 中安装
该服务器包含 Claude Desktop 的配置文件:
然后,您可以从 Claude Desktop 的工具菜单中选择“Senechal Health”。
可用资源
senechal://health/summary/{period}
- 获取每日、每周、每月或每年的健康摘要- 例如:
senechal://health/summary/day?span=7&metrics=all
- 参数:
period
:日、周、月、年span
:周期数(默认值:1)metrics
:逗号分隔列表或“全部”(默认)offset
:从现在开始偏移的周期数(默认值:0)
- 例如:
senechal://health/profile
- 获取用户的健康档案- 包含人口统计数据、药物、补充剂
senechal://health/current
- 获取当前健康测量数据- 例如:
senechal://health/current?types=1,2,3
- 参数:
types
:可选的以逗号分隔的测量类型 ID 列表
- 例如:
senechal://health/trends
- 获取随时间推移的健康趋势- 例如:
senechal://health/trends?days=30&types=1,2,3&interval=day
- 参数:
days
:分析的天数(默认值:30)types
:可选的以逗号分隔的测量类型 ID 列表interval
:分组间隔 - 天、周、月(默认值:天)
- 例如:
senechal://health/stats
- 获取健康指标的统计分析- 例如:
senechal://health/stats?days=30&types=1,2,3
- 参数:
days
:分析周期(天数)(默认值:30)types
:可选的以逗号分隔的测量类型 ID 列表
- 例如:
可用工具
fetch_health_summary
- 获取特定时期的健康摘要- 参数:
period
(必填):日、周、月、年metrics
(可选):逗号分隔的指标或“全部”(默认)span
(可选):返回的周期数(默认值:1)offset
(可选):偏移的周期数(默认值:0)
- 参数:
fetch_health_profile
- 获取用户的健康资料- 无需参数
fetch_current_health
- 获取最新的健康测量数据- 参数:
types
(可选):要过滤的测量类型 ID 列表
- 参数:
fetch_health_trends
- 获取健康趋势数据- 参数:
days
(可选):分析的天数(默认值:30)types
(可选):要过滤的测量类型 ID 列表interval
(可选):分组间隔 - 天、周、月(默认值:天)
- 参数:
fetch_health_stats
- 获取健康指标的统计分析- 参数:
days
(可选):分析期(天)(默认值:30)types
(可选):要过滤的测量类型 ID 列表
- 参数:
可用提示
analyze_health_summary
- 提示分析健康摘要- 提供用于识别异常指标、趋势和建议行动的模板
- 旨在与
senechal://health/summary/day?span=7
数据一起使用
compare_health_trends
- 提示比较不同时间段的健康趋势- 提供用于比较不同时间范围(7、30、90 天)趋势的模板
- 旨在与健康趋势端点的数据一起使用
交互示例
正在加载健康摘要数据
调用健康数据工具
使用健康分析提示
请参阅example_client.py
文件以获取完整的工作示例。
API 端点
Senechal MCP 服务器与以下 Senechal API 端点通信:
/health/summary/{period}
- 获取健康摘要/health/profile
- 获取健康状况/health/current
– 获取当前测量值/health/trends
- 获取健康趋势/health/stats
- 获取健康统计数据
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
模型上下文协议服务器将 Senechal API 中的健康数据提供给 LLM 应用程序,使 AI 助手能够访问、分析和响应个人健康信息。
Related Resources
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server for tracking personal health and well-being, offering tools for workout logging, nutrition management, and daily journaling with AI-assisted analysis integration.Last updated -8Python
- -securityAlicense-qualityA Model Context Protocol Server that enables LLMs to interact with and execute REST API calls through natural language prompts, supporting GET/PUT/POST/PATCH operations on configured APIs.Last updated -6PythonApache 2.0
- AsecurityAlicenseAqualityA Model Context Protocol server providing AI assistants with access to healthcare data tools, including FDA drug information, PubMed research, health topics, clinical trials, and medical terminology lookup.Last updated -72821JavaScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables interaction with Apache SeaTunnel through LLM interfaces, allowing users to manage jobs, monitor system information, and configure connections through natural language.Last updated -21PythonApache 2.0