
Liquid
io.github.ertad-family由 GitHub 帳號 ertad-family 發布v0.2.0更新於 Oct 25, 2026
Connect your AI agent to anything — APIs, databases, and agents; read and write, auto-discovered.
概覽
Liquid 是自託管的 MCP 伺服器,讓助理透過統一的 fetch/query/write/sense 介面自動探索並存取 Web API、資料庫、其他代理、郵件與物聯網系統。
- 可以做什麼
- 從 URL、DSN 或代理端點探索並對應介面,列出與檢視已儲存的轉接器,並在取資料前估算呼叫成本。依權杖預算取資料,支援伺服器端搜尋、彙總與跨來源輸出正規化。讀寫資料庫(Postgres、MySQL、SQLite、DuckDB、SQL Server、Neo4j、MongoDB、Redis),並呼叫 Web API、GraphQL、gRPC、WebSocket、MCP 與 A2A 目標。感知資料列變更、發布訂閱、SSE 與 MCP 通知等即時事件串流,可選寄送郵件或操作物聯網、工業與 Android 目標。
- 適用情境
- 適合需要存取多種服務又不想手寫連接器的情境,尤其是資料庫與沒有規格文件的 REST API,或在意權杖成本與輸出一致性時。也適合需要監看即時事件串流或寫回資料儲存的代理。
- 執行需求
- 以本機 Python 程序執行(以 uvx 或 pip install liquid-api 安裝 liquid-mcp)。只有探索沒有機器可讀規格的 REST API 時才需要 LLM 金鑰:OPENAI_API_KEY、GEMINI_API_KEY 或 ANTHROPIC_API_KEY,或透過 OPENAI_BASE_URL 指定相容端點。各後端驅動為選用附加套件;部分目標需要自身憑證或系統程式。轉接器與憑證保存在使用者家目錄下。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Liquid,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Liquid
Connect your AI agent to anything — with no connector to write or maintain.
Point Liquid at a URL or a database and it works out the interface for you:
discovers its shape, maps it to the fields you asked for, and handles auth,
pagination and normalization — typed records, no client code. When the upstream
drifts, it re-maps and keeps going. The same small API — fetch · query ·
write · sense — reaches web APIs, databases, other agents (MCP/A2A), email,
and even IoT and industrial systems (MQTT, Modbus, OPC UA, BACnet). An LLM does the
learning at setup (and on drift); the data path itself makes no model call.
What an agent can reach through Liquid
One agent-facing API (fetch · query · write · sense) over everything an
agent might need to touch — Liquid figures out how to talk to it so the agent
doesn't have to. It's the agent's senses and hands: fetch/query probe,
sense perceives a live event stream, write acts on the world.
- Web APIs & messaging — REST/JSON, GraphQL, SOAP/WSDL, gRPC, WebSocket, SSE/NDJSON streams, MQTT (IoT pub/sub — subscribe to sense, publish to act)
- Email — IMAP/SMTP (any provider, app-password or OAuth2
XOAUTH2) and the Gmail API (OAuth2): read a mailbox,sensenew mail as it arrives, and send - Industrial / OT — Modbus (PLCs, sensors) and OPC UA (Industry-4.0 nodes, native subscriptions) for the factory floor; BACnet for buildings (HVAC/BMS) — read, write, and sense
- Android devices — phones, TV boxes, kiosks via ADB: sense
logcat, readshell, act withinput/am - Other agents & tools — any MCP server, A2A agents, ChatGPT-plugin manifests
- Databases — Postgres (+ pgvector), MySQL/MariaDB, SQLite, DuckDB, SQL Server, Neo4j (graph), MongoDB (documents), Redis (key-value)
- People, places & things — a human, a home, or a car as a node via
connectors: Telegram (perceive messages,sendreplies), Home Assistant (perceive a whole smart home's state changes, act viacall_service— lights, locks, media), and Smartcar (perceive a connected vehicle across ~30 brands — location/battery/fuel — and act:lock/unlock, charge)
Point it at a https://… endpoint, a postgres://… / mongodb://… / redis://…
DSN, a grpc://… target, or another MCP server — discovery identifies the
interface, learns its shape, and hands your agent typed records. The same
fetch/query/write works regardless of what's underneath. No per-service
connector to hand-write; the integration maintains itself when the upstream
changes.
You hand-write no connector and no schema: an LLM learns the interface once at setup (databases introspect themselves and skip even that), and the integration repairs itself when the upstream drifts. The runtime is plain deterministic transport — predictable cost, reproducible behavior, nothing to babysit.
Built for the constraints real agents hit
Reaching everything is half of it. The other half is that agents pay for every token, get confused by inconsistent shapes, and can't parse error prose. Liquid answers each with a concrete primitive — all shipped, all on PyPI.
Context-budget control
Cross-source normalization
Timestamps (Unix / ISO 8601 / RFC 2822) collapse to UTC datetime; pagination
envelopes ({data:[…]} / {results:[…]} / Link headers) flatten; ID fields
normalize across id / _id / uuid / *_id.
Canonical intents — one mental model across services
Structured recovery — agents self-heal without parsing text
Every error carries a Recovery with next_action: ToolCall, retry_safe, and
retry_after_seconds. 401 → store_credentials. 404/410 → repair_adapter. 429
→ retry after the given delay. And when the upstream's schema drifts, adapters
self-heal (repair_adapter) — the agent keeps working.
Predictable cost — know before you call
Tools emitted by to_tools() carry a metadata block (cost_credits,
typical_latency_ms, cached, idempotent, side_effects, related_tools) so
the agent can reason about which tool to pick — and ambient tools
(liquid_check_quota, liquid_list_adapters, …) let it ask about state instead
of memorizing it.
Measured impact
Deterministic benchmarks on realistic agent tasks (500-order, 200-ticket
fixtures, mocked HTTP) — reproducible via python -m benchmarks.run:
Full methodology + per-task breakdown: benchmarks/RESULTS.md.
Install
Do you need an LLM extra? Self-describing interfaces — OpenAPI, GraphQL,
gRPC, MCP, A2A, WSDL — and all databases (introspection) discover with no
LLM, and the whole runtime (fetch/query/write/sense) never calls a
model. You only need an LLM backend to discover a REST API that has no
machine-readable spec (heuristic + LLM) and to map its fields. [discovery]
pulls LiteLLM, which reaches OpenAI / Gemini / Anthropic / local / 100+ providers;
or pick one directly:
The core is dependency-free — every backend's library is an optional extra, imported only when used.
See it work — live, no pre-config
Point Liquid at an API it has never seen (no adapter, no OpenAPI spec, no auth)
and get typed records back — you write no connector; discovery + mapping is the
only place a model runs. Runnable end to end via
examples/live_quickstart.py:
You wrote no connector, no schema, no auth glue — Liquid learned the interface for you, and will re-learn it if it changes. That's the point: integrations you don't build or babysit.
Run as an MCP server (open source, self-hosted)
Expose the engine to any MCP client (Claude Desktop, Cursor, Claude Code) — it runs in your own process, no cloud, no account, no lock-in:
One-click in Cursor (the button writes the server into your mcp.json; add your
OPENAI_API_KEY in Cursor's MCP settings afterward). Or set it up manually:
Zero-install with uvx (the liquid-mcp
package makes the command run by name) — Claude Code:
Claude Desktop / any MCP client:
(Or after pip install liquid-api, drop uvx and use "command": "liquid-mcp" directly.)
One-click in Claude Desktop: install the .mcpb bundle —
it prompts for your model key on install (stored in the OS keychain), with no JSON
to edit. Requires uv on the machine.
Tools: liquid_connect (discover + map any interface), liquid_fetch,
liquid_query (server-side search/aggregate), liquid_estimate (pre-flight
cost/size, no call), liquid_list_adapters, liquid_discover. The surface is
read-only by default; start the server with LIQUID_ALLOW_WRITES=1 to also
expose liquid_execute (database insert/update/delete). Adapters and credentials
persist under ~/.liquid. Backed by any LLM — OpenAI, Gemini, Anthropic, any
OpenAI-compatible/local endpoint via base_url, 100+ providers via LiteLLM,
or your own function through CallableBackend.
Quick start — LangGraph agent
The agent's tools come with rich descriptions (WHEN to use, NOT FOR what, return shape, cost), structured recovery on every error, and server-side search so it never pulls 500 orders to find 5.
Every interface, one API
Discovery identifies the target and tags each endpoint with a protocol; a
pluggable transport driver runs it — but the agent-facing API (fetch, query,
write, mapping, recovery, cache, rate limits) is identical across all of them.
Read and write. liquid.write(adapter, endpoint, op="insert", values={...}, allow_write=True) mutates any database (SQL INSERT/UPDATE/DELETE, Mongo
insert/update/delete, Redis SET/HSET/DEL, Neo4j node CRUD); web/agent
writes go through verified actions. Identifiers come from introspection and
values are parameterized; update/delete require a where (no blanket
mutations); writes are off until you opt in with allow_write=True.
Sense — the afferent organ. liquid.sense(adapter, endpoint) perceives a live
event stream wherever one exists: SQL row deltas (and Postgres LISTEN/NOTIFY),
Redis pub/sub, WebSocket frames, HTTP server-push (SSE/NDJSON), and MCP
notifications — each yielded as a modality-agnostic event. Pointed inward,
liquid.sense_webhook(port=…, verifier=…) hosts an inbound endpoint so a service
(or a human, via a webhook) POSTing to the agent becomes a perceivable signal
too. All bounded by max_events / max_seconds, so an agent can drain-by-pull.
The sensorimotor loop. react(stream, handler) drives a handler for each
perceived event — with error isolation and bounded concurrency — so a host can
perceive → wake the agent → act. merge_senses(*streams) fans several senses
into one loop, so one agent can watch a database, a queue, and a webhook at once:
Discovery is automatic — and identifies on the fly. Before the pipeline runs,
a fingerprint step names the target: a bare host:port is normalized by
well-known port (db:5432 → postgresql://db:5432), and liquid.identify(url)
answers "what is this, and is its driver installed?" with an install hint when a
backend is missing. (Identifying a protocol is feasible on the fly; speaking a
new authenticated binary protocol isn't — so unknowns are named, not guessed at.)
Add a backend without writing code. For the SQL family the contract is
declarative enough to be data: a dialect manifest (quoting, placeholder
style, pagination, introspection SQL, error map, DBAPI2 module) registered via
register_sql_manifest({...}) installs a working driver + discovery — so a new
SQL / wire-compatible store (CockroachDB, ClickHouse, any DBAPI2 driver), even one
fetched from the network as JSON, connects without a release. New protocols
otherwise plug in via the liquid.transport.ProtocolDriver protocol; SQL backends
share a dialect-aware core, so a new one is a ~80-line adapter.
Want to teach Liquid a new protocol? A complete transport driver
(fetch/write/sense) is typically ~150 lines — see
docs/ADDING_A_DRIVER.md for the walkthrough and a
wishlist (CAN bus, CoAP, KNX, AMQP, NATS, SNMP, …). Contributions welcome.
2,500+ APIs are pre-discovered and pre-mapped in the global catalog — most popular services connect with zero discovery cost.
Architecture
AI participates at setup only. Runtime is pure transport with transforms — no
LLM per call, predictable cost, reproducible behavior (except search_nl, which
caches its compilations).
Swappable components
Every cross-cutting concern is a Protocol you can replace:
In-memory implementations ship for all of them; liquid-cloud provides
PostgresVault, RedisCache, etc. for hosted deployments.
Framework support
Framework integration
No extra packages to install — it's built into liquid-api.
adapter.to_tools(format="anthropic" | "openai" | "mcp") emits ready-to-use tool
definitions for Claude tool use, OpenAI function calling (which LangChain /
LangGraph and CrewAI consume directly), and any MCP client (Claude Desktop,
Cursor, …). The bundled liquid-mcp server also exposes Liquid as MCP tools out
of the box.
Comparison
Documentation
- Quickstart — discover → map → fetch, plus the no-LLM runtime
- OSS vs. Cloud — the honest boundary: free/self-hosted vs. hosted
- Architecture
- Extending — implement your own Vault / LLM / Sink
- Write operations spec
來源:README.md,提交 c904bd8
工具
0版本歷史
1- v0.2.0最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。