# Lians Agent Memory

This MCP server tracks task state across agent sessions and rejects unverified completion. It stops models from reporting tasks as done without real test or CI confirmation.

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

## What it does

Lians keeps track of decisions and open tasks across terminal runs or IDE prompts. Instead of replaying full chat logs, it extracts changed items, current constraints, and next steps. Checkpoints bind directly to the repository state, stopping the assistant from relying on outdated findings.

The server enforces a separated trust model. Self-reported assertions like "tests passed" remain unverified context and cannot open the handoff gate. Progress toward human review requires measurable evidence from local test executions, matched CI commit checks, or direct operator approval.

Standard recovery runs locally without requiring a remote account or vendor API token. By default, records go to SQLite at `~/.lians/mcp.db`. Running the server via `uvx` requires `uv` on your machine.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `LIANS_URL`, `LIANS_API_KEY`, `LIANS_AGENT_ID`, `LIANS_LOCAL_DB`, `LIANS_NAMESPACE` — 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 LIANS_URL=<LIANS_URL> --env LIANS_API_KEY=<LIANS_API_KEY> --env LIANS_AGENT_ID=<LIANS_AGENT_ID> --env LIANS_LOCAL_DB=<LIANS_LOCAL_DB> --env LIANS_NAMESPACE=<LIANS_NAMESPACE> --transport stdio lians-agent-memory -- uvx lians-sdk
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from lians-sdk <command>

### Codex

**Platform CLI**
```bash
codex mcp add lians-agent-memory --env LIANS_URL=<LIANS_URL> --env LIANS_API_KEY=<LIANS_API_KEY> --env LIANS_AGENT_ID=<LIANS_AGENT_ID> --env LIANS_LOCAL_DB=<LIANS_LOCAL_DB> --env LIANS_NAMESPACE=<LIANS_NAMESPACE> -- uvx lians-sdk
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from lians-sdk <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "lians-agent-memory": {
            "command": "uvx",
            "args": [
                "lians-sdk"
            ],
            "env": {
                "LIANS_URL": "<LIANS_URL>",
                "LIANS_API_KEY": "<LIANS_API_KEY>",
                "LIANS_AGENT_ID": "<LIANS_AGENT_ID>",
                "LIANS_LOCAL_DB": "<LIANS_LOCAL_DB>",
                "LIANS_NAMESPACE": "<LIANS_NAMESPACE>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from lians-sdk <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "lians-agent-memory": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "lians-sdk"
            ],
            "env": {
                "LIANS_URL": "<LIANS_URL>",
                "LIANS_API_KEY": "<LIANS_API_KEY>",
                "LIANS_AGENT_ID": "<LIANS_AGENT_ID>",
                "LIANS_LOCAL_DB": "<LIANS_LOCAL_DB>",
                "LIANS_NAMESPACE": "<LIANS_NAMESPACE>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from lians-sdk <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e LIANS_URL=<LIANS_URL> -e LIANS_API_KEY=<LIANS_API_KEY> -e LIANS_AGENT_ID=<LIANS_AGENT_ID> -e LIANS_LOCAL_DB=<LIANS_LOCAL_DB> -e LIANS_NAMESPACE=<LIANS_NAMESPACE> lians-agent-memory uvx lians-sdk
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from lians-sdk <command>

## When to use it
- resume interrupted tasks across fresh agent sessions
- block task completion when claims lack test evidence
- invalidate stale checkpoints after repository changes
- hand off structured project context instead of full chat histories

## Example prompts
- Recall the architectural decisions made for the authentication flow.
- Save this database migration checkpoint and show open checklist items.
- Prepare the current task state for human review.

## Similar
- [State Memory MCP](https://affpapa.org/en/nevibecode/mcp/state-memory-mcp.md) — MCP server · ★ 39
- [neverinfamous-memory-journal-mcp](https://affpapa.org/en/nevibecode/mcp/neverinfamous-memory-journal-mcp.md) — MCP server · ★ 20
- [Mneme Memory](https://affpapa.org/en/nevibecode/mcp/mneme-memory.md) — MCP server · ★ 182
- [Cairn.ink Memory](https://affpapa.org/en/nevibecode/mcp/cairnink-memory.md) — MCP server · ★ 31
- [LLMSlim memory](https://affpapa.org/en/nevibecode/mcp/llmslim-memory.md) — MCP server · ★ 22
- [memory-continue](https://affpapa.org/en/nevibecode/skills/memory-continue.md) — skill · 1300 installs

---
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
