
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 分
