pgmnemo-mcp
MCP server for pgmnemo — provenance-gated agent memory in PostgreSQL.
pgmnemo-mcp is an MCP server that exposes
pgmnemo's ingest and recall capabilities
as tool calls for AI agents and LLM hosts (Claude Desktop, Cursor, Zed, etc.).
Requirements
- Python ≥ 3.11
- A PostgreSQL database with
pgmnemoextension installed (CREATE EXTENSION pgmnemo CASCADE;) - pgmnemo ≥ 0.5.0 (install guide)
Install
pip install pgmnemo-mcp
Quick start
# Set the database URL
export DATABASE_URL="postgresql://user:pass@localhost/mydb"
# Start the MCP server (stdio transport)
pgmnemo-mcp
Add to Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"pgmnemo": {
"command": "pgmnemo-mcp",
"env": {
"DATABASE_URL": "postgresql://user:pass@localhost/mydb"
}
}
}
}
Configuration
| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
postgresql://localhost/pgmnemo |
libpq connection string |
MCP_PORT |
8765 |
Port for HTTP/SSE transport (optional) |
Tools exposed
| Tool | Arguments (all top-level) | Description |
|---|---|---|
pgmnemo.ingest |
text (req), role, topic, importance, project_id, commit_sha, artifact_hash, metadata |
Store a lesson |
pgmnemo.recall |
query (req), top_k |
Retrieve relevant lessons |
ingest arguments are top-level — do not nest them under metadata. Defaults:
role="mcp_agent", topic="general", importance=3, project_id=1. Pass commit_sha
or artifact_hash to satisfy the provenance gate (without one the lesson is a "ghost",
excluded from recall by default).
Usage
# Smoke test — verify DB connectivity
DATABASE_URL=postgresql://user:pass@host/db python -m pgmnemo_mcp --smoke
# SSE transport (for web-based MCP hosts)
MCP_PORT=8765 pgmnemo-mcp
MCP Registry
| Field | Value |
|---|---|
| Server name | pgmnemo |
| Entry point | pgmnemo-mcp |
| Transport | stdio (default) · SSE (MCP_PORT) |
Links
- pgmnemo GitHub — SQL extension source, benchmarks, docs
- INSTALL.md — extension install guide
- USAGE.md — API reference
- CHANGELOG
License
Apache License 2.0
Metadata
Release files for pgmnemo-mcp 0.20.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pgmnemo_mcp-0.20.0.tar.gz | 23.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pgmnemo_mcp-0.20.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.8 kB
Release files / pgmnemo_mcp-0.20.0.tar.gz
| Download URL | pgmnemo_mcp-0.20.0.tar.gz |
|---|---|
| Size | 23.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6af69fa91f6fe9f89c1575e14a441d1201648d2a869343e50d4c4796645ccd82
|
|
BLAKE2b-256 checksum How to use checksums |
22d36cfc806dd15c056236100a572795df0574222a749e9b36d3cc5e435a51da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.
Transparency logRelease files / pgmnemo_mcp-0.20.0-py3-none-any.whl
| Download URL | pgmnemo_mcp-0.20.0-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a305d10ecf3af8c2840a455a86c72b69e2a4fb47eb8f69ded95a8585e81ad72
|
|
BLAKE2b-256 checksum How to use checksums |
d2ed2d0bd0e35b87c78bbddde885a8174a1aa151e9460d041b6f4548f0a05382
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.
Transparency log