AnchorMindANCHORMIND
SIGN IN

Documentation

The current guide to connecting AnchorMind from Codex, Claude Code, Cursor, Gemini CLI, and VS Code—and operating the memory lifecycle.

1. Getting Started

  1. Sign up with GitHub and get admin approval.
  2. Issue an API access key in the console.
  3. Register the MCP server in your agent (Codex, Claude Code, Cursor, Gemini CLI, or VS Code).
  4. Verify the integration with a first remember → recall round trip.

2. Connection

The endpoint speaks Streamable HTTP (JSON-RPC); authentication uses a Bearer header.

Endpoint: https://memento.anchormind.net/mcp
Auth: Authorization: Bearer <ACCESS_KEY>

3. Codex Setup

Codex CLI, the IDE extension, and ChatGPT desktop share ~/.codex/config.toml. Keep the token out of the file and pass it through the ANCHORMIND_ACCESS_KEY environment variable.

[mcp_servers.anchormind]
url = "https://memento.anchormind.net/mcp"
bearer_token_env_var = "ANCHORMIND_ACCESS_KEY"
required = true

After adding the environment variable, restart Codex or the desktop app and verify with codex mcp list or /mcp.

Codex does not show MCP tools to the model directly, so a plain connection never uses memory. Put the Codex memory instructions from Downloads into ~/.codex/AGENTS.md so that Codex loads memory at the start of a task and saves decisions and fixes.

4. Claude Code Setup

Register the remote server over HTTP, the recommended transport. Use project-root .mcp.json for a shared project setup or the CLI's --scope user for all projects. Templates are available in Downloads.

export ANCHORMIND_ACCESS_KEY="YOUR_ACCESS_KEY"
claude mcp add --transport http --scope user anchormind https://memento.anchormind.net/mcp \
  --header "Authorization: Bearer $ANCHORMIND_ACCESS_KEY"
claude mcp list

5. Cursor Setup

Use .cursor/mcp.json for a project or ~/.cursor/mcp.json globally. Restart Cursor after configuring and confirm the AnchorMind tools under Available Tools.

{
  "mcpServers": {
    "anchormind": {
      "url": "https://memento.anchormind.net/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_ACCESS_KEY"
      }
    }
  }
}

6. Gemini CLI Setup

Register the Streamable HTTP server and Authorization header from the CLI. Project settings live in .gemini/settings.json; user settings live in ~/.gemini/settings.json.

export ANCHORMIND_ACCESS_KEY="YOUR_ACCESS_KEY"
gemini mcp add --transport http anchormind https://memento.anchormind.net/mcp \
  --header "Authorization: Bearer $ANCHORMIND_ACCESS_KEY"

7. VS Code and GitHub Copilot Setup

For new setups, use portable .mcp.json at the project root. Request the secret through an input variable instead of storing it in the file.

{
  "mcpServers": {
    "anchormind": {
      "type": "http",
      "url": "https://memento.anchormind.net/mcp",
      "headers": {
        "Authorization": "Bearer ${input:anchormind-access-key}"
      }
    }
  }
}

8. Agent Skill and Memory Lifecycle

The MCP connection exposes tools; the Skill defines when to use them. The compact Agent Skill is the per-session operating contract, while the canonical Skill is the full tool and recovery reference.

Install the compact Skill in a Codex project

mkdir -p .agents/skills/anchormind
curl -fsSL https://anchormind.net/docs/anchormind-agent-skill.md \
  -o .agents/skills/anchormind/SKILL.md
  1. Start: load core memory with context, then recall the current topic.
  2. During work: remember confirmed facts, decisions, and resolved procedures; send tool_feedback for search results.
  3. End: use reflect to persist summaries, decisions, and resolved errors as atomic fragments.

For current details, read only the needed section from the server with get_skill_guide(section=...).

9. Memory Tool Reference

