SafetyCulture MCP 服务器
用于 SafetyCulture API 的模型上下文协议 (MCP) 服务器。该项目允许用户在提供 API 密钥后,使用自然语言询问有关其 SafetyCulture 数据的问题。
特征
使用自然语言查询 SafetyCulture 数据
分析检查数据和趋势
比较不同时间段和类别的安全指标
可视化随时间变化的检查趋势
设置
克隆此存储库
安装依赖项:
pip install -r requirements.txt将
example.env复制到.env并配置您的 SafetyCulture API 密钥使用以下方法之一运行服务器:
run_server.bat- 使用 .env 文件中的配置运行服务器run_with_key.bat YOUR_API_KEY- 使用提供的 API 密钥运行服务器
测试 API
要测试您的 SafetyCulture API 密钥是否正常工作:
其他测试选项:
test_api.bat- 以交互模式运行测试(提示输入 API 密钥)test_api.bat feed YOUR_API_KEY- 仅测试 Feed APItest_api.bat url- 检查哪些 API URL 无需身份验证即可访问
与 Claude 桌面版一起使用
通过编辑配置文件
~/Library/Application Support/Claude/claude_desktop_config.json(Mac) 或%APPDATA%\Claude\claude_desktop_config.json(Windows),配置 Claude for Desktop 使用此 MCP 服务器添加以下配置:
重启 Claude 桌面版
使用 MCP 工具查询您的 SafetyCulture 数据,例如:
“过去 3 个月内,该站点进行了多少次检查?”
“比较此类别受伤人数上升趋势报告”
可用工具
验证
authenticate:使用您的 API 密钥通过 SafetyCulture API 进行身份验证
检查数据(使用 Feed API)
get_inspections:获取特定时间段内的 SafetyCulture 检查get_inspection_trends:分析 SafetyCulture 检查随时间变化的趋势compare_injury_reports:比较两个时间段内的伤害报告
动作数据(使用 Feed API)
get_actions:获取特定时间段内的 SafetyCulture 操作按状态过滤(例如“进行中”、“已完成”、“逾期”)
按优先级过滤(例如“低”、“中”、“高”)
查看每个操作的详细信息
get_action_details:通过 ID 获取特定操作的详细信息
关于 Feed API
该 MCP 服务器使用 SafetyCulture Feed API,它提供了一种访问资源集合的简单方法:
/feed/inspections:用于列出具有各种过滤参数的检查/feed/actions:用于列出具有各种过滤参数的操作
当您需要列出多个项目时,Feed API 比单个资源端点更受欢迎。
发展
项目结构
开发日志
初始设置
创建项目结构
设置 git 仓库
添加了 README 和要求
实施 SafetyCulture API 客户端
添加了用于查询检查数据的 MCP 工具
添加了用于日期解析和数据分析的实用程序模块
增加了配置管理
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.
模型上下文协议服务器允许用户在提供 API 密钥后使用自然语言查询和分析他们的 SafetyCulture 检查数据。
Related MCP Servers
- Asecurity-licenseAqualityA Model Context Protocol server that enables users to perform third-party enrichment lookups for security observables (IP addresses, domains, URLs, emails) through services like VirusTotal, Shodan, and others.Last updated -12
- -security-license-qualityA minimal Model Context Protocol server that provides a safety guardrail tool to check if provided context is free from code injection or harmful content.Last updated -
- -security-license-qualityA Model Context Protocol server that provides secure curl command execution capabilities, allowing AI assistants to make HTTP requests with configurable parameters and built-in security protections.Last updated -1
- Asecurity-licenseAqualityA Model Context Protocol server that enables LLMs to explore and interact with API specifications by providing tools for loading, browsing, and getting detailed information about API endpoints.Last updated -41013