pg-cve-mcp
This MCP server lets AI agents query curated PostgreSQL CVE and release intelligence through structured tools.
Retrieve all CVEs affecting a specific PostgreSQL version.
Get a version security summary with EOL/yanked status, CVE count, max CVSS, exploit count, and latest minor.
Compare two versions' CVE profiles (fixed, new, still present).
Recommend an upgrade path/target, including latest minor and newer non-EOL major options.
List yanked PostgreSQL releases.
List CVEs with known public exploits.
Find the latest minor release for a major branch.
Get database overview stats: unique CVEs, exploits, yanked releases, active/EOL major counts, and dataset freshness.
Provides tools for querying PostgreSQL CVEs, version status, upgrade paths, and exploits for any PostgreSQL version.
Click on "Deploy 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-mcp What 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. get_summary() also reports last_updated, so agents can state how fresh the snapshot is.
See real tool outputs in the live demo.
Related MCP server: Vulners MCP Server
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 and dataset |
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 with the
MCP Python SDK v2. 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"
}
}
}The v2 SDK enables DNS-rebinding protection by default for localhost-only apps, which
rejects requests sent to a real hostname with 421 Misdirected Request. This server
therefore configures transport_security explicitly. By default any Host header is
accepted (*), preserving Docker/self-hosted behavior. For production, restrict it:
PG_CVE_MCP_ALLOWED_HOSTS="mcp.example.com:443" python run_server.pySet a comma-separated list of allowed Host values; wildcard ports such as
mcp.example.com:* are supported. Restricting hosts protects remote deployments from
DNS-rebinding attacks.
Configuration
Env Var | Default | Description |
|
| Cache TTL in seconds for CVE data |
|
| CVE data source URL |
|
| Comma-separated allowed |
|
| 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. The dataset tracks PostgreSQL 19 as active and 14 as end-of-life; get_summary() reports its last_updated date.
Example Prompts
"What CVEs affect PostgreSQL 19.0?"
"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
Available Tools
8 toolscompare_versionsA
Compare the CVE profiles of two PostgreSQL versions side by side.
Shows CVEs fixed in v2 (present in v1 but not v2), new CVEs in v2, and CVEs still present in both.
Args: v1: First PostgreSQL version (e.g. "16.3"). v2: Second PostgreSQL version (e.g. "16.4").
Inputs: v1 (required), v2 (required).
get_cvesA
List all CVEs affecting a specific PostgreSQL version.
Args: version: A PostgreSQL version string (e.g. "16.4", "15.8", "14.0").
Inputs: version (required).
get_exploitsA
List all CVEs with known public exploits.
Inputs: no named parameters.
get_latest_minorA
Find the latest minor release in a given major branch.
Args: major: A PostgreSQL major version (e.g. "16", "17", "18").
Inputs: major (required).
get_summaryB
Get an overview of the tracked PostgreSQL CVE database.
Returns total unique CVEs, known exploits, yanked releases, active and EOL major counts.
Inputs: no named parameters.
get_upgrade_pathA
Suggest the recommended upgrade target for a PostgreSQL version.
Returns the latest minor in the same branch and, if applicable, suggests upgrading to a newer non-EOL major version.
Args: from_version: The currently installed PostgreSQL version (e.g. "16.3").
Inputs: from_version (required).
get_version_statusA
Get a comprehensive security status summary for a PostgreSQL version.
Returns EOL status, yanked status, CVE count, max CVSS score, exploit count, and the latest minor in the same branch.
Args: version: A PostgreSQL version string (e.g. "16.4", "15.8").
Inputs: version (required).
get_yanked_versionsA
List all PostgreSQL releases that have been flagged as 'yanked' due to serious regressions or data corruption bugs.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct purpose: latest minor, summary stats, CVE listing, status summary, comparison, upgrade path, yanked list, and exploits. Some overlap exists between get_latest_minor and get_upgrade_path (both involve latest minor) and between get_cves and get_exploits (both list CVEs), but descriptions clarify the differences.
Seven of eight tools follow the get_<object> pattern (e.g., get_summary, get_yanked_versions), but compare_versions deviates by using a verb_prefix style. The overall pattern is clear and predictable, with only one outlier.
Eight tools is well within the ideal 3–15 range for a domain-specific server. Each tool covers a distinct query or operation relevant to PostgreSQL CVE tracking, with no redundancy or bloat.
The tool set covers core workflows: version lookup, CVE listing, comparison, upgrade suggestions, yanked releases, and exploit lists. Minor gaps include no tool to list all available major versions or fetch individual CVE details, but these are not critical for the server's apparent purpose.
Maintenance
Related MCP Connectors
Real-time CVE, exploit, and vulnerability intelligence for AI assistants (350K+ CVEs, 115K+ PoCs)
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.
Look up CVEs, CISA KEV, EPSS and open-source package vulnerabilities, including malicious packages.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to safely interact with PostgreSQL databases, perform queries, inspect schemas, and analyze query performance.2ISC

Vulners MCP Serverofficial
FlicenseNot gradedqualityCmaintenanceEnables AI assistants to query the Vulners vulnerability database for CVEs, security bulletins, and software package audits through natural language.35 PyPI7-- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to perform PostgreSQL database operations, monitoring, and management through natural language, including performance analysis, bloat detection, lock/deadlock monitoring, autovacuum and schema inspection, with no extensions required.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to perform PostgreSQL database operations, monitoring, and management through natural language, including performance analysis, bloat detection, lock/deadlock monitoring, autovacuum and schema inspection, and maintenance recommendations across PostgreSQL 12-18.-