# memnos [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/thameema/memnos  
**GitHub Stars:** 7  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/memnos

## Description
Namespace-scoped, token-authenticated shared memory for AI coding agents. Self-hosted on Postgres (embedded by default). MCP server, REST API & Python SDK.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "memnos": {
    "command": "uvx",
    "args": ["memnos-sdk"]
  }
}
```

## Documentation

## What memnos does

memnos provides shared memory for AI coding agents, organized into namespaces and protected with scoped tokens. Stored information can include decisions, preferences, rules, plans, debugging solutions, and concrete outcomes. The system records conversations verbatim for search while extracting structured facts according to whether the message came from the user or assistant.

Its Git-aware memory links decisions and fixes to file paths, blob SHAs, and identifiers. During recall, changed or deleted code can be flagged so an agent is less likely to apply advice tied to an earlier version. Bi-temporal supersession closes out older facts when newer information replaces them, rather than presenting contradictory facts as equally current.

## How it works

The server uses PostgreSQL with pgvector. A default setup downloads an embedded PostgreSQL 16 and pgvector build, while external PostgreSQL and Docker-backed arrangements are also supported. Memory retrieval combines vector and BM25 search with a local ONNX cross-encoder reranker; the recall path does not require an LLM.

An optional OpenAI key enables 1536-dimensional embeddings and bi-temporal fact extraction. Without that key, memnos uses local 384-dimensional embeddings. Fact extraction can instead use an OpenAI-compatible endpoint such as Ollama, vLLM, or LM Studio by setting `MEMNOS_EXTRACT_BASE_URL`; embeddings remain local in that mode.

Agent coordination includes sessions, pub/sub channels, inboxes, work-item leases, and peer-memory envelopes. Server-side authorship attribution identifies which developer stored a fact. The `explain` capability exposes pinned constraints, relevance scores, and retrieval latency stages included in a prompt.

## Setup and configuration

Install the package with `uv tool install memnos`, then run `memnos setup` and `memnos start`. The embedded mode avoids Docker and other external dependencies on supported macOS arm64, Linux x86_64, and Windows x86_64 builds. `memnos setup --external` connects to an existing PostgreSQL instance, while `memnos setup --docker` uses a pgvector container.

Use `memnos init` to import `CLAUDE.md`, `AGENTS.md`, and `.cursorrules` as pinned constraints and load up to 90 days of Git history. Run `memnos agent-setup all` to configure hooks and MCP for Claude Code, Cursor, Codex, and Windsurf. The service also provides status, stop, restart, foreground serving, upgrade, and autostart commands.

## Tools and capabilities

- Namespace-scoped memory with token authentication
- Git-anchored provenance and code-drift warnings
- Bi-temporal fact replacement and stale-fact demotion
- Structured debugging records through `memnos fix` or `record_fix`
- MCP access plus REST API and Python SDK
- Shared sessions, channels, inboxes, leases, and auditable recall

## Limitations and notes

Automatic capture differs by client. Claude Code supports deterministic lifecycle-hook capture, and clients with configurable base URLs can use `memnos proxy`. MCP remains the capture route for clients without those options, including Claude Desktop. Assistant-derived facts are capped per reply by `MEMNOS_ASSISTANT_FACT_CAP`, whose default is six. Data extraction is optional, but using a remote extraction endpoint sends extraction requests to that endpoint; local-only operation is available with the local embedding mode.

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

