MCP server wrapping pgmnemo ingest and recall for AI agent memory
Project description
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 | Description |
|---|---|---|
pgmnemo.ingest |
text: str, metadata?: dict |
Store a lesson in agent memory |
pgmnemo.recall |
query: str, top_k?: int |
Retrieve relevant lessons |
metadata keys for pgmnemo.ingest: role, topic, importance (1–5), commit_sha.
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pgmnemo_mcp-0.5.2.post1.tar.gz.
File metadata
- Download URL: pgmnemo_mcp-0.5.2.post1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
522d9fe4617acb809c046a21701b230f6e3cadb42095f166dbbeca64643af304
|
|
| MD5 |
2b976798a9436282dc3d0ca782e4f32b
|
|
| BLAKE2b-256 |
cecfc629977c9ed062e7dadf8ff4adfda8aee7c79a774ba711040f778e6842b4
|
Provenance
The following attestation bundles were made for pgmnemo_mcp-0.5.2.post1.tar.gz:
Publisher:
release.yml on pgmnemo/pgmnemo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pgmnemo_mcp-0.5.2.post1.tar.gz -
Subject digest:
522d9fe4617acb809c046a21701b230f6e3cadb42095f166dbbeca64643af304 - Sigstore transparency entry: 1606799325
- Sigstore integration time:
-
Permalink:
pgmnemo/pgmnemo@454f974a2fbf7b20ce027d777b17b33b89e11693 -
Branch / Tag:
refs/tags/v0.5.2.post1 - Owner: https://github.com/pgmnemo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@454f974a2fbf7b20ce027d777b17b33b89e11693 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pgmnemo_mcp-0.5.2.post1-py3-none-any.whl.
File metadata
- Download URL: pgmnemo_mcp-0.5.2.post1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daaf90e36d5309bf3f4cc18345691c500a70ec196377ddbd958624441ed86f5b
|
|
| MD5 |
e94808656617dfbcd1cde61c4a63cc7e
|
|
| BLAKE2b-256 |
d455395195b78b4e25d4119afc3a16201031722e3023a3b54fb91ed242746236
|
Provenance
The following attestation bundles were made for pgmnemo_mcp-0.5.2.post1-py3-none-any.whl:
Publisher:
release.yml on pgmnemo/pgmnemo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pgmnemo_mcp-0.5.2.post1-py3-none-any.whl -
Subject digest:
daaf90e36d5309bf3f4cc18345691c500a70ec196377ddbd958624441ed86f5b - Sigstore transparency entry: 1606799445
- Sigstore integration time:
-
Permalink:
pgmnemo/pgmnemo@454f974a2fbf7b20ce027d777b17b33b89e11693 -
Branch / Tag:
refs/tags/v0.5.2.post1 - Owner: https://github.com/pgmnemo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@454f974a2fbf7b20ce027d777b17b33b89e11693 -
Trigger Event:
push
-
Statement type: