Maplith Bridge

com.maplith由 maplith.com 發布v1.2.0-rc.1更新於 Oct 24, 2026

Share a folder of data files read-only over MCP, and fill it from PostgreSQL under a read-only role.

發布方自己的服務:Maplith

已驗證STDIO僅桌面資料庫檔案與儲存

概覽

AI 產生的概覽

Maplith Bridge 透過 MCP 以唯讀方式分享一個資料資料夾,並可用唯讀角色從 PostgreSQL 填入該資料夾。

可以做什麼
  • 列出並讀取共用資料夾中的檔案:list_files 與 read_file,以及 resources/list 和 resources/read,每個最上層資料夾視為一個系統。
  • 從 PostgreSQL 填入資料夾:擷取器為每張表寫一個 CSV 檔,並寫一份包含資料表、欄位、鍵與列數估算的 schema 檔。
  • 擷取前檢查資料庫角色:檢查模式只驗證角色是否唯讀,不寫入任何內容。
  • 管理存取:一個指令即可輪替權杖,並可用允許選項限制呼叫方。
  • 以 HTTP 在本機提供資料夾,或以 stdio 提供給單一本機代理。
適用情境
當代理需要唯讀存取一個匯出的資料資料夾,或存取以 CSV 匯出的 PostgreSQL 資料表,又不想交出資料庫憑證時使用。適合資料必須留在自有網路、代理只應讀取的場合。
執行需求
需要 Node.js 24 或更新版本,透過 npx 執行。需先用 rotate-token 指令產生權杖,並以 Authorization bearer 標頭傳入;stdio 模式會自行產生權杖。需要一個共用資料夾,由目錄選項或 EXPORT_DIR 變數指定。擷取時還需 PostgreSQL 連線設定,如 PGHOST、PGDATABASE、PGUSER,以及僅能讀取的角色。
安裝前請注意
此 bearer 權杖可讀取共用資料夾,應妥善保管權杖檔案,外洩後立即輪替。擷取器需要僅能讀取的資料庫角色,權限更大的角色會被拒絕。檔案內容來自你的系統並會傳給代理,應視為資料而非指令。除非設定 TLS 或指定反向代理,伺服器僅在本機監聽。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Maplith Bridge,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Maplith for your agents

[CI] [OpenSSF Scorecard] [Built by Maplith]

Maplith maps how a company's systems fit together, so any AI agent can find the data it needs, by which key, and how far to trust each step. This repository holds the open-source parts that run on your side, next to your agent and your data. One product, three parts:

PartWhat it doesWhere
Plugin for Claude Code and CodexMaplith in your coding agent with one install: the hosted map over MCP (you sign in; nothing is pasted), Maplith Bridge for a local folder, and a skill that says when and how to use them.plugins/maplith/
Maplith BridgeConnect your database to your AI agent, read-only, without giving anyone your password.this page, from Quick start
Maplith WakeStart your own Claude agent the moment there is work for it, from a small relay in your own account.wake-relay/

All of it is one npm package, maplith, with one command: maplith setup puts Maplith in your agent, and maplith bridge is Maplith Bridge.

Set Maplith up in your agent

No account? You create one in the browser window that opens when you sign in, and come straight back. Your agent then builds your first map with you.

One command, with Node.js 24 or newer. It runs your agent's own commands and writes no key anywhere:

sh
npx --yes [email protected] setup claudenpx --yes [email protected] setup codex

Or by hand. Claude Code:

text
/plugin marketplace add Maplith/agents/plugin install maplith@maplith

then run /mcp, choose maplith and Authenticate. OpenAI Codex:

sh
codex plugin marketplace add Maplith/agentscodex plugin add maplith@maplithcodex mcp login maplith

Codex does not pass your environment to a plugin's servers, so to share a folder with Codex through the Bridge, name it once: npx --yes [email protected] setup codex --dir <folder>.

Everything here is Apache-2.0.

Maplith Bridge

Connect your database to your AI agent, read-only, without giving anyone your password.

