这是一个用于与 Groundlight 交互的模型上下文协议(MCP)服务器。该服务器提供了创建、列出和自定义检测器的工具,提交和列出图像查询,创建、列出和删除警报,以及检查检测器评估指标的功能。
功能和可用工具会随着我们继续开发和改进此服务器而发生变化和扩展。
以下工具在 Groundlight MCP 服务器中可用:
create_detector
描述:根据指定的配置创建一个检测器。支持三种模式:
所有检测器分析图像以回答自然语言查询,并返回置信度分数以指示结果的可靠性。如果置信度低于指定阈值,则查询会被升级给人类审核。检测器通过持续从反馈和额外示例中学习来随着时间的推移提高性能。
输入:config(包含名称、查询、置信度阈值、模式及模式特定配置的 DetectorConfig 对象)
返回:Detector 对象
get_detector
detector_id(字符串)Detector 对象list_detectors
Detector 对象列表submit_image_query
detector_id(字符串),image(字符串或字节)ImageQuery 对象get_image_query
image_query_id(字符串)ImageQuery 对象list_image_queries
detector_id(字符串)ImageQuery 对象列表get_image
image_query_id(字符串),annotate(布尔值,默认:false)Image 对象create_alert
config(包含名称、检测器ID、条件及可选的 webhook 操作、电子邮件操作、文本操作、启用状态和是否需要人类审核字段的 AlertConfig 对象)Rule 对象list_alerts
page(整数,默认:1),page_size(整数,默认:110)Rule 对象列表delete_alert
alert_id(字符串)add_label
image_query_id(字符串),label(整数或字符串),rois(可选列表)get_detector_evaluation_metrics
detector_id(字符串)update_detector_confidence_threshold
detector_id(字符串),confidence_threshold(浮点数)update_detector_escalation_type
detector_id(字符串),escalation_type(字符串,'STANDARD' 或 'NO_HUMAN_LABELING')在您的 claude_desktop_config.json 中添加以下内容:
"mcpServers": {
"groundlight": {
"command": "docker",
"args": ["run", "--rm", "-i", "-e", "GROUNDLIGHT_API_TOKEN", "groundlight/groundlight-mcp-server"],
"env": {
"GROUNDLIGHT_API_TOKEN": "YOUR_API_TOKEN_HERE"
}
}
}
在您的 settings.json 中添加以下内容:
{
"context_servers": {
"groundlight": {
"command": {
"path": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"GROUNDLIGHT_API_TOKEN",
"groundlight/groundlight-mcp-server"
],
"env": {
"GROUNDLIGHT_API_TOKEN": "YOUR_API_TOKEN_HERE"
}
}
}
}
}
本地构建 Docker 镜像:
make build-docker
本地运行 Docker 镜像:
make run-docker
[Groundlight 内部] 将 Docker 镜像推送到 Docker Hub(需要 DockerHub 凭证):
make push-docker