Live
Black Hat USAAI BusinessBlack Hat AsiaAI BusinessWhy do I believe preserving structure is enough?LessWrong AILinear Regression Explained: The Only 6 Terms You Need to KnowTowards AIInternet Watch Foundation finds 260-fold increase in AI-generated CSAM in just one year, and it s the tip of the icebergFortune TechMCP Observability: Logging, Auditing, and Debugging Agent-Server Interactions in ProductionDEV CommunityHIMSSCast: Adopting AI with purpose as a health system - MobiHealthNewsGNews AI healthcareEfficient Real-Time Flight Tracking in Browsers: Framework-Free, Cross-Platform SolutionDEV CommunityI Built a Visual Spec-Driven Development Extension for VS Code That Works With Any LLMDEV CommunityFinancialClaw: making OpenClaw useful for personal financeDEV CommunityOpenAI acquires TBPNDEV CommunityA Human Asked Me to Build a Game About My Life. So I Did.DEV CommunityFinancialClaw: haciendo útil a OpenClaw para finanzas personalesDEV CommunitySources: Meta has paused its work with Mercor while it investigates a security breach at the data vendor; OpenAI says it is investigating the security incident (Wired)TechmemeBlack Hat USAAI BusinessBlack Hat AsiaAI BusinessWhy do I believe preserving structure is enough?LessWrong AILinear Regression Explained: The Only 6 Terms You Need to KnowTowards AIInternet Watch Foundation finds 260-fold increase in AI-generated CSAM in just one year, and it s the tip of the icebergFortune TechMCP Observability: Logging, Auditing, and Debugging Agent-Server Interactions in ProductionDEV CommunityHIMSSCast: Adopting AI with purpose as a health system - MobiHealthNewsGNews AI healthcareEfficient Real-Time Flight Tracking in Browsers: Framework-Free, Cross-Platform SolutionDEV CommunityI Built a Visual Spec-Driven Development Extension for VS Code That Works With Any LLMDEV CommunityFinancialClaw: making OpenClaw useful for personal financeDEV CommunityOpenAI acquires TBPNDEV CommunityA Human Asked Me to Build a Game About My Life. So I Did.DEV CommunityFinancialClaw: haciendo útil a OpenClaw para finanzas personalesDEV CommunitySources: Meta has paused its work with Mercor while it investigates a security breach at the data vendor; OpenAI says it is investigating the security incident (Wired)Techmeme
AI NEWS HUBbyEIGENVECTOREigenvector

Why pgEdge thinks MCP (not an API) is the right way for AI agents to talk to databases

The New Stackby Adrian BridgwaterApril 2, 20265 min read1 views
Source Quiz

The Postgres open-source object-relational database system can trace its history back to some three decades, but it s no artifact. Its The post Why pgEdge thinks MCP (not an API) is the right way for AI agents to talk to databases appeared first on The New Stack .

The Postgres open-source object-relational database system can trace its history back to some three decades, but it’s no artifact.

Its extensibility, data integrity, and performance for complex queries (along with its evolution to PostgreSQL) mean it’s still around today. Now ready to evolve for the AI era, pgEdge announced on Thursday that it offers MCP Server for Postgres.

The new service is described as a production-ready MCP server for developers building agentic AI applications in environments with connectivity requirements between AI models and local or remote data.

Database agnosticism, believe it

Aiming to differentiate itself through data-source agnosticism, pgEdge MCP Server for Postgres works with new and existing databases running any standard version of Postgres, which, in practical terms, means version 14 (which arrived in late 2021 with its high-concurrency workload capabilities) and newer. The service boasts flexible deployment options, including on-premises, self-managed cloud, and managed cloud via pgEdge Cloud.

Without the predefined tools supplied by MCP servers, LLMs and agents are prone to hallucinating API calls and parameters or using incorrect or outdated versions of the API.

It even works in air-gapped environments such as battleships, nuclear power plants, some research labs, and bank vaults. So that’s what the pgEdge MCP server does, but why should developers actually be sold on this whole technology proposition?

“The features we think developers will find most compelling are built-in security, full schema introspection, and reduced token usage.”

