Polymnemo logo

Polymnemo

Shared MCP memory with semantic search, session persistence, and media attachments backed by Postgres and pgvector.

Install Polymnemo

Run the project’s own setup commands, in order.

Setup steps from the project

polymnemo installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Configure
    python -m venv .venv
    
  2. 2. Install
    pip install -e .                     # add ".[dev]" for the test + lint tooling
    
  3. 3. Configure
    psql "<your-connection-string>" -f scripts/schema.sql
    
  4. 4. Start the server
    polymnemo                            # Streamable HTTP at http://127.0.0.1:8000/mcp
    
  5. 5. Install
    docker build -t polymnemo .
    
  6. 6. Start the server
    docker run -e POLYMNEMO_DATABASE_URL="..." -e POLYMNEMO_API_KEYS="sk-alice-secret:alice" \
               -e PORT=8080 -p 8080:8080 polymnemo
    

Overview

polymnemo MCP server gives MCP clients shared long-term memory through a single Streamable HTTP endpoint. It stores text and vectors in Postgres with pgvector, uses local ONNX embeddings, and can place uploaded media in S3-compatible object storage. Agents can save or search memories, preserve sessions, and manage media references across assistants. Use it when multiple LLM clients need shared, user-scoped memory without generative-LLM or embedding API calls.

Use cases

  • Share memories across multiple MCP-compatible LLM clients
  • Recall facts semantically from a Postgres-backed knowledge store
  • Save and reload complete agent session transcripts
  • Attach media files to searchable memory descriptions

Key features

  • Semantic, keyword, and RRF memory retrieval
  • Postgres and pgvector persistence
  • Local ONNX embeddings without an embedding API key
  • Cross-client sessions and owner-scoped namespaces
  • Media uploads through presigned object-storage URLs
  • Replaceable storage, retrieval, auth, and embedding layers

Tools3

What Polymnemo lets your agent do. Expand a tool for its parameters.

Self-reported~43 tokens of context

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.

14/14 checks healthy over the last 68d

Adoption & maintenance

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

Last commit1mo agoMost recent push to the default branch.
Tools exposed3Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Polymnemo works

What polymnemo does

polymnemo provides shared long-term memory over MCP for clients such as Claude Desktop and other clients that support remote HTTP MCP servers with custom headers. Memories are stored in a Postgres database with pgvector, allowing agents to retrieve content by semantic similarity, exact keyword matching, or a combination of both.

The memory API covers creating, listing, reading, updating, and deleting records through remember, list_memories, get_memory, update, and forget. save_session stores a complete transcript, while load_session retrieves it. Media support uses create_upload, confirm_upload, and get_download_url so agents can associate files, images, or video with searchable descriptions.

How it works

Clients connect to the /mcp Streamable HTTP endpoint and authenticate with a bearer token. Each token maps to a user_id, which scopes write operations. The default shared namespace is readable by everyone; other namespaces are private to their owner. Sessions and media use private namespaces by default.

Text is split into chunks when necessary, and each chunk receives its own vector. The default retrieval mode uses semantic similarity. Keyword mode performs case-insensitive substring matching and is intended for identifiers, names, and exact text. RRF mode combines the results from semantic and keyword retrieval.

Embeddings are generated locally with FastEmbed and ONNX, so the default setup does not require an embedding API key. The server also makes no generative-LLM calls.

The implementation separates storage, embedding, authentication, retrieval, blob storage, and rate limiting behind replaceable protocol-based layers. Default components include Postgres storage, local embeddings, GitHub OAuth with API tokens, vector retrieval, S3/R2 blob storage, and an optional global token-bucket rate limiter.

Setup and configuration

Run polymnemo with Python 3.11 or later. Create a virtual environment, install the package with pip install -e ., provision Postgres with the pgvector extension, and apply scripts/schema.sql. The hosted Neon option is supported, with a pooled connection string recommended for the database connection.

At minimum, configure:

  • POLYMNEMO_DATABASE_URL with the Postgres connection string.
  • POLYMNEMO_API_KEYS with comma-separated key:user_id pairs for bearer authentication.

Start the service with polymnemo. Its default endpoint is http://127.0.0.1:8000/mcp. MCP clients that accept an mcpServers configuration can use the endpoint together with an Authorization: Bearer <key> header. The project also provides a Docker image and Terraform deployment paths for Azure Container Apps and Cloud Run.

Tools and capabilities

  • Store text memories, including content that is automatically chunked when long.
  • Search with similarity, keyword, or RRF retrieval modes.
  • List, inspect, modify, and remove individual memories.
  • Save a full session transcript and load it verbatim later.
  • Create upload targets, confirm uploads, and obtain media download URLs.
  • Organize data into shared or owner-private namespaces.
  • Inspect active implementation layers with the ping tool.
  • Optionally scan memory text before embedding and storage by setting POLYMNEMO_RSP_CONFIG.

Limitations and notes

Writes are owner-scoped: a user can edit or delete only their own memories. The shared namespace is readable by everyone, so it should be chosen deliberately for data intended for cross-user access.

Keyword retrieval requires every query word to appear in the matching row and may return fewer results than requested. Similarity scores are comparable only within the same retrieval mode. RRF combines up to the top 50 candidates from each retrieval leg, limiting the combined paging range to approximately 100 results.

Secret scanning is disabled unless configured. When enabled, it scans memory text, session content, update text, and media descriptions before storage or embedding. Uploaded file contents are not scanned: file bytes go directly to object storage through the presigned upload path.

The project is in active development. Durable operation requires Postgres and pgvector; an in-memory store is available for development and tests. Blob storage can be disabled, and the default layers can be replaced with custom implementations.

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 Polymnemo

polymnemo is an MCP server that connects MCP clients to Postgres with pgvector and optional S3-compatible object storage. Its main tools remember and recall semantic memories, list/get/update/forget memory records, save/load sessions, and create/confirm uploads or retrieve download URLs for media.

Install it with Python 3.11 or later by creating a virtual environment and running `pip install -e .`. Provision Postgres with pgvector, apply `scripts/schema.sql`, configure the database URL and API keys, then start the service with `polymnemo`.

Set `POLYMNEMO_API_KEYS` to comma-separated `key:user_id` pairs and send the selected key as a bearer token. Each token resolves to a user ID, and write operations are restricted to that owner.

Semantic search uses local FastEmbed ONNX embeddings stored in Postgres with pgvector. The `recall` tool defaults to similarity search, while keyword mode handles exact text patterns and RRF combines both retrieval approaches.

Uploaded bytes go to configured S3-compatible object storage through presigned URLs, while polymnemo embeds only the searchable description. Use `create_upload`, `confirm_upload`, and `get_download_url` to manage the media flow.

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 PreviewPolymnemo AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/polymnemo?style=directory)](https://allmcps.com/mcp/polymnemo)
HTML Embed
<a href="https://allmcps.com/mcp/polymnemo"><img src="https://allmcps.com/api/badge/polymnemo?style=directory" alt="Polymnemo on AllMCPs" /></a>