
Kaiva Postgres MCP
ai.kaiv由 kaiv.ai 發布v0.1.1更新於 Oct 26, 2026
Read-only PostgreSQL MCP server. Drop-in replacement for the archived server-postgres.
發布方自己的服務:Kaiva Bridge
概覽
唯讀的 PostgreSQL MCP 伺服器,讓助理執行單一唯讀 SQL 語句並檢視資料表結構。
- 可以做什麼
- 執行單一唯讀 SQL 語句(SELECT、WITH、VALUES、TABLE、SHOW 或 EXPLAIN),以 JSON 回傳結果列
- 列出該登入可讀取的資料表與檢視表,含類型、預估列數與註解
- 描述單一資料表的欄位、主鍵、唯一鍵與外鍵、參照它的資料表以及索引
- 比照已封存的 server-postgres,把每張資料表的欄位以資源形式提供
- 適用情境
- 適合讓助理在不寫入資料庫的前提下回答 PostgreSQL 資料問題,或用來替換已封存的 server-postgres,同時保留相同的 query 工具與資料表結構資源。
- 執行需求
- 透過 npm 套件 @kaiva/postgres-mcp 以 stdio 在本機執行(npx 或 Docker 映像)。需要 PostgreSQL 連線 URL,作為第一個參數或放在 DATABASE_URL 中,TLS 選項如 sslmode 寫在 URL 裡。建議使用唯讀登入。僅支援桌面用戶端。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Kaiva Postgres MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Kaiva Postgres MCP
The Postgres MCP server that stays read-only. A drop-in replacement for the archived
@modelcontextprotocol/server-postgres.
Switch in one line
Where your AI client starts the archived server today:
change the package name:
In Claude Code:
The query tool, its sql input and the table schema resources are the same, so nothing else
changes.
Other ways in, with DATABASE_URL set in your environment:
- Claude Code plugin:
/plugin install postgres-mcp --marketplace ai-kaiva/postgres-mcp - Gemini CLI extension:
gemini extensions install https://github.com/ai-kaiva/postgres-mcp, thengemini extensions config kaiva-postgres-mcpto enter the database URL - Docker:
docker run -i --rm -e DATABASE_URL ghcr.io/ai-kaiva/postgres-mcponce the image is published
Why switch
The archived server is no longer maintained: Anthropic archived it in 2025 as a reference example
rather than production software, and npm marks it "Package no longer supported". It runs whatever
text it is given inside BEGIN TRANSACTION READ ONLY, and that is not enough:
COMMIT; DROP SCHEMA public CASCADEends the read-only transaction and drops the schema (reported by Datadog Security Labs in August 2025; the fix never reached npm, where 0.6.2 is still the latest version).- With a superuser login, which is what most local and Docker installs start with, one statement
can run a shell command on the database server: PostgreSQL runs
COPY ... TO PROGRAMinside a read-only transaction.
We checked both against version 0.6.2 on PostgreSQL 14: both ran. Kaiva Postgres MCP refuses both.
Tools
query: run one read-only SQL statement (SELECT,WITH,VALUES,TABLE,SHOWorEXPLAIN) and get the rows as JSON.list_tables: the tables and views this login can read, with type, estimated row count and comment.describe_table: one table's columns, primary key, unique and foreign keys, the tables that reference it, and its indexes.
Resources: each table's columns, as the archived server listed them.
How read-only is enforced
On every call:
- The SQL is checked before it is sent: one statement, starting with
SELECT,WITH,VALUES,TABLE,SHOWorEXPLAIN, calling no function that reaches past the transaction (dblink, server file functions,lo_importandlo_export,pg_terminate_backend, advisory locks, and functions that run SQL given to them as text). - It runs alone, through PostgreSQL's extended query protocol, which refuses a second statement,
inside a
READ ONLYtransaction with a statement time limit and a lock time limit. - The transaction is always rolled back, and
DISCARD ALLresets the session, so nothing a statement sets up outlives it.
Only the first 1,000 rows are fetched from the database (one more is read, to know whether more exist), so a query over a large table returns quickly.
Use a login that can only read
The strongest guard is a login that cannot write. Run this once as an administrator, then put
mcp_readonly in the connection URL:
To see what a login can do:
Options
Give the connection URL as the first argument, or set DATABASE_URL. TLS settings go in the URL
(sslmode, sslrootcert), as with psql.
What it does not protect
- Anything the login can read, the AI can read: tables, views and foreign tables, and with a
superuser the system catalogs too (
pg_authidholds password hashes). Use a login that sees only the tables you mean to share. - The refused-function list is a second guard, not a sandbox. It sees the SQL the AI sends, not what
a view, a foreign table (
file_fdw) or a function already defined in your database does when it is read. With a superuser login such an object can still read a file on the database server. With a login that can only read, PostgreSQL itself refuses (checked: a view overpg_read_filereads the file as a superuser and is refused as a read-only login). - "This machine" means localhost, 127.x, ::1, a Unix socket,
*.localhostandhost.docker.internal(the Docker host). Anywhere else, Docker Compose service names and private network addresses included, a superuser is refused unless--allow-superuseris given.
In Claude.ai, ChatGPT or for your team
This package runs on your machine. To use the same database from Claude.ai or ChatGPT, or share it
with your team behind sign-in, Kaiva Bridge serves it as a managed MCP server. In a project folder
whose .env holds DATABASE_URL:
Your database must be reachable from the internet. https://kaiv.ai/bridge?utm_source=postgres-mcp&utm_medium=readme
License
MIT
來源:README.md,提交 bcb5e90
工具
0版本歷史
2- v0.1.1最新Oct 21, 2026
- v0.1.0Oct 19, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Kaiv 整合

Kaiva Bridge
ai.kaiv官方發布者
Kaiva Bridge 是託管式 MCP 伺服器,讓助理列出、檢視、草擬並重新整理由 OpenAPI 規格、資料庫或文件產生的託管 MCP 伺服器。
Version Truth
ai.kaiv官方發布者
讓助理查詢 300 多個產品的最新版本、LTS 支援期與終止支援(EOL)日期。
Is It Down
ai.kaiv官方發布者
一個遠端 MCP 伺服器,用來查詢 GitHub、npm 等常見開發者服務目前是正常、降級還是故障。
Email Check
ai.kaiv官方發布者
遠端 MCP 伺服器,讓助理檢查網域的郵件設定:MX 可投遞性、SPF 與 DMARC 防偽造狀況。
Docker Facts
ai.kaiv官方發布者
一個遠端 MCP 伺服器,讓助理查詢 Docker Hub 映像檔資訊:映像檔與標籤是否存在、大小、支援的平台以及儲存庫狀態。