Prerequisites
- A MemContext account at app.memcontext.in
- An API key (create one under Settings > API Keys)
Claude Code
Step 1 — Add the MCP server via CLI:~/.claude.json:
~/.claude/CLAUDE.md:
Cursor
Step 1 — Add this to~/.cursor/mcp.json:
OpenCode
Step 1 — Add the MCP server to~/.config/opencode/opencode.json:
~/.config/opencode/AGENTS.md.
Codex CLI
Step 1 — Add the MCP server to~/.codex/config.toml:
~/.codex/instructions.md.
Agent instructions
These instructions tell your AI assistant how and when to use MemContext. Add them to the preferences file for your client (listed above):| Client | Preferences file |
|---|---|
| Claude Code | ~/.claude/CLAUDE.md |
| Cursor | Cursor Settings > Rules and commands > User Rules |
| OpenCode | ~/.config/opencode/AGENTS.md |
| Codex CLI | ~/.codex/instructions.md |
Available tools
Once connected, your assistant has access to four tools:| Tool | Purpose |
|---|---|
save_memory | Persist preferences, facts, decisions, and context |
search_memory | Find relevant memories before responding |
memory_feedback | Rate memory quality after retrieval |
delete_memory | Remove a memory by ID |
Verifying the connection
After setup, ask your assistant:“Search your memory for any information about me.”If the connection is working, it will call
search_memory and return results (or an empty set if no memories exist yet).