The Bridge runs in your own network. It shares one folder of data files over MCP (the Model Context Protocol), behind a token you create, and it can fill that folder from PostgreSQL under a database role that can only read.

  • Read-only, end to end. The server has no method that writes and accepts no file. The extractor refuses to run under a role that can do more than read.
  • Your password stays with you. The database password never leaves the machine the extractor runs on, and the server that faces the network never holds it.
  • Small enough to read. Six files of TypeScript: four for the Bridge, and the maplith command and its setup. The server runs on Node.js alone; the extractor has one dependency, the PostgreSQL client, pinned.

Any MCP client can use it: Claude Code, Codex, Claude Desktop, your own agent. It works best with Maplith, which reads the folder to map how your systems fit together.

Quick start

You need Node.js 24 or newer.

sh
npx --yes [email protected] bridge rotate-tokennpx --yes [email protected] bridge serve --dir ./exports

The first command writes a random token to maplith-bridge.token, readable by you only. The second serves the files in ./exports at http://127.0.0.1:8787/mcp, on this machine only. Point any MCP client at that address with the header Authorization: Bearer <the token>. With Claude Code:

sh
claude mcp add --transport http bridge http://127.0.0.1:8787/mcp \  --header "Authorization: Bearer $(cat maplith-bridge.token)"

To fill the folder from PostgreSQL, under a read-only role:

sh
PGHOST=db.example.com PGDATABASE=shop PGUSER=bridge_reader \  npx --yes [email protected] bridge extract postgres --out ./exports --check

--check verifies the role and writes nothing. Run it again without --check to write one CSV file per table.

Beside the CSV files of each folder, the extractor writes maplith-schema.json, which the server shares like any other file: for each table, its file, its columns with their PostgreSQL attribute numbers and types, its keys and its estimated row count. It holds names and numbers, never a value, and names the database only by a digest of its identity (below). A reader can tell from it that a renamed column is the same column (its attribute number stays) and that a column dropped and added again is a new one (it gets a new number).

