Documentation
Learn how to integrate Memexa with Claude Code, Cursor, and other MCP-compatible AI agents.
Quick Start
Not a developer?
You don't need to write code to use Memexa. If you build with Claude Desktop, Cursor, or any MCP-compatible AI tool, you can follow the same steps below — just paste the config when prompted. If you use Bolt, Lovable, or ChatGPT, use the dashboard to manually save and load your project context between sessions.
Create an account
Sign up at memexa.dev/register and create your first project to get an API key.
Connect your AI agent
Paste this config into your agent's MCP settings. Replace your-api-key-here with the key from your dashboard.
{
"mcpServers": {
"memexa": {
"command": "npx",
"args": ["-y", "@memexa/mcp-server"],
"env": {
"MEMEXA_API_KEY": "your-api-key-here"
}
}
}
}Claude Desktop: Settings → Developer → Edit Config · Cursor: Settings → MCP Servers
Tell your AI to load context
At the start of every session, just say:
That's it. Your AI now remembers everything from your previous sessions — decisions, bugs, progress.
Installation
Claude Code
Add to your ~/.claude/mcp.json:
{
"mcpServers": {
"memexa": {
"command": "npx",
"args": ["-y", "@memexa/mcp-server"],
"env": {
"MEMEXA_API_KEY": "memexa_..."
}
}
}
}Cursor
Go to Cursor Settings → MCP → Add Server, then configure:
{
"name": "memexa",
"command": "npx",
"args": ["-y", "@memexa/mcp-server"],
"env": {
"MEMEXA_API_KEY": "memexa_..."
}
}Configuration
| Variable | Required | Description |
|---|---|---|
MEMEXA_API_KEY | Yes | Your project API key from the dashboard |
MEMEXA_API_URL | No | API endpoint (default: https://api.memexa.dev) |
MCP Tools
Memexa exposes the following tools to your AI agent via the Model Context Protocol:
get_contextLoad project context at session start
update_contextUpdate context with session changes
search_memorySemantic search in project history
compare_sessionsCompare current state with N sessions ago
add_decisionRecord technical decisions
log_bugLog bugs with cause and solution
get_project_statusQuick project status summary
validate_contextAnalyze context coherence
get_context
Load the full project context at the beginning of each session. This is the foundational tool that gives your AI agent access to all project knowledge.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
task_hint | string | No | Optional hint about the current task for better context prioritization |
max_tokens | number | No | Token limit (1000-32000, default: 8000) |
{
"task_hint": "Implementing user authentication",
"max_tokens": 12000
}Returns
Returns structured project context including stack, conventions, progress, and relevant historical decisions/bugs.
update_context
Update the project context at the end of a session with all changes made. This is how your work gets saved for future sessions.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
decisions | array | No | List of decisions made during the session |
bugs | array | No | List of bugs encountered and fixed |
progress | object | No | Updated progress information |
files_changed | array | No | List of files modified in the session |
{
"decisions": [
{
"decision": "Use JWT for authentication",
"context": "Stateless auth needed for microservices",
"alternatives": ["Session-based auth", "OAuth only"]
}
],
"bugs": [
{
"description": "API returns 500 on empty body",
"cause": "Missing null check",
"solution": "Added validation middleware"
}
],
"progress": {
"completed_tasks": ["Setup auth routes", "Add JWT middleware"],
"current_task": "Implement refresh token logic",
"blockers": []
},
"files_changed": ["src/auth/routes.ts", "src/middleware/auth.ts"]
}search_memory
Perform semantic search across all project history to find relevant decisions, bugs, conventions, or progress updates.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Natural language search query |
type | string | No | Filter by type: "decision", "bug", "convention", or "progress" |
limit | number | No | Maximum results to return (max: 20) |
{
"query": "How did we handle rate limiting?",
"type": "decision",
"limit": 5
}Returns
Returns ranked list of matching items from project history with relevance scores.
compare_sessions
Compare the current project state with a previous session to see what has changed over time.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
n | number | Yes | Number of sessions to go back (minimum: 1) |
{
"n": 3
}Returns
Returns a diff showing changes in decisions, bugs, progress, and conventions between then and now.
add_decision
Record an important technical or architectural decision for future reference. Helps maintain consistency across sessions.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
decision | string | Yes | The decision that was made |
context | string | Yes | Why this decision was made |
alternatives | array | No | Other options that were considered |
{
"decision": "Use JWT for authentication",
"context": "Stateless authentication better suits our microservices architecture and allows for horizontal scaling",
"alternatives": [
"Session-based authentication with Redis",
"OAuth-only authentication"
]
}log_bug
Log a bug encountered during development along with its cause and solution. Prevents repeating the same mistakes in future sessions.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
description | string | Yes | What the bug was |
cause | string | Yes | Root cause of the bug |
solution | string | Yes | How it was fixed |
file | string | No | File where the bug occurred |
{
"description": "API returns 500 error when request body is empty",
"cause": "Missing null check in request parser middleware",
"solution": "Added validation middleware to check for empty bodies before parsing",
"file": "src/api/middleware/parser.ts"
}get_project_status
Get a quick summary of the current project status including recent activity, progress, and key metrics.
Parameters
This tool takes no parameters.
{}Returns
Returns a summary including total sessions, recent decisions, open bugs, and current progress state.
validate_context
Analyze the project context for coherence, consistency, and potential issues. Useful for detecting conflicting decisions or outdated information.
Parameters
This tool takes no parameters.
{}Returns
Returns validation results including coherence score, detected conflicts, and recommendations for improvement.
Context Files
Memexa structures your project memory into three specialized files:
project.json — Stable Truth
Contains your stack, architecture, and conventions. Modified rarely, only when fundamental project decisions change.
progress.json — Current State
Tracks what's done, in progress, and next up. Updated every session to reflect current development state.
memory.json — Experience Log
Append-only log of decisions made, bugs fixed, and lessons learned. Never deleted, always growing.
Snapshots
Memexa automatically creates snapshots at the end of each session. Snapshots capture:
- Complete state of all three context files
- Session metadata (agent used, timestamp)
- Summary of changes made during the session
View and manage snapshots in the dashboard.
Rollback
Made a mistake? Rollback to any previous snapshot to restore your project context:
- Go to your project's History page in the dashboard
- Select the session you want to restore
- Preview the changes that will be reverted
- Confirm the rollback
Note:Rollback creates a new snapshot with the restored state — it doesn't delete history.