# SlashML (/ml) Persistent Agent Memory & Code Localization

> SlashML (/ml) Persistent Agent Memory & Code Localization is a freemium MCP server for knowledge and memory. Persistent agent memory, behavior-based code search and bug localization. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** CLI, API, vscode
- **Website:** https://slashml.ai
- **Repository:** https://github.com/slashml-ai/ml-memory
- **MCP Registry name:** io.github.slashml-ai/ml-memory
- **Categories:** knowledge and memory, developer tools
- **Listing updated:** 2026-11-14

## About

Two jobs share one server. The memory half stores architectural decisions, user preferences and standing project rules across sessions through `add_memory`, `search_memories`, `get_memories` and `forget_memory`. The code half indexes a repository and then finds functions, classes and modules by what they do rather than what they are called, and ranks the files most likely behind a symptom or stack trace.

In Claude Code it also installs lifecycle hooks: new standing instructions are picked up on each prompt, and tool calls are checked against the active rules before and after they run and when the agent stops. A Python and a TypeScript SDK use the same API key (`sml_live_...`), and a user id keeps personal or team memory separate.

The vendor's site reports sub-millisecond recall and benchmark scores such as 94.5% on LoCoMo, and compares itself with Mem0, Honcho, Hindsight, Zep and Supermemory; these figures are the vendor's own. The plugin is Apache-2.0, a free tier is mentioned, and the site names Cloud and private VPC options.

## Features

- **Persistent memory:** Stores and retrieves decisions, preferences and project rules across sessions.
- **Behavioral code search:** Finds code by runtime or architectural behavior.
- **Bug localization:** Ranks files and functions likely responsible for a symptom.
- **Rule enforcement hooks:** Checks tool calls against active rules in Claude Code.
- **Namespaces:** A user or workspace id keeps memories separate.
- **SDKs included:** Python and TypeScript clients share the same API.

## Good for

- Keep project conventions across coding sessions
- Remember a team's architectural decisions
- Locate the code behind a vague behavior description
- Narrow down likely culprits from a stack trace
- Stop an agent from breaking a standing rule

## Install

### Claude Code (Terminal)

```sh
claude mcp add ml-memory --env SLASHML_API_KEY='<SLASHML_API_KEY>' -- npx -y @slashml/mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "ml-memory": {
      "command": "npx",
      "args": [
        "-y",
        "@slashml/mcp"
      ],
      "env": {
        "SLASHML_API_KEY": "<SLASHML_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "ml-memory": {
      "command": "npx",
      "args": [
        "-y",
        "@slashml/mcp"
      ],
      "env": {
        "SLASHML_API_KEY": "<SLASHML_API_KEY>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "ml-memory": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@slashml/mcp"
      ],
      "env": {
        "SLASHML_API_KEY": "<SLASHML_API_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "ml-memory": {
      "command": "npx",
      "args": [
        "-y",
        "@slashml/mcp"
      ],
      "env": {
        "SLASHML_API_KEY": "<SLASHML_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "ml-memory": {
      "command": "npx",
      "args": [
        "-y",
        "@slashml/mcp"
      ],
      "env": {
        "SLASHML_API_KEY": "<SLASHML_API_KEY>"
      }
    }
  }
}
```

## Tools

- `search_memories`: Searches stored memories.
- `add_memory`: Stores a new memory.
- `get_memories`: Retrieves stored memories.
- `forget_memory`: Removes a stored memory.
- `search_code_by_behavior`: Locates code by runtime or architectural behavior.
- `index_repository`: Indexes a repository for search.
- `find_bug_candidates`: Ranks functions and files likely behind a symptom or stack trace.

## FAQ

### Do I need an API key?

Yes, a SlashML key starting `sml_live_`, created at app.slashml.ai.

### Which tools does it expose?

Memory tools, repository indexing and behavioral search, and bug candidate ranking.

### What licence is the plugin?

Apache-2.0.

### Are the benchmark numbers independent?

They are published by the vendor on its own site.

### Is SlashML (/ml) Persistent Agent Memory & Code Localization free?

SlashML (/ml) Persistent Agent Memory & Code Localization has a free plan, with paid plans for more usage or features.

### How do I add SlashML (/ml) Persistent Agent Memory & Code Localization to Claude Code?

Run this command in your terminal: claude mcp add ml-memory --env SLASHML_API_KEY='<SLASHML_API_KEY>' -- npx -y @slashml/mcp

### What are the best alternatives to SlashML (/ml) Persistent Agent Memory & Code Localization?

The closest alternatives to SlashML (/ml) Persistent Agent Memory & Code Localization are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [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.
- [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/slashml-ml-persistent-agent-memory-and-code-localization-2
