Zikra MCP server
Commit Aug 18, 2026Provides a shared, governed memory layer for AI agents and teams using PostgreSQL and pgvector for persistent, multi-project context.
Also known as getzikra/Zikra
- Stars
- 9
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Aug 18, 2026
- License
- MIT
What is Zikra MCP?
Zikra provides a shared, governed memory layer for AI agents and teams using PostgreSQL and pgvector for persistent, multi-project context.
Summary generated from the project's README
About Zikra MCP server
Zikra provides a shared memory layer designed for teams using multiple AI agents across various projects. Unlike standard session memory, this system creates a persistent, governed pool of context that can be accessed by different people and tools like Claude Code, Gemini CLI, or Codex. It uses a PostgreSQL backend with pgvector to manage millions of memories, ensuring the system scales without requiring constant index rebuilds.
Users can set up the server locally and connect it to their AI clients using an MCP configuration with a bearer token for authorization. The platform supports role-based access control with roles including owner, admin, developer, and viewer. It features automated memory hygiene through built-in scoring that handles confidence decay and stale data cleanup. Developers can choose between a local SQLite setup for single users or a full PostgreSQL deployment for team environments.
What you can do with it
- 1Synchronize team knowledgeAllow multiple developers to share a single pool of project context and decisions across different AI tools.
- 2Automate session documentationAutomatically record agent interactions and session details using built-in hooks.
- 3Manage project requirementsStore and retrieve specific project requirements and named prompts to maintain consistency.
- 4Maintain memory qualityUse automated hygiene processes to ensure that old or low-confidence information does not clutter searches.
Written from the project's README. Every use case is checked against a quote from it.
Configuration
DB_BACKENDDB_HOSTDB_NAMEDB_PASSWORDDB_PORTDB_USER
| Name | Description | |
|---|---|---|
| DB_BACKEND | — | |
| DB_HOST | — | |
| DB_NAME | — | |
| DB_PASSWORD | — | |
| DB_PORT | — | |
| DB_USER | — |
Automated checks
Ran Nov 15, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablegetzikra/zikra is public and reachablegithub.com/getzikra/zikra ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-08-18github.com/getzikra/zikra ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubZikra — Team Memory for AI Agents
Not just session memory. A shared, governed memory layer for every agent, every person, and every project your team runs.
Website: zikra.dev · Self-hosted · MIT · Scales to millions of memories
Architecture: Governed project memory for teams of agents
Promotion kit: submission copy, launch posts, and directory targets
zikra 17 runs · 847 memories │ you@team-server │ Sonnet 4.6 │ ~/project (main) │ 387K/200K ████░░░░░░ 45%
Install in one line
claude mcp add zikra http://localhost:8000/mcp --header "Authorization: Bearer YOUR_TOKEN"
Or add to ~/.claude/settings.json:
{ "mcpServers": { "zikra": { "url": "http://localhost:8000/mcp", "headers": { "Authorization": "Bearer YOUR_TOKEN" } } } }
Don't have a server yet? → Step 1 below takes ~2 minutes.
Most AI memory tools solve one problem: one agent remembers one session better.
Zikra solves a harder problem: multiple people running multiple AI agents across multiple projects — all sharing the same memory pool, with the right person scoped to the right project, the right agent pulling the right context, and millions of memories staying fresh through built-in hygiene scoring.
It's not session memory. It's the shared brain for an AI-native team.
| What you get | What that means |
|---|---|
| Multi-agent | Claude Code, Gemini CLI, Codex — one pool, one token |
| Multi-person | Owner / admin / dev / viewer roles per project |
| Multi-project | Isolated namespaces; one team runs veltisai, design, global |
| Scale | PostgreSQL backend — handles millions of memories without index rebuilds |
| Memory hygiene | Built-in hygiene prompt: confidence decay, orphan detection, stale cleanup |
| Structure | Not just "save text" — decisions, requirements, prompts, errors, session diaries |
| Auto-save | Stop + PreCompact hooks write every session automatically |
— Mukarram
How Zikra compares
| Zikra | MCP Memory¹ | mem0 | basic-memory | MemoryMesh | |
|---|---|---|---|---|---|
| Works across multiple AI tools | ✅ | ❌ | ✅ paid | ❌ | ❌ |
| Team sharing with per-user roles | ✅ RBAC | ❌ | ✅ paid | ❌ | ❌ |
| Multi-project namespacing | ✅ | ❌ | ✅ paid | ❌ | ❌ |
| Self-hosted, zero cloud dependency | ✅ | ✅ | ❌ | ✅ | ✅ |
| Auto-save via session hooks | ✅ | ❌ | ❌ | ❌ | ❌ |
| Hybrid vector + keyword search | ✅ | ❌ graph only | ✅ | ❌ | ❌ |
| Confidence decay / memory hygiene | ✅ built-in prompt | ❌ | ❌ | ❌ | ❌ |
| Named prompts + requirements | ✅ | ❌ | ❌ | ❌ | ❌ |
| Scales to millions of memories | ✅ Postgres | ❌ in-memory | ✅ cloud | ❌ | ❌ |
| License | MIT | MIT | Proprietary | MIT | MIT |
¹ @modelcontextprotocol/server-memory — the official Anthropic reference server.
Getting Started
Step 1 — Install the server
git clone https://github.com/getzikra/zikra
cd zikra
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .
python3 installer.py # interactive setup, ~2 minutes
python3 -m zikra
The installer creates a .env file and generates your admin token. The server binds to http://localhost:8000 by default.
To reach it from other machines, run
cloudflared tunnel --url http://localhost:8000(free, gives you a permanent public URL likehttps://zikra.yourteam.com).
Step 2 — Enable MCP in Claude Code
Open Claude Code → Settings → MCP → Add Server and paste:
{
"mcpServers": {
"zikra": {
"url": "http://your-server:8000/mcp",
"headers": { "Authorization": "Bearer YOUR_ZIKRA_TOKEN" }
}
}
}
The installer does this automatically when run locally.
Step 3 — Connect your AI coding agent
Paste the prompt for your agent into a session. It handles both first install and updates.
Claude Code:
Fetch https://raw.githubusercontent.com/GetZikra/zikra/main/prompts/zikra-claude-code-setup.md
and follow every instruction in it.
This installs the Stop hook (auto-saves every session), PreCompact hook, and the live statusline bar showing run counts and memory stats.
Updating Zikra
Server:
cd ~/zikra && ./update.sh
Claude Code hooks — re-run the onboarding prompt. It detects your existing install and only refreshes what changed.
Profiles
| Profile | Storage | Hooks | Extra deps |
|---|---|---|---|
| Webhook (default) | SQLite ¹ | none | none |
| Auto-log | SQLite ¹ | session hooks | none |
| Full | SQLite ¹ or Postgres | hooks + daemon | asyncpg (Postgres only) |
¹ SQLite is for local / single-user only. For team deployments set DB_BACKEND=postgres.
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
ZIKRA_TOKEN |
Yes | generated | Bearer token for the API |
OPENAI_API_KEY |
No | — | Enables semantic search. Keyword-only if absent. |
DB_BACKEND |
No | sqlite |
sqlite or postgres |
DB_HOST |
Postgres only | localhost |
|
DB_PORT |
Postgres only | 5432 |
|
DB_NAME |
Postgres only | — | |
DB_USER |
Postgres only | — | |
DB_PASSWORD |
Postgres only | — | |
ZIKRA_HOST |
No | 0.0.0.0 |
Bind address |
ZIKRA_PORT |
No | 8000 |
HTTP port |
ZIKRA_DB_PATH |
No | ./zikra.db |
SQLite database path |
ZIKRA_PROJECT |
No | main |
Default project |
OPENAI_API_BASE |
No | https://api.openai.com/v1 |
Swap for local or compatible embedding endpoint |
ZIKRA_EMBEDDING_MODEL |
No | text-embedding-3-small |
Embedding model name |
ZIKRA_DECAY_DAYS |
No | 30 |
Memory half-life in days |
ZIKRA_FREQUENCY_WEIGHT |
No | 0.1 |
Access-frequency boost weight |
How results are ranked
Every search result passes through scoring:
- Age — recent memories rank higher. Half-life: 30 days. Floor: 0.05.
- Access frequency — frequently used prompts surface higher (log scale).
- Confidence — memories saved with lower
confidence_scorerank lower.
Command reference
All commands are POST /webhook/zikra with Authorization: Bearer <token>.
| Command | Aliases | Description |
|---|---|---|
search |
find, query, recall |
Hybrid semantic + keyword search |
save_memory |
save, store |
Save a memory with embedding |
get_memory |
fetch_memory |
Retrieve by title or id |
get_prompt |
fetch_prompt |
Retrieve a named prompt |
log_run |
log_session |
Log a completed agent run |
log_error |
log_bug |
Log an error |
save_requirement |
— | Save a project requirement |
save_prompt |
write_prompt |
Save a prompt with embedding |
list_prompts |
get_prompts |
List prompts for a project |
list_requirements |
list_reqs |
List requirements |
promote_requirement |
promote |
Change a requirement's type |
create_token |
new_token |
Generate a bearer token (owner role) |
get_schema |
schema |
DB DDL introspection |
zikra_help |
help |
Full command reference |
debug_protocol |
— | Backend diagnostics |
Roles: owner · admin · developer · viewer
PostgreSQL backend
DB_BACKEND=postgres
DB_HOST=localhost
DB_PORT=5432
DB_NAME=ai_zikra
DB_USER=postgres
DB_PASSWORD=yourpassword
pip install -e ".[postgres]"
License
MIT — see LICENSE
Design in Claude Web. Execute in Claude Code. Share with your whole team. Claude Web · Claude Code · Gemini CLI · Codex · any agent that can POST.
Zikra MCP questions
How does Zikra handle memory for teams?
It provides a shared memory pool with role-based access control (RBAC) including owner, admin, developer, and viewer roles per project.
Can I host Zikra myself?
Yes, Zikra is designed to be self-hosted with no cloud dependency, using PostgreSQL or SQLite as a backend.
Does it support multiple AI tools?
Yes, it works across multiple AI tools such as Claude Code, Gemini CLI, and Codex.
How does the memory hygiene work?
It uses a built-in hygiene prompt that manages confidence decay, orphan detection, and stale cleanup.