Skip to main content

pgmnemo-mcp

MCP server for pgmnemo — provenance-gated agent memory in PostgreSQL.

PyPI License Python

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 pgmnemo extension 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)

License

Apache License 2.0

Metadata

Release files for pgmnemo-mcp 0.21.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pgmnemo-mcp 0.21.0
File Size Uploaded Provenance Actions
pgmnemo_mcp-0.21.0.tar.gz 23.5 kB With provenance Details for pgmnemo_mcp-0.21.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pgmnemo-mcp 0.21.0
File Interpreter ABI Platform Actions
pgmnemo_mcp-0.21.0-py3-none-any.whl Python 3 none any Details for pgmnemo_mcp-0.21.0-py3-none-any.whl

Total release size: 42.8 kB

Release files / pgmnemo_mcp-0.21.0.tar.gz

Download URL pgmnemo_mcp-0.21.0.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
288625f2622f3dd6cd70eec8b3d0d8c55f69b6f2d0462e1f99863365ecad7072
BLAKE2b-256 checksum
How to use checksums
fb8a276bc18bf79b648f390c6d52f59f54a92ac66dfec2740f0f1082d239b784
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 29, 2026.

Transparency log

Release files / pgmnemo_mcp-0.21.0-py3-none-any.whl

Download URL pgmnemo_mcp-0.21.0-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab859d59acd1b9a77670fd9d04754809f9113d5f730d2231be901ee5019e88a4
BLAKE2b-256 checksum
How to use checksums
1004d38475fcfb76266e527688b6361227d85e23adcb00dfb152e96eb2da51d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 29, 2026.

Transparency log

Security for pgmnemo-mcp 0.21.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pgmnemo_mcp-0.21.0.tar.gz

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 Oct 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.21.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page