# polymnemo [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/PCBZ/polymnemo  
**GitHub Stars:** 0  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/polymnemo

## Description
Shared cross-LLM long-term memory over MCP: semantic recall, sessions, and media (pgvector).

## Tools
Capabilities this server exposes over MCP:

- **Memory** — `remember`, `recall`, `list_memories`, `get_memory`, `update`, `forget`
- **Sessions** — `save_session`, `load_session`
- **Media** — `create_upload`, `confirm_upload`, `get_download_url`

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/PCBZ/polymnemo), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Configure:

```sh
python -m venv .venv
```

2. Install:

```sh
pip install -e .                     # add ".[dev]" for the test + lint tooling
```

3. Configure:

```sh
psql "<your-connection-string>" -f scripts/schema.sql
```

4. Start the server:

```sh
polymnemo                            # Streamable HTTP at http://127.0.0.1:8000/mcp
```

5. Install:

```sh
docker build -t polymnemo .
```

6. Start the server:

```sh
docker run -e POLYMNEMO_DATABASE_URL="..." -e POLYMNEMO_API_KEYS="sk-alice-secret:alice" \
           -e PORT=8080 -p 8080:8080 polymnemo
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/polymnemo/readme_

