Memoria
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Memoriasave this thought: the sky is blue because of Rayleigh scattering"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Memoria
The missing self-hosted memory backend for MCP clients.
Community-maintained MCP server for mem0 OSS.
If you like mem0 but need it in MCP clients today, Memoria closes that gap:
π Streamable HTTP MCP endpoint
π€ Per-user memory scoping for trusted internal deployments
π³ Drop-in Docker setup with Qdrant
πΈοΈ Optional graph memory via Memgraph
Why this project exists: there is no official MCP server in mem0 OSS that you can run as a standalone service in your stack. Memoria gives you that bridge now.
β¨ What You Get
MCP tools for storing, searching, updating, and deleting memory
OIDC bearer token auth (Keycloak-compatible) with per-user scoping from token claims
Ownership checks for ID-based read/update/delete operations
Health endpoint with Qdrant, Memgraph, LLM, and embedder dependency checks
mem0-backed memory with pluggable LLM/embedder providers
Optional graph relations support when graph mode is enabled
Related MCP server: Engram
π Quickstart (Docker, Recommended)
# Copy .env.example to .env and put rotated provider keys there first
docker compose up -d --build
# Optional: start bundled Keycloak profile for local OIDC
docker compose --profile oidc up -d keycloakAvailable endpoints:
MCP:
http://localhost:8080/mcpHealth:
http://localhost:8080/healthMemgraph Lab UI:
http://localhost:3000
π Quickstart (Local Python)
python -m pip install -e .[dev]
python -m memoriaDefaults:
MCP:
http://0.0.0.0:8080/mcpHealth:
http://0.0.0.0:8080/health
π Connect from an MCP Client
OIDC mode
{
"mcpServers": {
"memoria": {
"type": "streamable-http",
"url": "http://localhost:8080/mcp",
"headers": {
"authorization": "Bearer <access_token>"
}
}
}
}Without a bearer token, requests are rejected.
For local Keycloak profile, issuer is http://localhost:18081/realms/memoria.
OAuth metadata layout, the fact that /oauth/register does not persist dynamic client registration, loopback redirect constraints, RS256/Keycloak assumptions, and other auth details are documented in docs/auth.md.
local mode
This is the default for local development. In local mode Memoria skips client authentication entirely and scopes all tools to a fixed configured user id (MEMORIA_LOCAL_USER_ID, default local-user).
{
"mcpServers": {
"memoria": {
"type": "streamable-http",
"url": "http://localhost:8080/mcp"
}
}
}stub_auth mode
Use this only behind a trusted auth proxy or during migration. In this mode the client passes user identity via x-user-id instead of a bearer token.
{
"mcpServers": {
"memoria": {
"type": "streamable-http",
"url": "http://localhost:8080/mcp",
"headers": {
"x-user-id": "alice"
}
}
}
}π‘οΈ Security Boundary
In oidc mode, identity is derived from validated JWT claims (sub by default).
In local mode, Memoria does not authenticate the client and always uses MEMORIA_LOCAL_USER_ID. Use it only for local development.
stub_auth mode remains available for migration only. In this mode x-user-id is an identity input, not authentication, and should be used only behind a trusted auth proxy/gateway.
Local Keycloak realm note:
deploy/keycloak/realm.jsonincludes amemoria-e2eclient with direct access grants enabled for local-test only automation.Production realm imports should remove that client or disable direct access grants.
π§° MCP Tools
All tools are scoped to the current user identity from the bearer token, the configured local user id, or the x-user-id header depending on auth mode.
Tool | Required args | What it does | Returns |
|
| Stores a new memory. If | mem0 add response for the created memory item(s) |
|
| Runs semantic search over the current user's memories. Supports | mem0 search response with matching results |
|
| Returns one memory by ID if it belongs to the current user. | single memory object or |
| none | Lists memories for the current user. Supports | mem0 list response with memory items |
|
| Updates the text payload of an existing memory owned by the current user. | mem0 update response |
|
| Deletes one memory owned by the current user. | mem0 delete response |
| none | Deletes all memories for the current user scope. | mem0 bulk delete response |
| none | Returns graph relations from mem0 when graph mode is enabled. Supports |
|
| none | Deletes entities for the current user. In mem0 OSS this is mapped to |
|
ποΈ Architecture
Memoria is intentionally simple:
MCP client -> FastMCP server -> mem0 -> Qdrant
|
+-> Memgraph (optional graph memory)That keeps the deployment easy to reason about and straightforward to self-host.
βοΈ Configuration
Start from .env.example. Most local setups only need auth mode, provider keys, and either the default Docker services or a reachable Qdrant/LLM/embedder stack.
Server and auth
Var | Default | Required | Description |
|
| no | Bind host for the HTTP server |
|
| no | Bind port for the HTTP server |
|
| no | MCP endpoint path |
|
| no | Public base URL used in advertised MCP/OAuth metadata |
|
| no | Auth mode: |
|
| no | Fixed user id used in |
|
| no | Identity header used in |
| none | in | Expected token issuer and default upstream OIDC issuer |
| none | no | Browser-facing issuer for advertised OAuth endpoints |
| none | no | Optional internal JWKS URL for server-side verification |
| none | in | Expected access token audience |
|
| no | Claim used as the per-user identity |
| none | no | Optional space-separated scopes enforced by the verifier |
|
| no | JWKS cache TTL in seconds |
|
| no | Application log level |
Qdrant
Var | Default | Required | Description |
|
| no | Qdrant host when not using a full URL |
|
| no | Qdrant port when not using a full URL |
| none | no | Full Qdrant URL; overrides host/port mode |
| none | no | API key for managed Qdrant deployments |
|
| no | Collection name used by mem0 |
|
| no | Embedding dimension size for the collection |
|
| no | Enables on-disk Qdrant storage mode |
mem0, LLM, and embedder
Var | Default | Required | Description |
|
| no | mem0 API/config version passed to the SDK |
|
| no | Local history DB path used by mem0 |
|
| no | LLM provider passed to mem0 |
|
| no | LLM model name |
| empty | no | Optional base URL override for the LLM provider |
|
| no | LLM API key; local OpenAI-compatible stacks can use any non-empty value |
|
| no | Embedder provider passed to mem0 |
|
| no | Embedder model name |
| empty | no | Optional base URL override for the embedder provider |
|
| no | Embedder API key; local compatible stacks can use any non-empty value |
Optional graph mode
Var | Default | Required | Description |
|
| no | Enables graph memory support in mem0 |
|
| no | Graph provider name |
|
| when graph enabled | Memgraph connection URL |
|
| when graph enabled | Memgraph username |
|
| when graph enabled | Memgraph password |
β Quality & Tests
Quality checks:
python -m ruff check .
python -m mypy srcUnit tests:
python -m pytest -q tests/unit --cov=src/memoria --cov-report=term-missingE2E tests (Docker + Testcontainers):
RUN_E2E=1 python -m pytest -q tests/e2e$env:RUN_E2E='1'
python -m pytest -q tests/e2eπ Positioning and Scope
This project is community-maintained.
It is focused on practical integration and fast self-hosting.
It does not claim affiliation with mem0.
π§ Roadmap
Planned role/scope-based authorization for MCP tools with read/write/admin separation
Planned production deployment presets, including Docker hardening and Kubernetes Helm charts
Planned observability package with structured logs, Prometheus metrics, and tracing
Planned integration examples for additional MCP clients and providers
π License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ivkond/memoria'
If you have feedback or need assistance with the MCP directory API, please join our Discord server