
polymnemo
io.github.PCBZPublished by GitHub account PCBZv1.5.0Updated Oct 30, 2026
Shared cross-LLM long-term memory over MCP: semantic recall, sessions, and media (pgvector).
Overview
Shared long-term memory over MCP: assistants store facts, sessions and media, then recall them semantically across any LLM client.
- What you can do
- Store, recall, list, read, update and delete memories, with semantic, exact-keyword or fused ranking modes
- Save a full session transcript and reload it verbatim, or recall across it
- Attach files, images or video through upload and download links, with only a searchable description embedded
- Check server health and wiring, and expose a namespace as a resource for auto-injection
- When to use it
- Useful when you want several assistants or IDEs to share one persistent memory of facts, past sessions and attachments, and to find them again by meaning rather than exact wording.
- Requirements
- Remote streamable HTTP endpoint; an OAuth sign-in or a per-user API key sent as an Authorization bearer header, requested from the maintainer. Self-hosting instead needs Python 3.11+, a Postgres database with pgvector, and API keys configured on the server.
Installation
In SourceWeft
- Open polymnemo in the dashboard and add it to a workspace.
- Connect the required credentials. They are stored privately and never shown on public pages.
- Enable the server for the chats that should use its tools.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Use with an agent
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/io.github.PCBZ%2Fpolymnemo/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Other MCP clients
Add this to your client's mcpServers config. The client completes OAuth sign-in on first connect.
{
"mcpServers": {
"polymnemo": {
"type": "http",
"url": "https://polymnemo.purpleground-26f6d744.westus2.azurecontainerapps.io/mcp"
}
}
}README
polymnemo
[Python] [MCP] [Postgres] [Neon] [SQLAlchemy] [Pydantic] [Cloudflare R2] [Azure] [Cloud Run] [Terraform] [Docker] [pytest] [Ruff]
A shared long-term memory across any LLM, over MCP.
Point Claude Desktop, an MCP-capable IDE, or any MCP client at one polymnemo endpoint and they share the same memories — stored in your own Postgres. Store a fact with one assistant, recall it from another; save whole sessions and reload them; even attach files, images, or video. Embeddings run locally (no embedding API key), and the server makes no generative-LLM calls.
Status: active development. Semantic memory + pgvector store, session save/reload, and multimedia memories all work; deployable to Azure Container Apps (or Cloud Run) via Terraform. Wiki · Issues
Features
- 🔗 Cross-LLM shared — point any MCP client at one endpoint; they share the same memory.
- 🧠 Semantic recall — vector search over Postgres + pgvector by default, with exact-text and fused (RRF) modes when you need to find an ID or a name.
- 💬 Sessions — save a full transcript and reload it verbatim, or recall across it.
- 🖼️ Multimedia — attach files, images, or video; bytes go to object storage, only a searchable description is embedded.
- 🔒 Local & private — embeddings run locally (ONNX): no embedding API key, and no generative-LLM calls, ever.
- 👥 Namespaces — "born-shared" collections readable by everyone, vs. private-to-owner; writes are always owner-scoped.
- 🧩 Pluggable layers — store, embedder, auth, retriever, blob store, and rate limiter are all swappable
Protocols. - ☁️ Multi-cloud deploy — one Terraform stack to Azure Container Apps or Cloud Run, scale-to-zero.
- 🚦 Rate limiting — optional global token bucket.
How it works
A request carries a bearer key (which resolves to a user_id); the tool passes
the rate-limit gate, then delegates to a MemoryService that chunks + embeds
text and stores the vectors in pgvector — large files go to object storage via
presigned URLs, with only a searchable description embedded.
Every layer is a typing.Protocol, wired together by a composition root
(context.py), so you can swap an implementation
without touching the tools:
The ping tool returns the active layers, so you can see how a running server is
wired.
Quickstart
Requires Python 3.11+.
1. Install
2. Provision Postgres (pgvector)
The durable store is Postgres + pgvector; the easiest hosted option is Neon (use the pooled connection string). Apply the schema once:
3. Configure
Copy .env.example to .env and set the database URL and at least one API key:
Each key maps a bearer token to a user_id; writes are scoped to that user.
4. Run
Or with Docker:
5. Connect an MCP client
Any client that supports remote (HTTP) MCP servers with custom headers needs two things:
- Endpoint:
http://<host>:<port>/mcp - Header:
Authorization: Bearer <your-key>
For clients that read an mcpServers config:
Or verify with the inspector:
Concepts
- Users & keys — sign in with GitHub, or present a bearer token. Either way
the request resolves to a
user_id, and writes are owner-scoped (you can only edit or delete your own memories). - Headless clients — CI, cron jobs and server-side agents can't complete a
browser sign-in, so they use an API token instead. Sign in with GitHub at
<server>/tokensto create, list and revoke them; a new token is shown once and stored only as a SHA-256 hash. Deliberately not MCP tools — a secret must never travel an LLM channel. - Namespaces — memories live in namespaces. A shared namespace (default
shared) is readable by everyone ("born shared"); everything else is private to its owner. Sessions and media default to private namespaces. - Chunking — long content is split into chunks on write (one vector each), so
remembermay return several ids andrecallreturns the closest chunks. - Secret scanning — optional, and off unless you turn it on: set
POLYMNEMO_RSP_CONFIGto a scanner config (the image ships one at/app/plugins/rsp.toml). Unset, every write goes through a no-op guard and nothing is scanned. When on, the text of a memory is scanned before it is embedded or stored, so a refused write was never written rather than deleted afterwards. It coversremember,save_session,updateand a media memory's description. The contents of uploaded files are not scanned and are stored as you sent them: the bytes go straight to object storage under a presigned URL and never pass through this server. A file's description is scanned; the file is not.
Tools
polymnemo exposes MCP tools for storing, searching, and managing memories:
- Memory —
remember,recall,list_memories,get_memory,update,forget
recall takes a mode:
keyword is an exact substring match. rrf fuses the top 50 candidates from each
leg, so paging through it reaches at most about 100 results.
score is only comparable within one mode, and total is the size of the
namespace searched, not the number of matches.
- Sessions —
save_session,load_session - Media —
create_upload,confirm_upload,get_download_url
Plus a ping health check and a memory://{namespace} resource for
auto-injecting a collection. Media bytes go to object storage via presigned URLs
— never through the MCP channel — with only a searchable description embedded
(needs the blob extra).
Full arguments and return shapes live in the dedicated MCP tools reference (coming soon). See Concepts for how keys, namespaces, and chunking work.
Configuration
POLYMNEMO_* environment variables (or .env) — full list in
.env.example. The essentials:
Development
Postgres tests run when TEST_DATABASE_URL points at a pgvector Postgres. CI
(.github/workflows/ci.yml) runs lint + the suite with coverage and posts a
pass/fail/coverage table to each run's summary.
Deploy
polymnemo is stateless (all state in Neon + object storage), so it runs on
Azure Container Apps (primary) or Google Cloud Run with scale-to-zero.
Everything is Terraform in deploy/terraform/: shared
neon/ (Postgres) and r2/
(media bucket) roots own the durable state, and a compute root deploys a service
that reads both — so memories and media are shared across clouds.
The Azure path deploys from CI in one click: set the GitHub secrets
(scripts/setup-github-secrets.sh), bootstrap the state backend
(scripts/bootstrap-tfstate-azure.sh), then run the deploy (azure) workflow
(neon → schema → r2 → build → app). GCP is a manual failover. Full walkthrough
in docs/deploy.md.
License
MIT — see LICENSE.
Source: README.md at commit ed6634f
Tools
0Version history
7- v1.5.0LatestOct 29, 2026
- v1.4.1Oct 24, 2026
- v1.4.0Oct 21, 2026
- v1.3.0Sep 21, 2026
- v1.2.7Sep 19, 2026
- v1.2.5Sep 17, 2026
- v1.0.0Sep 16, 2026
Score
85% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 daysRequired25 pts
- Auth declaredRequired10 pts
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts