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)

Links

License

Apache License 2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pgmnemo_mcp-0.17.0.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pgmnemo_mcp-0.17.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file pgmnemo_mcp-0.17.0.tar.gz.

File metadata

  • Download URL: pgmnemo_mcp-0.17.0.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pgmnemo_mcp-0.17.0.tar.gz
Algorithm Hash digest
SHA256 547fe26577cd087fd0bfb21d30806d3faef96c0d96797b63470a708a736e7b2c
MD5 e296aa201a6ce3cf0074d2edeb14a120
BLAKE2b-256 dcc2e1f7e99e1e0f121a8b5882e39408c2ebe7da7d911f90081408695c526c27

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgmnemo_mcp-0.17.0.tar.gz:

Publisher: release.yml on pgmnemo/pgmnemo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pgmnemo_mcp-0.17.0-py3-none-any.whl.

File metadata

  • Download URL: pgmnemo_mcp-0.17.0-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pgmnemo_mcp-0.17.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f375e84d90b766c7bb37d25fbfc684ae666e81595ea830df7b3d5eae11d4813b
MD5 a0422f68c964b4304a5d51571792f5d2
BLAKE2b-256 d7aea9619bb9d7ca5e1aa30b085eaa3c20fde46cb51b74ad51907a51ff3b9b3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgmnemo_mcp-0.17.0-py3-none-any.whl:

Publisher: release.yml on pgmnemo/pgmnemo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page