{
  "markdown": "# ainative-opencode-memory-mcp\n\n**Persistent memory for [OpenCode](https://opencode.ai) agents.** OpenCode is stateless — it forgets everything between sessions. This MCP server gives your OpenCode coding agent **long-term memory** powered by [AINative ZeroDB](https://ainative.studio/opencode?utm_source=npm&utm_medium=mcp&utm_campaign=opencode-memory): store a codebase's decisions, conventions, and gotchas once, and recall them in every future session.\n\n## Why\n\nOpenCode restarts with a blank slate every time. Your agent re-learns your architecture, re-asks the same questions, re-makes the same mistakes. With this MCP, it remembers:\n\n- Architecture & design decisions\n- Naming conventions and code style\n- Gotchas, workarounds, and \"don't touch X\" rules\n- User/team preferences\n\n## Install\n\n```bash\nnpm install -g ainative-opencode-memory-mcp\n```\n\n## Setup (OpenCode)\n\n1. **Get a free API key** → [ainative.studio/signup](https://ainative.studio/signup?utm_source=npm&utm_medium=mcp&utm_campaign=opencode-memory) (Hobbyist $5/mo, 7-day free trial).\n2. Add to your OpenCode MCP config (`opencode.json` / MCP settings):\n\n```json\n{\n  \"mcpServers\": {\n    \"ainative-memory\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"ainative-opencode-memory-mcp\"],\n      \"env\": { \"AINATIVE_API_KEY\": \"your-key-here\" }\n    }\n  }\n}\n```\n\n## Tools\n\n| Tool | What it does |\n|------|--------------|\n| `opencode_store_memory` | Remember a fact/decision/snippet (optional tags) |\n| `opencode_search_memory` | Semantic search over everything remembered |\n| `opencode_recall_context` | Reload relevant memories at the start of a task |\n| `opencode_memory_stats` | How many memories are stored |\n| `opencode_clear_memory` | Wipe memories (optionally by tag) |\n\n## Example\n\nAt the start of a session, have your agent call `opencode_recall_context` with the file/task you're working on — it reloads what it knew. As you work, `opencode_store_memory` captures new decisions. Next session, it all comes back.\n\n## Environment\n\n| Var | Default | Notes |\n|-----|---------|-------|\n| `AINATIVE_API_KEY` | — | **Required.** Free at ainative.studio |\n| `OPENCODE_MEMORY_NAMESPACE` | `opencode` | Isolate memories per project |\n| `AINATIVE_API_URL` | `https://api.ainative.studio` | Override for self-host |\n\n---\n\nBuilt by [AINative Studio](https://ainative.studio/opencode?utm_source=npm&utm_medium=mcp&utm_campaign=opencode-memory) — the AI-native dev platform with 65+ models, one OpenAI-compatible endpoint, and persistent agent memory. MIT licensed.\n",
  "bytes": 2525,
  "sha": "0295cc42740c35e0db26478cf9d33eab07c9bce2ffd4f258e775eb971cdfb961",
  "repo_slug": "ainative-studio/ainative-opencode-memory-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_ainative_studio_ainative_openc_3dfec377/readme"
}