# Search Memory

> Search Memory is an open-source MCP server for knowledge and memory. Local web search, page reading and long-term memory for AI assistants, no API keys. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, macOS, Windows, Linux
- **Repository:** https://github.com/kefyusuf/search-memory-mcp
- **MCP Registry name:** io.github.kefyusuf/search-memory-mcp
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory), [web search and scraping](https://ai-powered.com/categories/web-search-and-scraping)
- **Listing updated:** 2026-11-23

## About

Search Memory runs on your own machine as an npm stdio server, with its cache, memory, index and models stored locally in a SQLite database. Search works without keys through scraped providers (DuckDuckGo, Bing, Brave, Google, Yahoo, Marginalia) with ordered fallback, and optional keys add Brave API, Tavily or Exa, or you can point it at a SearXNG instance.

Pages are fetched as clean Markdown, with fast paths for GitHub and RSS, text extraction from PDF, DOCX and EPUB up to 25 MB, and a Playwright Chromium browser only when a page needs it. Indexed pages and documents form a private knowledge base searched by keyword plus semantic matching, and one research call checks the index, searches the web, reads top pages and answers with citations and publish and fetch dates.

Fetched text has hidden characters removed and is marked as data so the assistant is told not to follow instructions in it. fetch_content and index_url block localhost and private network targets, and local file reading is off unless INGEST_ALLOWED_DIRS is set. It needs Node.js 20.9 to 25, or can run in Docker.

## Features

- **Keyless web search:** Federated search with deduplication, rank fusion, domain and date filters.
- **Pages as Markdown:** Clean extraction with PDF, DOCX and EPUB support and a browser fallback.
- **Cross-session memory:** remember, recall and forget notes scoped by topic, tags and session.
- **Private knowledge base:** Hybrid keyword and semantic retrieval with citations.
- **Research with citations:** One call that searches the index and web and keeps the pages for later.
- **Safer fetching:** SSRF protection, rate limiting and stripped hidden text.

## Good for

- Research a topic and keep the sources for next session
- Build a searchable library of documentation and PDFs
- Save notes an assistant can recall later
- Search the web without paying for an API
- Check how fresh a source is from its publish date

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add search-memory-mcp --env BRAVE_SEARCH_API_KEY='<BRAVE_SEARCH_API_KEY>' --env TAVILY_API_KEY='<TAVILY_API_KEY>' --env EXA_API_KEY='<EXA_API_KEY>' -- npx -y search-memory-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "search-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "search-memory-mcp"
      ],
      "env": {
        "BRAVE_SEARCH_API_KEY": "<BRAVE_SEARCH_API_KEY>",
        "TAVILY_API_KEY": "<TAVILY_API_KEY>",
        "EXA_API_KEY": "<EXA_API_KEY>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "search-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "search-memory-mcp"
      ],
      "env": {
        "BRAVE_SEARCH_API_KEY": "<BRAVE_SEARCH_API_KEY>",
        "TAVILY_API_KEY": "<TAVILY_API_KEY>",
        "EXA_API_KEY": "<EXA_API_KEY>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "search-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "search-memory-mcp"
      ],
      "env": {
        "BRAVE_SEARCH_API_KEY": "<BRAVE_SEARCH_API_KEY>",
        "TAVILY_API_KEY": "<TAVILY_API_KEY>",
        "EXA_API_KEY": "<EXA_API_KEY>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "search-memory-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "search-memory-mcp"
      ],
      "env": {
        "BRAVE_SEARCH_API_KEY": "<BRAVE_SEARCH_API_KEY>",
        "TAVILY_API_KEY": "<TAVILY_API_KEY>",
        "EXA_API_KEY": "<EXA_API_KEY>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add search-memory-mcp --env BRAVE_SEARCH_API_KEY='<BRAVE_SEARCH_API_KEY>' --env TAVILY_API_KEY='<TAVILY_API_KEY>' --env EXA_API_KEY='<EXA_API_KEY>' -- npx -y search-memory-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.search-memory-mcp]
command = "npx"
args = ["-y", "search-memory-mcp"]
env = { BRAVE_SEARCH_API_KEY = "<BRAVE_SEARCH_API_KEY>", TAVILY_API_KEY = "<TAVILY_API_KEY>", EXA_API_KEY = "<EXA_API_KEY>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "search-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "search-memory-mcp"
      ],
      "env": {
        "BRAVE_SEARCH_API_KEY": "<BRAVE_SEARCH_API_KEY>",
        "TAVILY_API_KEY": "<TAVILY_API_KEY>",
        "EXA_API_KEY": "<EXA_API_KEY>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e BRAVE_SEARCH_API_KEY='<BRAVE_SEARCH_API_KEY>' -e TAVILY_API_KEY='<TAVILY_API_KEY>' -e EXA_API_KEY='<EXA_API_KEY>' search-memory-mcp npx -- -y search-memory-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "search-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "search-memory-mcp"
      ],
      "env": {
        "BRAVE_SEARCH_API_KEY": "<BRAVE_SEARCH_API_KEY>",
        "TAVILY_API_KEY": "<TAVILY_API_KEY>",
        "EXA_API_KEY": "<EXA_API_KEY>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "search-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "search-memory-mcp"
      ],
      "env": {
        "BRAVE_SEARCH_API_KEY": "<BRAVE_SEARCH_API_KEY>",
        "TAVILY_API_KEY": "<TAVILY_API_KEY>",
        "EXA_API_KEY": "<EXA_API_KEY>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "search-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "search-memory-mcp"
      ],
      "env": {
        "BRAVE_SEARCH_API_KEY": "<BRAVE_SEARCH_API_KEY>",
        "TAVILY_API_KEY": "<TAVILY_API_KEY>",
        "EXA_API_KEY": "<EXA_API_KEY>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "search-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "search-memory-mcp"
      ],
      "env": {
        "BRAVE_SEARCH_API_KEY": "<BRAVE_SEARCH_API_KEY>",
        "TAVILY_API_KEY": "<TAVILY_API_KEY>",
        "EXA_API_KEY": "<EXA_API_KEY>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "search-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "search-memory-mcp"
      ],
      "env": {
        "BRAVE_SEARCH_API_KEY": "<BRAVE_SEARCH_API_KEY>",
        "TAVILY_API_KEY": "<TAVILY_API_KEY>",
        "EXA_API_KEY": "<EXA_API_KEY>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "search-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "search-memory-mcp"
      ],
      "env": {
        "BRAVE_SEARCH_API_KEY": "<BRAVE_SEARCH_API_KEY>",
        "TAVILY_API_KEY": "<TAVILY_API_KEY>",
        "EXA_API_KEY": "<EXA_API_KEY>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "search-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "search-memory-mcp"
      ],
      "env": {
        "BRAVE_SEARCH_API_KEY": "<BRAVE_SEARCH_API_KEY>",
        "TAVILY_API_KEY": "<TAVILY_API_KEY>",
        "EXA_API_KEY": "<EXA_API_KEY>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "search-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "search-memory-mcp"
      ],
      "env": {
        "BRAVE_SEARCH_API_KEY": "<BRAVE_SEARCH_API_KEY>",
        "TAVILY_API_KEY": "<TAVILY_API_KEY>",
        "EXA_API_KEY": "<EXA_API_KEY>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 6 of 12 tools read data; 6 names don't say. From the server's own tool labels and tool names; not verified by us.

- `web_search` (name suggests: reads): Search the web through configurable providers.
- `fetch_content` (name suggests: reads): Fetch a page or document as clean text.
- `index_url`: Index a web page into the local knowledge base.
- `ingest_document`: Index a local document from an allowed directory.
- `search_index` (name suggests: reads): Search the local index.
- `list_index` (name suggests: reads): List indexed items.
- `find_related` (name suggests: reads): Find related documents and co-occurring entities.
- `remember`: Save a note to memory.
- `recall`: Recall saved notes.
- `forget`: Remove a saved note.
- `research`: Search the index and web, read top pages and answer with citations.
- `server_status` (name suggests: reads): Server status and recent searches.

## FAQ

### Does Search Memory need API keys?

No. Search works without keys; Brave, Tavily and Exa keys are optional.

### Where is my data stored?

In a local SQLite database on your machine, set with CACHE_DB_PATH.

### What does Search Memory require?

Node.js 20.9 to 25, or Docker; Playwright Chromium of about 180 MB is downloaded for pages that need a browser.

### Can Search Memory read local files?

Only from directories listed in INGEST_ALLOWED_DIRS; it is off when unset.

### Is Search Memory free?

Yes. Search Memory is open source, so you can use and self-host it for free.

### How do I add Search Memory to Claude Code?

Run this command in your terminal: claude mcp add search-memory-mcp --env BRAVE_SEARCH_API_KEY='<BRAVE_SEARCH_API_KEY>' --env TAVILY_API_KEY='<TAVILY_API_KEY>' --env EXA_API_KEY='<EXA_API_KEY>' -- npx -y search-memory-mcp

### What are the best alternatives to Search Memory?

The closest alternatives to Search Memory are Scrapling MCP Server, Codebase Memory, XERJ, Firecrawl MCP Server and Claude Code Ultimate Guide.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Scrapling MCP Server](https://ai-powered.com/mcp/scrapling-mcp-server): Scrapling MCP Server is an open-source MCP server for web search and scraping.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Firecrawl MCP Server](https://ai-powered.com/mcp/firecrawl-mcp-server): Firecrawl MCP Server is a freemium MCP server for web search and scraping.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Douyin_TikTok_Download_API](https://ai-powered.com/mcp/douyin-tiktok-download-api): Douyin_TikTok_Download_API is an open-source MCP server for web search and scraping.
- [SearXNG Search](https://ai-powered.com/mcp/searxng-search): SearXNG Search is an open-source MCP server for web search and scraping.
- [Nautilus Compass Memory](https://ai-powered.com/mcp/nautilus-compass-memory): Nautilus Compass Memory is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/search-memory