contextLoad Core/Working Memory at session start.
PARAMSOptional: tokenBudget (default 2000) · types (default preference·error·procedure) · sessionId · structured · workspace
RETURNSANCHOR/CORE MEMORY fragment lists, _meta.hints
recallSearch fragments. Keyword/semantic/hybrid auto-routing.
PARAMSAt least one of keywords · text (natural language) · topic recommended / optional: type · tokenBudget (default 1000) · caseMode · depth · timeRange · threshold · pageSize
RETURNSfragments[], _meta.searchEventId · hints · suggestion
rememberStore one self-contained fact (1-3 sentences, 300 chars recommended).
PARAMSRequired: content (rejected over 4000 chars) · topic · type / optional: keywords (3-5) · importance · isAnchor · caseId · supersedes
RETURNSCreated fragment id, validation_warnings
batch_rememberBulk store up to 200 fragments in one transaction.
PARAMSRequired: fragments[] (each with content · topic · type) / optional: async (queue-backed)
RETURNSSync: per-item results / async: accepted count and jobId
batch_statusCheck a batch_remember(async) job. Read-only.
PARAMSRequired: jobId
RETURNSstate (queued|processing|completed|dead) · accepted · processed · failed
reflectPersist session learnings as atomic fragments.
PARAMSAt least one of summary or sessionId required / optional: decisions · errors_resolved · new_procedures · open_questions · narrative_summary
RETURNSCreated fragments, _meta.link_suggestions
amendUpdate an existing fragment. Send only changed fields.
PARAMSRequired: id / optional: content · topic · keywords · importance · assertionStatus (observed|inferred|verified|rejected)
RETURNSUpdate result
forgetDelete resolved errors and unneeded fragments.
PARAMSid or topic / optional: force (hard-delete permanent fragments)
RETURNSDeletion result
linkCreate causal/relational links between fragments.
PARAMSRequired: fromId · toId / optional: relationType (related default, caused_by · resolved_by · part_of · contradicts) · weight
RETURNSLink creation result
graph_exploreTrace error causality (RCA).
PARAMSRequired: startId (error fragment recommended)
RETURNS1-hop caused_by/resolved_by causal graph
fragment_historyView a fragment change history.
PARAMSRequired: id
RETURNSPre-amend versions, superseded_by chain
reconstruct_historyReconstruct case work history in time order.
PARAMSOne of caseId or entity required / optional: timeRange · query · limit (default 100)
RETURNSordered_timeline · causal_chains · unresolved_branches · case_events · summary
search_tracesLightweight grep-style fragment scan.
PARAMSOptional: event_type · entity_key · keyword · case_id · session_id · time_range · limit (default 20)
RETURNStraces[] · count
tool_feedbackReport search usefulness (link-weight learning).
PARAMSRequired: tool_name · relevant · sufficient / optional: fragment_ids · search_event_id
RETURNSFeedback application result
memory_statsMemory statistics and quota.
PARAMSNone
RETURNSFragment counts · quota and other statistics
memory_consolidateManual GC trigger (master key only).
PARAMSNone
RETURNSTTL transitions · decay · expiry deletion · dedup results
check_updateCheck whether a newer server release is available (master key only).
PARAMSOptional: force (bypass the release-check cache)
RETURNSCurrent version · latest version · update availability
apply_updateRun one update stage after check_update (master key only).
PARAMSRequired: step (fetch|install|migrate) / optional: dryRun (default true)
RETURNSPreview or execution result for the selected update stage
session_rotateEnd the current session and issue a new sessionId.
PARAMSOptional: reason (recorded in the audit log)
RETURNSNew sessionId
get_skill_guideReturn the SKILL.md usage guide.
PARAMSOptional: section (overview · lifecycle · tools, etc.)
RETURNSFull guide (about 12KB) or the given section

10. Verifying the Integration

After connecting, confirm the round trip with this checklist.

  1. Call context → check the ANCHOR/CORE MEMORY response (an empty list is normal for a new account).
  2. Store one fragment with remember → check success and the fragment id in the response.
  3. Search that keyword with recall → the fragment you just stored should return.
  4. Call reflect at session end → confirm summary fragments are created.

11. curl Fallback

If the MCP session expires, call the JSON-RPC endpoint directly: issue a session via initialize, then pass it in the MCP-Session-Id header.

1. Initialize a session — keep the MCP-Session-Id response header

SESSION_ID=$(curl -s -X POST https://memento.anchormind.net/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_KEY" \
  -D - \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}' \
  2>/dev/null | grep -i "^mcp-session-id" | tr -d '\r' | awk '{print $2}')

2. Call a tool — remember example

curl -s -X POST https://memento.anchormind.net/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_KEY" \
  -H "MCP-Session-Id: $SESSION_ID" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{
    "name":"remember",
    "arguments":{"content":"connection test","topic":"setup","type":"fact"}
  }}'

3. Validate the response

Essential features do not require tracking. Google Analytics and AdSense load only after you opt in. Learn more