claudex — Claude Code MCP server: features and setup
claudex gives Claude Code memory that carries across sessions and lets it search earlier conversations. Use it to recover project context or revisit a past decision.
claude mcp add --env PROJECT_ROOT=<PROJECT_ROOT> --transport stdio claudex -- npx -y @kunwarshah/claudexWhat claudex does
claudex adds persistent memory for Claude Code. It can retain project conventions, architecture notes, decisions, and recurring error patterns, with priority, confidence, and an expiration period attached to stored items. The server also supports conversation search and retrieval, plus three MCP prompts for accessing session history.
SQLite FTS5 powers its search, and claudex scans ~/.claude/projects to find conversations. You need Node.js 18+, npm, and Claude Code conversation history. Without saved history, there are no earlier sessions to search. Set PROJECT_ROOT when adding the server to provide project context.
What it helps with
- search past conversations by their content
- retain project conventions across sessions
- bring architecture decisions back into context
- record recurring errors for later sessions
Example prompts for the agent
- Find the earlier conversation about this project.
- Save the project's agreed structure in memory.
- Gather context from recent sessions before I continue.
How to install claudex
Platform CLI
claude mcp add --env PROJECT_ROOT=<PROJECT_ROOT> --transport stdio claudex -- npx -y @kunwarshah/claudexReplace <…> with your own values
Platform CLI
codex mcp add claudex --env PROJECT_ROOT=<PROJECT_ROOT> -- npx -y @kunwarshah/claudexReplace <…> with your own values
Config file
{
"mcpServers": {
"claudex": {
"command": "npx",
"args": [
"-y",
"@kunwarshah/claudex"
],
"env": {
"PROJECT_ROOT": "<PROJECT_ROOT>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"claudex": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@kunwarshah/claudex"
],
"env": {
"PROJECT_ROOT": "<PROJECT_ROOT>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e PROJECT_ROOT=<PROJECT_ROOT> claudex npx -y @kunwarshah/claudexReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about claudex
How do I install claudex in Claude Code?
Run claude mcp add claudex -- npx -y @kunwarshah/claudex. To configure a project root, use the other method: claude mcp add --env PROJECT_ROOT=<PROJECT_ROOT> --transport stdio claudex -- npx -y @kunwarshah/claudex.
What does claudex do?
It gives Claude Code memory across sessions and provides search over conversation history. Stored knowledge can include project conventions, architecture, decisions, and recurring errors.
What does claudex need to run?
You need Node.js 18+, npm, and Claude Code with conversation history. Set PROJECT_ROOT when you want to provide project context.