# Titen Memory

Local agent memory engine powered by SQLite and FTS5 without external models or embedding APIs. Stores facts with clear source attribution and read access rules.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 16
- Author: RamaAditya49
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/RamaAditya49/titen
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/mcp/titen-memory

## What it does

Titen writes agent records and knowledge graphs to a local SQLite database at `~/.titen/memory.db`, or connects directly to Cloudflare D1. Lexical search relies on native FTS5 with stemming and ranked relevance. It makes zero LLM calls. No external vector providers are needed.

The server functions as an in-place alternative for `@modelcontextprotocol/server-memory`. It exposes the nine standard reference tools alongside ten dedicated `titen_*` actions while preserving tool schemas. When launched locally, it can read an existing `memory.json` store, and the built-in audit command inspects memory files for loops or exposed secrets.

Without Bun 1.2 or higher, the CLI halts immediately. The local setup runs over standard I/O in-process without outbound HTTP calls, though remote setups can be connected via `TITEN_MCP_URL` and `TITEN_API_KEY`.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `TITEN_MCP_URL`, `TITEN_API_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env TITEN_MCP_URL=<TITEN_MCP_URL> --env TITEN_API_KEY=<TITEN_API_KEY> --transport stdio titen-memory -- npx -y titen-memory
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add titen-memory --env TITEN_MCP_URL=<TITEN_MCP_URL> --env TITEN_API_KEY=<TITEN_API_KEY> -- npx -y titen-memory
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "titen-memory": {
            "command": "npx",
            "args": [
                "-y",
                "titen-memory"
            ],
            "env": {
                "TITEN_MCP_URL": "<TITEN_MCP_URL>",
                "TITEN_API_KEY": "<TITEN_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "titen-memory": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "titen-memory"
            ],
            "env": {
                "TITEN_MCP_URL": "<TITEN_MCP_URL>",
                "TITEN_API_KEY": "<TITEN_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e TITEN_MCP_URL=<TITEN_MCP_URL> -e TITEN_API_KEY=<TITEN_API_KEY> titen-memory npx -y titen-memory
```
Replace <…> with your own values

## When to use it
- Store agent context and knowledge graphs locally in SQLite
- Retrieve project facts using FTS5 lexical ranking without embedding APIs
- Replace reference server-memory while migrating existing files
- Audit external memory dumps for duplicates, stale items, and exposed secrets

## Example prompts
- Recall what we decided regarding the payment service architecture.
- Save a memory stating that this repository requires Bun 1.2 or newer.
- Search the knowledge graph for entities related to database migrations.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
