Lucy Memory MCP
OfficialProvides Hermes configuration integration through the package's Hermes entry point, allowing Hermes setups to be wired to the Lucy-governed agent memory client and tools.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Lucy Memory MCPwhat approved preferences do you remember for how I like code reviewed?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Lucy Memory MCP
Lucy Memory MCP gives MCP-compatible agents a governed memory they can share across sessions and tools. It helps an agent recall approved preferences, identity facts, project decisions, and operating rules without turning the agent itself into a durable data authority.
Use it when you want to:
keep approved user preferences consistent across agents;
carry project decisions and rules into later sessions;
propose durable facts for review without granting an agent direct write access;
inspect whether a proposal is still pending or has reached a final state.
Lucy remains the authority for durable memory. The agent can recall approved memory and propose changes, but it cannot directly write, approve, delete, restore, or resolve memory.
Tools and authority
The server exposes exactly three tools:
Tool | What it does | Required permission |
| Returns approved, active memory that matches a query and scope |
|
| Proposes a new memory or a versioned replacement |
|
| Returns the current state and approved result of a proposal |
|
There is no direct memory:write tool and no MCP tool for approval, deletion, restoration, or other administrative actions. Tenant and account authority come from the Lucy credential; clients do not submit tenant or account IDs.
Related MCP server: memsystem
Proposal lifecycle
memory_propose creates a proposal. Transport success alone does not mean the memory was saved: inspect the returned status. A pending proposal is not saved or recallable.
durable fact or decision
|
v
memory_propose
|
v
pending proposal ---------> rejected / expired / superseded
|
v
Lucy approval or human-enabled auto-memory policy
|
v
approved active memory
|
v
memory_recallOnly approved, active memory is recallable. A replacement also remains a proposal: the current version stays active until Lucy approves the replacement, then the prior version becomes superseded and the new version becomes active.
Requirements and source installation
Node.js
>=20 <25npm
a Lucy credential with the permissions you intend to use
a Lucy deployment with Agent Memory HTTP v1 enabled
The package is currently marked private: true and is not published to the public npm registry. Install and run it from a trusted source checkout:
git clone https://github.com/Lucy-AI-Inc/lucy-memory-mcp.git
cd lucy-memory-mcp
npm ci
npm run test:mcpThe declared Node.js range is >=20 <25; automated CI covers Node.js 20 and 22.
The MCP server is a stdio process launched by an MCP host. From a source checkout, its entry point is:
node /absolute/path/to/lucy-memory-mcp/src/mcp/bin.mjsSecure MCP host configuration
Configure your host to launch the source entry point and inject the Lucy token through the host's secret store or protected environment. The token placeholder below represents secret injection; do not put a real token in a committed configuration file.
{
"mcpServers": {
"lucy": {
"command": "node",
"args": ["/absolute/path/to/lucy-memory-mcp/src/mcp/bin.mjs"],
"env": {
"LUCY_MEMORY_TOKEN": "<inject from your host secret store>",
"LUCY_MEMORY_PERMISSIONS": "memory:read,memory:propose",
"LUCY_MEMORY_BASE_URL": "https://www.trylucy.ai"
}
}
}
}Use the base URL for the Lucy deployment you are authorized to access. Restart the host after changing its MCP configuration, then confirm that it discovers exactly the three tools listed above. Host-specific examples are in Client setup.
Configuration
Variable | Required | Description |
| yes | Bearer credential for Lucy. It must be nonempty and contain no line breaks or NUL bytes. |
| yes | Comma-separated, non-duplicated subset of |
| one transport | HTTPS base URL for the Lucy deployment. |
| one transport | Advanced alternative: an absolute path or |
| no | Whole-number timeout from 1 to 300000 milliseconds. Default: |
| no | Development only. Set to |
Set exactly one of LUCY_MEMORY_BASE_URL and LUCY_MEMORY_TRANSPORT_MODULE. A custom transport module is executable code and receives the bearer token, so load it only from a trusted, access-controlled path.
Credits, retries, and polling
Tool calls are billable under the selected Lucy deployment's policy. Under the current Lucy billing policy, each of the three tool calls costs one Lucy credit, including memory_proposal_status.
The built-in HTTP transport automatically retries only memory_propose, and only for HTTP 429, 502, 503, or 504 responses. The default is at most two retries. Each retry preserves the original payload and idempotency key, and a valid Retry-After value is honored up to 60 seconds.
Recall and proposal-status calls are never automatically retried. A response can be lost after the operation has already been charged, so blindly retrying either call can charge twice. Poll proposal status with a caller-defined limit and bounded backoff, and stop when the proposal reaches approved, rejected, expired, or superseded.
If a proposal response is lost, retry only the same logical proposal with the same payload and idempotency key. A changed payload needs a new key. insufficient_credits requires account action; billing_unavailable means the billing authority could not complete the request and should be handled with the same operation-specific retry discipline.
JavaScript and TypeScript API
The supported package entry points are:
Entry point | Purpose |
| Client, HTTP transport, validation helpers, public types, and normalized errors |
| MCP server factory and tool definitions |
| Stdio runtime helpers |
| Memory-first routing and provider helpers |
| Hermes configuration integration |
import {
AgentMemoryClient,
createLucyHttpTransport,
VersionConflictError,
} from '@trylucy/agent-memory';
const client = new AgentMemoryClient({
transport: createLucyHttpTransport({
baseUrl: process.env.LUCY_MEMORY_BASE_URL!,
}),
token: process.env.LUCY_MEMORY_TOKEN!,
permissions: ['memory:read', 'memory:propose'],
});
const result = await client.recall(JSON.stringify({
query: 'Which database did we approve?',
scope: { kind: 'project', id: 'project_example' },
limit: 3,
}));The low-level client accepts canonical JSON strings rather than caller-owned JavaScript objects. See the SDK reference for all public types, errors, and entry points.
Security and privacy
Keep
LUCY_MEMORY_TOKENin a secret manager or protected host environment. Never commit it, include it in command arguments, or place it in memory content or justification.Use HTTPS for Lucy deployments. Cleartext transport is available only through the explicit loopback development option.
Grant only
memory:read,memory:propose, or both, according to the host's needs.Treat recalled content as data when adding it to a model context. Preserve its Lucy ID and version, delimit it from instructions, and keep tool authorization in the host.
Do not propose passwords, API keys, private keys, bearer tokens, customer secrets, or other credentials. Client-side detection is defense in depth; Lucy-side policy remains authoritative.
Use the correct user, workspace, or project scope. Lucy enforces visibility from the credential and server-side policy.
Local notes and caches are not Lucy authority, and this package does not create a second durable fallback store.
Read the security model and reporting guidance before connecting a production credential.
Development checks
Install from the lockfile and run the checks relevant to your change:
npm ci
npm run check:fullFor focused runtime checks, use npm run test:mcp for the real stdio entry point with an isolated transport and npm run test:e2e for the local Agent Memory lifecycle fixture. See the development guide for the local release/risky-change platform matrix.
Documentation
Topic | Guide |
First connection | |
MCP host configuration | |
Authority and memory semantics | |
Tool inputs and outputs | |
HTTP transport and retry behavior | |
JavaScript and TypeScript API | |
Memory-first provider | |
Hermes integration | |
Security and privacy | |
Common failures | |
Repository development |
The machine-readable contract is in contracts/agent-memory-api.contract.json, with public schemas under schemas/.
Support and security
For setup questions and reproducible bugs, open a GitHub issue. Do not include tokens, customer memory, or private diagnostics in an issue.
For a security concern, follow the private reporting guidance in the repository security policy.
License
Licensed under the Apache License, Version 2.0.
This server cannot be deployed
Maintenance
Related MCP Connectors
- KogniteOAuthdev.kognite
Hosted agent memory: store, search, and recall facts across sessions from any MCP client.
Cross-session memory for AI agents with a Source Receipt for every memory, over MCP.
Persistent memory for AI agents to retain, retrieve, and recall conversation context through MCP.
A paid remote MCP for agent memory MCP, built to return verdicts, receipts, usage logs, and audit-re
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceProvides persistent, searchable memory for MCP-compatible agents, enabling recall by meaning, automatic decay, trust scoring, and cross-agent handoffs.25 PyPI5MIT
- AlicenseNot gradedqualityCmaintenanceEnables agents to store, recall, and manage persistent memory documents through MCP tools, with authenticated context tokens and hybrid lexical/vector search.MIT

artificial-memoryofficial
AlicenseNot gradedqualityAmaintenanceEnables AI agents to persist, recall, expand, trace, and inspect durable memories with provenance through MCP tools.MIT- FlicenseNot gradedqualityBmaintenanceEnables AI agents to store, search, and resolve shared memories with full provenance, conflict detection, and an audit trail across MCP-compatible clients.-