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.

1

Create an account

Sign up at memexa.dev/register and create your first project to get an API key.

2

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

3

Tell your AI to load context

At the start of every session, just say:

“Use get_context to load the context for project [your project name]”

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

VariableRequiredDescription
MEMEXA_API_KEYYesYour project API key from the dashboard
MEMEXA_API_URLNoAPI endpoint (default: https://api.memexa.dev)

MCP Tools

Memexa exposes the following tools to your AI agent via the Model Context Protocol:

get_context

Load project context at session start

update_context

Update context with session changes

search_memory

Semantic search in project history

compare_sessions

Compare current state with N sessions ago

add_decision

Record technical decisions

log_bug

Log bugs with cause and solution

get_project_status

Quick project status summary

validate_context

Analyze 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

ParameterTypeRequiredDescription
task_hintstringNoOptional hint about the current task for better context prioritization
max_tokensnumberNoToken limit (1000-32000, default: 8000)
Example Usage
{
  "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

ParameterTypeRequiredDescription
decisionsarrayNoList of decisions made during the session
bugsarrayNoList of bugs encountered and fixed
progressobjectNoUpdated progress information
files_changedarrayNoList of files modified in the session
Example Usage
{
  "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

ParameterTypeRequiredDescription
querystringYesNatural language search query
typestringNoFilter by type: "decision", "bug", "convention", or "progress"
limitnumberNoMaximum results to return (max: 20)
Example Usage
{
  "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

ParameterTypeRequiredDescription
nnumberYesNumber of sessions to go back (minimum: 1)
Example Usage
{
  "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

ParameterTypeRequiredDescription
decisionstringYesThe decision that was made
contextstringYesWhy this decision was made
alternativesarrayNoOther options that were considered
Example Usage
{
  "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

ParameterTypeRequiredDescription
descriptionstringYesWhat the bug was
causestringYesRoot cause of the bug
solutionstringYesHow it was fixed
filestringNoFile where the bug occurred
Example Usage
{
  "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.

Example Usage
{}

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.

Example Usage
{}

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:

  1. Go to your project's History page in the dashboard
  2. Select the session you want to restore
  3. Preview the changes that will be reverted
  4. Confirm the rollback

Note:Rollback creates a new snapshot with the restored state — it doesn't delete history.