Phillip Merrick, co-founder and chief product officer at pgEdge, thinks he can sell us both the sizzle and the sausage here.

“The features we think developers will find most compelling are built-in security, full schema introspection, and reduced token usage,” Merrick tells The New Stack. “Security features include support for HTTPS and TLS, user- and token-based authentication, and switchable read-write access, with the default read-only.

“Full schema introspection means the LLM has access not just to the tables and columns, but also to primary keys, foreign keys, indexes, column types, and constraints. Given that tokens are a rationed resource, developers will appreciate the optimizations employed by the pgEdge MCP server to significantly reduce token usage.”

The pgEdge MCP Server for Postgres works with AI application builders and code generators such as Claude Code, Cursor, Windsurf, and VS Code Copilot. It supports frontier models from OpenAI and Anthropic, as well as locally hosted models using Ollama, LM Studio, and other OpenAI API-compatible products.

Does the ABC of API beat MCP?

But away from the hullabaloo of MCP, can’t we just do things the way we’ve always done them with SQL queries, or (if we really have to modernize) by using developer tools to access an API connection?

“In general, it is preferable that developers themselves and their corresponding developer tools and agents utilize an MCP server versus an API to access the underlying capabilities or resources in a correct and efficient fashion. Without the predefined tools provided by MCP servers, LLMs and agents are prone to hallucinating API calls and parameters, or to using incorrect or outdated versions of the API. They can also end up consuming more tokens than might be necessary in the process,” Merrick says.

With Postgres, he says, there isn’t an API in the usual sense; instead, the alternative is to invoke the psql command line utility to run SQL queries directly. He asserts that the same concerns noted above apply here as well, particularly regarding excessive token usage, but additional concerns include the lack of guardrails imposed by an MCP server, e.g., using read-only mode by default.

Full schema introspection

In terms of its ability to analyze the information base it works with. The company’s MCP server retrieves detailed information about a database’s structure, beyond simply listing table and column names. So this means it gains information on primary keys (unique identifiers for every data record), foreign keys, indexes, column types, and constraints. This, in turn, allows the LLM to “reason about the data model” it is about to engage with rather than blindly querying it.

“By providing access to the full schema, the LLM can understand the relationships between the data items. This allows it to generate both application code and SQL that is correct and more performant. This information also allows the LLM to suggest optimizations to the schema, particularly since the pgEdge MCP Server also provides access to database stats,” Merrick tells us.

Additionally, this GA release adds custom tools, which can be written in SQL, Python, Perl or JavaScript. There is also a database administrator toolkit with pre-defined tools for analyzing database health, identifying top resource-consuming queries, and making index recommendations.

Tokens, tabs & optimizations

As an extra note on what real-world token-reduction developers should expect when switching from JSON to tab-separated values (TSV) usage, Merrick explains that the optimization of using TSV over JSON is internal to the LLM and the pgEdge MCP Server.

“In conjunction with our other token usage optimizations, specifically pagination of results and context window compaction, it can result in a reduction between 30% and 50%,” he concludes.

As with other pgEdge Postgres products, the pgEdge MCP Server for Postgres is fully open source via the Postgres license. It is fully supported by pgEdge’s team of Postgres contributors and developers. The pgEdge MCP Server for Postgres is available as a free download for all Postgres users and is now also available in the pgEdge Cloud managed service.

TRENDING STORIES

Group Created with Sketch.

Was this article helpful?

Sign in to highlight and annotate this article

AI
Ask AI about this article
Powered by Eigenvector · full article context loaded
Ready

Conversation starters

Ask anything about this article…

Daily AI Digest

Get the top 5 AI stories delivered to your inbox every morning.

Knowledge Map

Knowledge Map
TopicsEntitiesSource
Why pgEdge …open-sourceagentThe New Sta…

Connected Articles — Knowledge Graph

This article is connected to other articles through shared AI topics and tags.

Knowledge Graph100 articles · 165 connections
Scroll to zoom · drag to pan · click to open

Discussion

Sign in to join the discussion

No comments yet — be the first to share your thoughts!