Installation
Install the 0Latency MCP server globally via npm:
npm install -g @0latency/mcp-server
Or use it directly with npx (no installation required):
npx -y @0latency/mcp-server
Authentication
Get your API key from 0latency.ai. How you supply it depends on how you are using 0Latency:
CLI, SDKs and direct API calls — export it in your shell:
export ZERO_LATENCY_API_KEY=zl_live_...
Claude Desktop — do not rely on this export. Claude Desktop is launched by the operating system, not from your shell, so it never sees variables exported in a terminal. It reads the key from the env block inside claude_desktop_config.json instead — see MCP Setup below.
Your API key is used to authenticate all requests to the 0Latency memory API.
First Memory
Python SDK
Store and recall memories using the Python SDK:
from zerolatency import Memory
# Initialize the client
memory = Memory(api_key="zl_live_...")
# Store a memory
result = memory.seed(
agent_id="assistant-1",
facts=[{
"text": "User prefers concise responses",
"category": "preference"
}]
)
# Recall memories
memories = memory.recall(
agent_id="assistant-1",
query="How should I format my responses?"
)
print(memories)
JavaScript SDK
Use the JavaScript SDK in Node.js or browser environments:
import { Memory } from '@0latency/sdk';
// Initialize the client
const memory = new Memory({ apiKey: 'zl_live_...' });
// Store a memory
await memory.seed({
agentId: 'assistant-1',
facts: [{
text: 'User prefers dark mode',
category: 'preference'
}]
});
// Recall memories
const memories = await memory.recall({
agentId: 'assistant-1',
query: 'What are the user settings?'
});
console.log(memories);
MCP Setup
Connect 0Latency to Claude Desktop, Claude Code, Cursor, Windsurf, or any MCP-compatible client.
Recommended — let the package configure it for you
The server ships an init command that does the whole setup, including finding the config file:
export ZERO_LATENCY_API_KEY=zl_live_...
npx -y @0latency/mcp-server init
It asks which client you are configuring, writes the correct JSON to the correct path for that client, and then verifies a real memory write and recall against the API before it finishes — so you know it works before you restart anything. If you have not exported the key it will prompt for it.
Typical run:
? Which client are you configuring? Claude Desktop
✓ Found API key
✓ Config written to: ~/Library/Application Support/Claude/claude_desktop_config.json
⏳ Verifying memory write+recall...
✓ Memory verification: write+recall succeeded in 1.5s
✓ Restart Claude Desktop to apply changes
Alternative — edit the config by hand
Only needed if you would rather not run init, or your client is not in its list. Edit claude_desktop_config.json. It lives here:
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
If the file does not exist yet, create it. You can also open it straight from the app: Claude Desktop → Settings → Developer → Edit Config.
Add this to it:
{
"mcpServers": {
"0latency": {
"command": "npx",
"args": ["-y", "@0latency/mcp-server"],
"env": {
"ZERO_LATENCY_API_KEY": "zl_live_..."
}
}
}
}
Verify Connection
Restart Claude Desktop and verify the MCP server is connected:
- ✓ Look for the 0Latency icon in the toolbar
- ✓ Try: "Store this memory: I prefer Python over JavaScript"
- ✓ Try: "What programming language do I prefer?"
Next Steps — Choose Your Path
Get started based on your use case:
🧑💻 Casual User
Use ChatGPT, Claude, or Gemini? Get a free API key, install the Chrome extension, and your AI remembers everything.
Get API Key + Chrome Extension →👨💻 Developer / Team
Building AI agents? Integrate with MCP, Python/JS SDKs, or REST API.
View Integrations →All Integrations
0Latency works with your existing tools and frameworks:
MCP Server
Model Context Protocol
Claude Desktop
Native Claude app integration
Claude Code
Coding assistant memory
Cursor
AI code editor integration
Windsurf
Windsurf IDE memory
LangChain
LangChain agent memory
CrewAI
Persistent memory for crews
AutoGen
Multi-agent memory sharing
OpenClaw
Memory for OpenClaw agents
Claude.ai (Web)
Chrome extension for Claude
REST API
Direct API integration