Amu Pgvector logo

Amu Pgvector

Lineage-aware agent memory on PostgreSQL and pgvector, with row-level security controlling which derived results each role can read.

Install Amu Pgvector

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "amu-pgvector": {
      "command": "uvx",
      "args": [
        "amu-pgvector"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio amu-pgvector -- uvx amu-pgvector

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

amu-pgvector stores agent memory units in PostgreSQL with pgvector and uses lineage-aware row-level security to govern retrieval. Database triggers derive the sensitive columns used to produce each cached result, while policies compare them with the requesting department's permissions. Its MCP package exposes search, recording, and conflict-checking tools, alongside Python, SQL, and LangChain interfaces. Reach for it when shared semantic memory must prevent cross-department access to results derived from restricted data.

Use cases

  • Store derived metrics with their source-column lineage
  • Search shared agent memory under department permissions
  • Expose governed memory retrieval through MCP
  • Check for conflicting definitions of cached metrics
  • Integrate lineage-gated retrieval with LangChain

Key features

  • PostgreSQL and pgvector-backed memory storage
  • Lineage-derived sensitive-column tracking
  • Forced row-level security for reads
  • Semantic search with configurable embeddings
  • MCP tools for search, recording, and conflict checks
  • Python and LangChain integrations

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 52d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 13d ago via OSV.dev · amu-pgvector (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
Last commit11d agoMost recent push to the default branch.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Amu Pgvector works

What amu-pgvector does

amu-pgvector implements lineage-aware memory governance for agent-generated results stored in PostgreSQL. It is designed for cases where a result can reveal restricted information even when the result itself is only a number, label, or other apparently harmless value. Access is based on the data used to derive the result, rather than only on metric names, descriptions, or vector similarity.

The project uses PostgreSQL with the pgvector extension. Its memory-unit table is protected with forced row-level security, so the same access decision applies whether a query comes from raw SQL, the Python API, LangChain, or the MCP interface. A department receives a result only when every sensitive column in that result's derivation is permitted for the requesting database role.

How it works

A trusted writing layer records the SQL and result metadata for a memory unit. A database trigger obtains the SQL lineage, follows registered materialized-view and derived-table relationships, and calculates the sensitive columns touched by that lineage. The resulting status and column set are stored with the memory unit.

At read time, PostgreSQL compares those columns with the permission set associated with the session role. For example, a result derived from customers.income can be returned to a Finance role granted access to income, while a semantically matching search by a Marketing role is filtered out by the database policy.

Semantic retrieval uses embeddings and pgvector. The quickstart uses a 1,536-dimension fake embedder for local testing; a real embedding model can be supplied for production use. The MCP package exposes the same database-enforced gate rather than implementing a separate client-side filter.

Setup and configuration

A local setup can be started with Docker Compose, followed by loading sql/amu_pgvector.sql into the PostgreSQL database. The example database listens on port 5433 and uses the amu_dev database with the amu_owner role. The sample owner password is intended for local development and should be changed for other environments.

Install the Python project with uv sync --all-packages --all-extras, or install the package with pip. Installing the mcp extra adds the amu-pgvector-mcp console script. The Python API accepts a PostgreSQL DSN when creating an AMUStore; separate database roles can then be used for administrative operations and agent reads.

The SQL installation is designed to run as a normal database owner and requires the vector extension. The same SQL approach is described for managed PostgreSQL deployments, including Supabase and Neon.

Tools and capabilities

The MCP interface provides three tools:

  • amu_search retrieves semantically similar memory units subject to PostgreSQL row-level security.
  • amu_record stores a result with its SQL, metadata, ownership information, and embedding input.
  • amu_check_conflict checks for conflicting metric definitions.

The Python API supports registering sensitive columns, granting department permissions, creating agent roles, recording results, and searching memory. The LangChain package supplies AMUVectorStore and AMURetriever; reads use the store's PostgreSQL role, so LangChain requests receive the same RLS treatment as SQL and MCP requests.

The database also reacts when a column is later classified as sensitive by recomputing affected memory units. Long or cyclic lineage closure fails closed by marking the affected unit unresolved and hiding it rather than serving a partially traced result.

Limitations and notes

The writer role's lineage input is trusted by design. A writer that supplies false lineage can undermine the resulting gate. PostgreSQL superusers bypass row-level security, and the design does not address timing side channels or inference created by combining multiple individually permitted memory units.

A convenience identity mode is off by default and depends on a trusted boundary between application code and agent-controlled code when pooled connections are used.

The documented benchmark reached zero cross-department leaks in its tested RLS-gated workload, but retrieval cost depends on filtering and index settings. The default relaxed-order iterative HNSW scan can add substantial latency at 100,000 rows, especially when many rows are hidden. The reported tests did not attempt a one-million-row dataset.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Amu Pgvector

Yes. amu-pgvector uses a standard MCP console-server entry point, so it can be configured in Cursor as an MCP server. Its database access still depends on the PostgreSQL roles, permissions, and connection configuration used by the server.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAmu Pgvector AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/amu-pgvector?style=directory)](https://allmcps.com/mcp/amu-pgvector)
HTML Embed
<a href="https://allmcps.com/mcp/amu-pgvector"><img src="https://allmcps.com/api/badge/amu-pgvector?style=directory" alt="Amu Pgvector on AllMCPs" /></a>