A restore keeps the relation ids and attribute numbers it had, and the next ADD COLUMN can reuse a number that a later state had given another column. So the digest is made of the server's system identifier and timeline, when its statistics were last reset, the database's id and name, and an epoch the extractor keeps in the folder, and it changes when the extractor sees that the database's history did not go on from its last run: another server or database, a new timeline (a point-in-time recovery or a promotion), a reset of the server's statistics (every start that has to recover resets them: after a crash, or from a restored snapshot or base backup), a table or column whose catalog entry was written again before that run (an earlier copy restored, then changed), or no record of that run in the folder (a first run, a new install, another folder: its record starts with an epoch of its own, drawn at random, so it never states the digest another folder stated). One restore goes unseen: a copy of the data directory taken while the server was stopped and started again as it was, changed only once its transaction counter had passed where the original's stood at the extractor's last run (or restored together with the extractor's folder). The same numbers can then name other columns under the same digest.

Where the role may not read the system identifier, the timeline or when the statistics were last reset, the file names no database ("database": null), and its numbers describe that run only: a restore into a fresh server can give the same relation ids again, and it renumbers the attribute numbers.

Run any command with --help for every option.

Set it up for real

  • RUNBOOK.md: a server install, step by step, for the person who runs it: two system users, the read-only role, TLS, a systemd service.
  • INSTALL-WITH-YOUR-AGENT.md: one prompt that has your own AI agent do the same install, stopping for you at every decision, password and sudo.

How it keeps your data safe

RiskWhat the Bridge does
Someone on the internet calls itEvery request needs the token: 256 random bits, compared in constant time. Wrong tokens are counted and slowed down. It listens on this machine only unless you give it TLS or name the reverse proxy in front of it, and it refuses plain HTTP on any other address.
The token leaksIt opens one folder, read-only, and nothing else. rotate-token replaces it in one command, without a restart. --allow limits who may call.
Something harmful is sent inNothing is written, uploaded or run. A request is at most 64 KB of JSON and is never evaluated.
A request reaches outside the folderNot through .., a symbolic link or a hidden file. Only CSV, TSV, JSON, JSONL, Markdown and text files are served.
Your database passwordIt stays on the extractor's machine, is never printed or written, and is sent only to the database: over verified TLS by default when the database is on another machine.
A tampered packageReleases are built in public CI with provenance, and carry a checksum and a build attestation. The published package runs no install script.
A file tries to instruct an agentThe server tells every client that file contents are data, not instructions.

THREAT-MODEL.md names the tests behind every row.

Verify a release

Every release on GitHub carries the tarball, its SHA-256 checksum and a build attestation. The same tarball is published to npm with provenance, so npm's digest of it must match the file from GitHub: the two sha512- lines below are equal.

sh
sha256sum -c maplith-1.2.0-rc.1.tgz.sha256echo "sha512-$(openssl dgst -sha512 -binary maplith-1.2.0-rc.1.tgz | openssl base64 -A)"npm view [email protected] dist.integritygh attestation verify maplith-1.2.0-rc.1.tgz --repo Maplith/agents \  --bundle maplith-1.2.0-rc.1.tgz.sigstore.json

After installing from npm, npm audit signatures checks the registry signature and the provenance.

Use it from any MCP client

The Bridge speaks MCP 2025-06-18 (and 2025-03-26, 2024-11-05) over Streamable HTTP: JSON-RPC 2.0 requests by POST to /mcp. It offers:

  • resources: resources/list (100 per page, with a cursor) and resources/read;
  • two read-only tools on the same code path: list_files and read_file.

Each top-level folder is one system: exports://shop/orders.csv is the file orders.csv of the system shop. A file is listed only when it fits in one reply of at most 8 MB. GET /healthz answers 204 for a health check.

File contents come from your systems. Tell your agent to treat them as data, never as instructions; the Bridge says the same in its instructions.

Use it from an agent on this machine

An agent that starts its MCP servers as local commands, such as Claude Code, can start the Bridge itself:

sh
npx -y [email protected] bridge stdio --dir ./exports

stdio serves the folder to that one agent over its stdin and stdout: the same server as serve, on 127.0.0.1 only, behind a token that lives only in its process. There is no token file and nothing to type. The folder comes from --dir or EXPORT_DIR; without one it serves an empty folder and says how to name one. The Maplith plugin starts it this way: in Claude Code with the folder from MAPLITH_BRIDGE_DIR, in Codex with the folder setup codex --dir names. The older command maplith-bridge still works, as maplith bridge. To share a folder with Maplith or with an agent on another machine, use serve.

For MCP directories

A directory of MCP servers, such as Glama, builds this repository in a sandbox and inspects the server over stdio, with no folder and no token to give it. glama-stdio.ts is the entry for that, and only for that:

  • it creates an empty folder of its own, so there is nothing to share;
  • it draws a random token that lives only in its memory: never in a file, an argument, the environment or a log;
  • it starts the Bridge's own server on 127.0.0.1, on a free port, serving that folder behind that token;
  • it relays MCP between stdin and stdout and that server, one JSON-RPC message per line, and logs to stderr only;
  • when stdin ends, or on SIGTERM, it stops the server and removes the folder.

A directory sees the Bridge as it is: its initialize reply and instructions, the tools list_files and read_file, and an empty list of files. The entry takes no argument and cannot share a folder: serve does that. It is in this repository, not in the npm package.

With Node.js 24 or newer, from a checkout:

sh
npm ci --ignore-scriptsnode glama-stdio.ts

A directory that speaks HTTP to its sandbox puts mcp-proxy in front of it: mcp-proxy -- node glama-stdio.ts. On Glama, the server's settings are:

SettingValue
Node.js version24
Build steps["npm ci --ignore-scripts"]
CMD["mcp-proxy", "--", "node", "glama-stdio.ts"]
Environment variablesnone

Limits

  • PostgreSQL is the one database the extractor reads. Any other system can fill the folder with its own export files.
  • The server reads a TLS certificate when it starts: restart it after a renewal.
  • Behind two proxies in a row, name both with --behind-proxy.

Versioning

The Bridge follows semantic versioning. Every change is in CHANGELOG.md.

Contributing, security, licence

來源:README.md,提交 d9373c1

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:該軟體包類型無法在沙箱中執行。

版本歷史

2
  1. v1.2.0-rc.1最新Oct 22, 2026
  2. v1.0.0-rc.1Oct 10, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Maplith 整合