pg-cve-mcp
This server provides AI agents with direct, programmatic access to PostgreSQL security intelligence, including CVEs, release safety, and upgrade recommendations.
get_cves(version)— Lists all CVEs affecting a specific PostgreSQL version, sorted by CVSS score.get_version_status(version)— Provides a comprehensive security summary for a version: EOL/yanked status, CVE count, max CVSS, exploit count, and latest minor release.compare_versions(v1, v2)— Compares CVE profiles of two versions, showing fixed, new, and still-present CVEs.get_upgrade_path(from_version)— Recommends the next upgrade target (minor update or major migration if branch is EOL/near-EOL).get_yanked_versions()— Lists all PostgreSQL releases flagged as yanked due to serious bugs.get_exploits()— Lists all CVEs with known public exploits, sorted by CVSS.get_latest_minor(major)— Finds the latest minor release in a given major branch.get_summary()— Provides an overview of the tracked CVE database, including counts and EOL/yanked statistics.
Provides tools for querying PostgreSQL CVEs, version status, upgrade paths, and exploits for any PostgreSQL version.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pg-cve-mcpWhat CVEs affect PostgreSQL 16.4?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pg-cve-mcp — PostgreSQL CVE & Release Intelligence for AI Agents
Give your AI assistant direct access to PostgreSQL security intelligence: CVEs, yanked releases, known exploits, and upgrade paths for any version — queried, not browsed.
Why pg-cve-mcp?
Browsing a CVE dashboard is a human habit. Agents need answers, not pages.
pg-cve-mcp turns the curated dataset of the PG_CVE project — the same one powering the PostgreSQL CVE Dashboard — into MCP tools that any AI assistant (opencode, Claude Desktop, etc.) can call directly. What was a static page becomes a first-class, programmatic part of your AI workflow.
Unlike raw NVD feeds, the PG_CVE dataset is manually curated to carry the same judgment a careful DBA would apply:
Yanked releases flagged with the real reason (e.g. "Data corruption using CONCURRENTLY")
Known exploits confirmed to exist in the wild
EOL branches marked, with a synthetic
CVE-EOL-WARNING(CVSS 10.0) prepended to unsupported reportsVerified CVEs — no false positives from automated scraping
What your agent can now do
Prompt to your agent | Tool used | Result |
"Is PostgreSQL 15.8 safe?" |
| EOL/yanked flags, release date, full CVE list sorted by CVSS |
"Compare 16.3 vs 16.4" |
| fixed / new / still-present CVEs with release dates |
"Should I upgrade from 14.10?" |
| recommended target + the CVEs it fixes + release dates |
"Any known exploits right now?" |
| all exploitable CVEs, sorted by CVSS, with release dates |
"What does this database track?" |
| stats, EOL and yanked-release overview |
Agent-first design
Every tool returns structured JSON, sorted by CVSS (highest first). Tools flag yanked and EOL state explicitly on the version metadata, and include release dates for every version. get_upgrade_path distinguishes a safe minor upgrade from a forced major one when a branch is at or near end-of-life — so the agent can give advice, not just data.
See real tool outputs in the live demo.
Related MCP server: Postgres Scout MCP
Quick Start
pip install pg-cve-mcp
pg-cve-mcpOr with npx (no install):
npx -y pg-cve-mcpMCP Tools
Tool | Description |
| Complete security report for a version: EOL/yanked status, release date, stats, CVEs sorted by CVSS (a synthetic |
| Side-by-side CVE comparison (fixed/new/still present) with yanked & EOL flags and release dates |
| Recommended upgrade (minor by default; major when EOL or next-to-EOL) with fixed CVEs and release dates |
| All CVEs with known public exploits, sorted by CVSS, with release dates |
| Overview of the tracked CVE database incl. yanked releases |
Transports
stdio (default)
Run locally over stdio for opencode, Claude Desktop, and other stdio MCP clients:
pip install -e .
pg-cve-mcpStreamable HTTP (self-hosted)
For remote or enterprise deployments, serve the same tools over HTTP. Run
python run_server.py (or build the Dockerfile); the server listens on $PORT
(default 8000) at path /mcp:
python run_server.py
# MCP endpoint: http://127.0.0.1:8000/mcpConfigure any MCP client with the URL, e.g. in opencode.json:
{
"mcp": {
"pg-cve-mcp": {
"type": "remote",
"url": "http://127.0.0.1:8000/mcp"
}
}
}Configuration
Env Var | Default | Description |
|
| Cache TTL in seconds for CVE data |
|
| CVE data source URL |
|
| HTTP port for the Streamable HTTP server ( |
Development
Run the test suite and linters:
python -m pytest
ruff check src tests
mypy srcData Source
Data is fetched from the PG_CVE project's GitHub Pages with local caching. Falls back to a bundled copy if the network is unavailable.
Example Prompts
"What CVEs affect PostgreSQL 16.4?"
"Is PostgreSQL 15.8 safe to use?"
"Compare CVEs in 16.3 vs 16.4"
"What's the upgrade path from PostgreSQL 14.10?"
License
Apache 2.0
Maintenance
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables comprehensive PostgreSQL database monitoring, analysis, and management through natural language queries. Provides performance insights, bloat analysis, vacuum monitoring, and intelligent maintenance recommendations across PostgreSQL versions 12-17.34159MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to safely explore, analyze, and maintain PostgreSQL databases with read-only mode by default, SQL injection prevention, query performance analysis, and optional write operations.90Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with PostgreSQL databases through natural language queries, schema inspection, and safe SQL execution.91
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to safely interact with PostgreSQL databases, perform queries, inspect schemas, and analyze query performance.2
Related MCP Connectors
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/meob/PG_CVE-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server