fiware orion mcp
MCP(模型上下文协议)服务器 FIWARE Orion上下文代理使像Claude这样的LLM能够管理NGSI-v2上下文实体——物联网设备、摄像头、传感器、车辆和任何被建模为数字孪生的现实世界对象。
目前还没有官方的FIWARE MCP。这是第一个。
什么是FIWARE Orion?
消防 是智能城市和物联网数据管理的开放标准(ETSI NGSI-LD)。这 Orion上下文代理 是它的核心组件——它存储所有实体的当前状态,并在情况发生变化时通知订阅者。
可用工具
| 工具 | 说明 |
|---|---|
orion_get_version | 验证Orion连接和版本 |
orion_list_types | 列出所有实体类型及其属性 |
orion_query_entities | 按类型、模式、过滤器、地理位置查询实体 |
orion_get_entity | 获取特定实体的完整详细信息 |
orion_create_entity | 创建新的NGSI实体 |
orion_update_attributes | 更新实体属性 |
orion_delete_entity | 删除实体 |
orion_create_subscription | 订阅属性更改通知 |
orion_list_subscriptions | 列出活动订阅 |
quantumleap_get_history | 获取实体的时间序列历史记录 |
quantumleap_get_type_history | 获取跨实体类型的聚合历史记录 |
快速开始
1.启动固件栈(Docker)
cd docker
docker compose up -d
# Verify:
curl http://localhost:1026/version
curl http://localhost:8668/version2.安装MCP服务器
pip install fiware-orion-mcp
# or from source:
pip install -e .3.配置克劳德代码
添加到您的 ~/.claude/mcp.json 或项目MCP配置:
{
"mcpServers": {
"fiware-orion": {
"command": "python",
"args": ["-m", "fiware_mcp.server"],
"env": {
"ORION_URL": "http://your-orion-host:1026",
"QUANTUMLEAP_URL": "http://your-ql-host:8668"
}
}
}
}4.环境变量
| 变量 | 默认值 | 描述 |
|---|---|---|
ORION_URL | http://localhost:1026 | Orion上下文代理URL |
QUANTUMLEAP_URL | http://localhost:8668 | QuantumLeap URL |
FIWARE_SERVICE | _(空)_ | 多租户服务名称 |
FIWARE_SERVICE_PATH | / | 多租户服务路径 |
与Claude的示例会话
> List all entity types in the Context Broker
> Show me all Camera entities that are offline
> Get the full details of Camera:TIMONE-01
> Update Camera:TIMONE-01 status to "maintenance"
> Show me the uptime history of Camera:TIMONE-01 for the last 7 days路线图
- \[\]NGSI-LD支持(猎户座LD)
- \[\]批量操作
- \[\]地理查询助手(查找点附近的实体)
- \[\]将实体导出为GeoJSON
许可证
麻省理工学院——欢迎投稿。
