Lians Agent Memory — Claude Code MCP server: what it does, install
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.
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-sdkWhat Lians Agent Memory 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.
What it helps with
- 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 for the agent
- 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.
How to install Lians Agent Memory
Platform CLI
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-sdkReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from lians-sdk <command>
Platform CLI
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-sdkReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from lians-sdk <command>
Config file
{
"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>
Config file
{
"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>
Platform CLI
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-sdkReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from lians-sdk <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Lians Agent Memory
How to install Lians Agent Memory in Claude Code?
Run claude mcp add lians -e LIANS_API_KEY=<LIANS_API_KEY> -- uvx lians-sdk. If you need custom environment variables, run `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`.
What does Lians Agent Memory do?
It maintains persistent task state across coding sessions and prevents assistants from marking jobs finished without measured evidence.
Where does the server save data locally?
By default, the server writes local records to a database at ~/.lians/mcp.db.