(评论)
(comments)

原始链接: https://news.ycombinator.com/item?id=43520953

Hacker News上的一篇文章介绍了一个名为`pg-mcp` (github.com/stuzero) 的新开源项目。这是一个云就绪的PostgreSQL模型上下文协议(MCP)服务器,旨在促进大型语言模型(LLM)、代理和PostgreSQL数据库之间的交互。 `pg-mcp`支持结构化模式检查、安全的只读查询执行以及通过其EXPLAIN工具进行查询优化。其主要功能包括多租户支持、HTTP/SSE通信(而不是stdio)、带有数据库描述的模式自省以及基于YAML的插件支持(例如pgvector和PostGIS)。它以容器形式运行,可以通过http://localhost:8000/sse访问。 评论者runako建议在文档中添加使用示例,以更好地理解MCP。


原文
Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Cloud-Ready Postgres MCP Server (github.com/stuzero)
6 points by spennant 46 minutes ago | hide | past | favorite | 1 comment
Hey HN,

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's multi-tenant and runs over HTTP/SSE (not stdio)

Features - Supports multiple database connections from multiple agents

- Schema Introspection: Returns table structures, types, indexes and constraints; enriched with descriptions from pg_catalog. (for well documented databases)

- Read-Only Queries: Controlled execution of queries via MCP.

- EXPLAIN Tool: Helps smart agents optimize queries before execution.

- Extension Plugins: YAML-based plugin system for Postgres extensions (supports pgvector and postgis out of the box).

- Server Mode: Spin up the container and it's ready to accept connections at http://localhost:8000/sse











I'm still trying to grok MCP, would be awesome if you could include usage examples in the doc.

Good luck!







Join us for AI Startup School this June 16-17 in San Francisco!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact



Search:
联系我们 contact @ memedata.com