
Eclipse Ditto
io.github.nagarjunr由 GitHub 账号 nagarjunr 发布v0.1.1更新于 Oct 24, 2026
MCP server for the Eclipse Ditto digital twin HTTP API (things, policies, connections, more).
发布方自己的服务:ditto.audio
概览
让助手通过 Ditto HTTP API 管理 Eclipse Ditto 数字孪生:事物、属性、功能、策略、连接以及集群 DevOps 设置。
- 可以做什么
- 把 Eclipse Ditto 的 HTTP API 封装为 MCP 工具。事物工具可列出、计数、获取、创建、局部更新和删除事物,并管理其策略 ID 与定义。属性与功能工具可读写属性、功能、功能属性与期望属性。消息工具可发送实时消息并认领事物。策略工具可管理策略及其条目。连接与 DevOps 工具可列出、创建、更新、删除连接,查看连接状态、指标与日志,设置集群日志级别,读取运行时配置并发送 piggyback 管理命令。poll_thing_changes 工具通过短时 SSE 连接收集实时变更事件。
- 适用场景
- 当助手需要操作 Eclipse Ditto 部署或基于 Ditto 的物联网平台时适用:查看和更新设备孪生、调整策略,或运维连接与集群设置。适合自建 Ditto 实例以及基于 Ditto 开放协议的商业平台。它不面向通用网页或文件任务。
- 运行要求
- 以 stdio 方式在本地运行,从 PyPI 安装 eclipse-ditto-mcp-server 并用 uvx 启动,需要 Python/uv 运行环境。必须设置 DITTO_BASE_URL 指向 Ditto HTTP API。可选凭据:DITTO_USERNAME 与 DITTO_PASSWORD,或 DITTO_BEARER_TOKEN,用于 things/policies/messages/search API;DITTO_DEVOPS_USERNAME 与 DITTO_DEVOPS_PASSWORD 用于独立的 DevOps/Connections 域。需要能访问 Ditto 实例的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Eclipse Ditto,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Eclipse Ditto MCP Server
A Model Context Protocol (MCP) server for Eclipse Ditto — the open-source (EPL-2.0) digital twin framework. It exposes Ditto's HTTP API as MCP tools so an AI agent can manage devices ("things"), their attributes/features, policies, connections, and cluster admin — the full Ditto HTTP API surface.
Since Bosch IoT Things and other commercial IoT platforms are built on Ditto's open protocol, this server also works against those deployments — nothing in the code is vendor-specific.
Built with FastMCP.
Tools
Things
Attributes & Features
Messages
Policies
Connectivity & DevOps (require DITTO_DEVOPS_USERNAME/DITTO_DEVOPS_PASSWORD)
Ditto's Connections API and DevOps API (log levels, cluster config, piggyback commands) sit behind a separate "devops" Basic-auth realm on the gateway, independent of the policy-based auth used for things/policies.
Live events
Safety conventions
- Create vs. replace: every
put_*/set_*/create_*tool defaults tooverwrite=False, using Ditto'sIf-None-Match: *header so create-only is race-free (not a check-then-set). Passoverwrite=Trueto replace existing data. - Deletes are confirm-gated: every
delete_*tool requiresconfirm=True. There is no bulk/cascading delete. - Not covered (deliberately): WoT Web-of-Things descriptor endpoints (
/.well-known/wot,/devops/wot/*), and fine-grained policy sub-resources (subjects/{id},resources/{path},imports, token-integration actions) — whole-entryset_policy_entry/get_policy_entriescovers the common case. Add these later if you need them.
Configuration
If both DITTO_BEARER_TOKEN and Basic auth credentials are set, the bearer token takes precedence. If neither is set, requests are sent unauthenticated (only works if your Ditto instance allows anonymous/pre-authenticated access).
Running locally
See mcp.json for ready-to-use client configs (stdio and Docker).
Testing against a real Ditto instance
This repo's design principles call for testing against a real instance rather than mocks. docker-compose.yml (adapted from Ditto's official example, trimmed to the services this connector needs) spins up a full local Ditto stack — MongoDB, the Ditto microservices, and an nginx front door with Basic auth.
The 47 tests cover every tool group (things, attributes/features, messages, policies, connectivity, devops, live events) against this real stack, including delete/confirm gating and create/overwrite gating.
A note on the live-events approximation
poll_thing_changes opens Ditto's SSE change feed for a bounded window instead of holding a persistent subscription (which doesn't map cleanly onto a single MCP tool call). Ditto's SSE stream sends periodic empty data: keepalive lines even when nothing has changed — the tool checks its deadline on every line received, including keepalives, so it reliably returns within duration_seconds regardless of how chatty or quiet the stream is.
License notes
docker-compose.yml and the files under docker/ are adapted from the Eclipse Ditto project (EPL-2.0) and are used here only to spin up a local test instance — they are not part of the MCP server itself.
来源:eclipse-ditto/README.md,提交 5a985b6
工具
0版本历史
1- v0.1.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
