TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Cloud-Ready Postgres MCP Server

167 点作者 spennant大约 2 个月前
Hey HN,<p>I built pg-mcp, a Model Context Protocol (MCP) server for PostgreSQL that provides structured schema inspection and query execution for LLMs and agents. It&#x27;s multi-tenant and runs over HTTP&#x2F;SSE (not stdio)<p>Features - Supports multiple database connections from multiple agents<p>- Schema Introspection: Returns table structures, types, indexes and constraints; enriched with descriptions from pg_catalog. (for well documented databases)<p>- Read-Only Queries: Controlled execution of queries via MCP.<p>- EXPLAIN Tool: Helps smart agents optimize queries before execution.<p>- Extension Plugins: YAML-based plugin system for Postgres extensions (supports pgvector and postgis out of the box).<p>- Server Mode: Spin up the container and it&#x27;s ready to accept connections at <a href="http:&#x2F;&#x2F;localhost:8000&#x2F;sse" rel="nofollow">http:&#x2F;&#x2F;localhost:8000&#x2F;sse</a>

10 条评论

saberience大约 2 个月前
Just for everyone here, the code for &quot;building an MCP server&quot;, is importing the standard MCP package for Typescript, Python, etc, then writing as little as 10 lines of code to define something is an MCP tool.<p>Basically, it&#x27;s not rocket science. I also built MCP servers for Mysql, Twilio, Polars, etc.
评论 #43524509 未加载
评论 #43523615 未加载
评论 #43524890 未加载
1zael大约 2 个月前
This is wild. Our company has like 10 data scientists writing SQL queries on our DB for business questions. I can deploy pg-mcp for my organization so everyone can use Claude to answer whatever is on their mind? (e.x.&quot;show me the top 5 customers by total sales&quot;)<p>sidenote: I&#x27;m scared of what&#x27;s going to happen to those roles!
评论 #43522440 未加载
评论 #43521973 未加载
评论 #43523492 未加载
评论 #43522265 未加载
评论 #43523063 未加载
评论 #43522042 未加载
评论 #43522213 未加载
评论 #43522569 未加载
fulafel大约 2 个月前
From docker-compose<p><pre><code> ports: - &quot;8000:8000&quot; </code></pre> This will cause Docker to expose this to the internet and even helpfully configure an allow rule to the host firewall, at least on Linux.
评论 #43523022 未加载
tudorg大约 2 个月前
This is great, I like in particular that there are extensions plugins. I’ll be looking at integrating this in the Xata Agent (<a href="https:&#x2F;&#x2F;github.com&#x2F;xataio&#x2F;agent" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;xataio&#x2F;agent</a>) as custom tooling.
评论 #43524797 未加载
scottpersinger大约 2 个月前
Where&#x27;s the pagination? How does a large query here not blow up my context:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;stuzero&#x2F;pg-mcp&#x2F;blob&#x2F;main&#x2F;server&#x2F;tools&#x2F;query.py#L8" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;stuzero&#x2F;pg-mcp&#x2F;blob&#x2F;main&#x2F;server&#x2F;tools&#x2F;que...</a>
评论 #43528935 未加载
jillesvangurp大约 2 个月前
Is there more to MCP than being a simple Remote Procedure Call framework that allows AI interactions to include function calls driven by the AI model? The various documentation pages are a bit hand wavy on what the protocol actually is. But it sounds to me that RPC describes all&#x2F;most of it.
评论 #43526106 未加载
评论 #43524687 未加载
oulipo大约 2 个月前
Nice!<p>What I&#x27;d be looking for is a MCP server where I can run in &quot;biz&#x2F;R&amp;D exploration-mode&quot;, eg:<p>- assume I&#x27;m working on a replica (shared about all R&amp;D engineers) - they can connect and make read-only queries to the replica for the company data - they have a temporary read-write schema just for their current connection so they can have temporary tables and caches - temporary data is deleted when they close the session<p>How could you make a setup like that so that when using your MCP server, I&#x27;m not worried about the model &#x2F; users modifying the data, but only doing their own private queries&#x2F;tables?
ahamilton454大约 2 个月前
I don’t understand the advantage of having the transport protocol be HTTP&#x2F;SSE rather than studio especially in this case when it’s literally running locally.
评论 #43525068 未加载
runako大约 2 个月前
I&#x27;m still trying to grok MCP, would be awesome if you could include usage examples in the doc.<p>Good luck!
评论 #43521288 未加载
评论 #43523176 未加载
评论 #43522237 未加载
评论 #43522118 未加载
revskill大约 2 个月前
Everytime i see a cloud API_KEY is required, i&#x27;m off.
评论 #43521878 未加载
评论 #43521938 未加载
评论 #43523543 未加载