Setup Guides
Connect Memstate to your AI agent in 3 steps. Pick your agent or SDK below for a tailored guide with exact config paths and copy-paste snippets.
One-liner setup — auto-detects your agents
npx @memstate/mcp setupDetects installed agents, writes the MCP config automatically, and opens your browser to create an API key. Or follow a manual guide below.
AI Agents & Editors
Claude
Claude Desktop and Claude Code — persistent memory via MCP.
Cursor
Structured memory that persists across sessions and projects.
Cline (VS Code)
Long-term memory so Cline remembers your architecture and context.
Kilo Code
Versioned, structured memory for Kilo Code in VS Code.
Windsurf
Persistent context for Windsurf's Cascade agent across sessions.
Gemini CLI
Persistent project context for Google's Gemini CLI agent.
GitHub Copilot
Extend Copilot with persistent memory via the MCP protocol.
OpenCode
Add structured memory to the open-source OpenCode agent via MCP.
ChatGPT
Give ChatGPT Desktop persistent, project-scoped memory via MCP.
Any MCP Client
Universal guide for any agent that supports the Model Context Protocol.
SDK Integrations
Building your own agent? Each guide includes a working code example you can run immediately.
OpenAI Agents SDK
Python SDK with first-class MCP support via MCPServerStdio.
LangChain / LangGraph
Connect via langchain-mcp-adapters — works with any LangChain model.
Grok SDK (xAI)
Remote MCP over HTTP/SSE — no local server required.
Claude Agent SDK
Programmatic Claude Code agents with MCP server support.
Google ADK
Gemini-powered agents with McpToolset for structured memory.
Vercel AI SDK
TypeScript SDK — MCP tools work with generateText and streamText.
Universal MCP Config
Any MCP-compatible agent uses this same JSON snippet. Just add it to your agent's config file.
{
"mcpServers": {
"memstate": {
"command": "npx",
"args": ["-y", "@memstate/mcp"],
"env": {
"MEMSTATE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}Get your API key from the dashboard. No local installation required — npx handles it automatically.