# Miru

> Miru is an open-source MCP server for developer tools. Hybrid semantic and keyword code search that gives coding agents file paths and snippets. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://takara.ai
- **Repository:** https://github.com/takara-ai/miru-code
- **MCP Registry name:** ai.takara/miru
- **Categories:** developer tools
- **Listing updated:** 2026-11-16

## About

Miru answers questions like where authentication is configured by returning ranked file paths, line numbers and source excerpts instead of making the agent read whole files. The pitch from its maker, Takara, is fewer tokens spent on search.

Under the hood it combines embeddings, BM25 and code-aware ranking, chunking source with Tree-sitter for 26 languages and falling back to structural or line-based chunks for others. It builds its index on first use and watches local files for changes. The README credits MinishLab's semble and potion-code work as foundations.

By default it sends file chunks and queries over HTTPS to Takara for embeddings, which can incur costs under a Takara plan, and an API key is optional because an auth tool can sign in with a device code. For embeddings on your own infrastructure it can use an AWS SageMaker endpoint, and an environment variable restricts which repository paths the server may reach. It needs Bun 1.1 or later.

## Features

- **Meaning-based search:** Find code by what it does, not only by exact words.
- **Exact lookup:** Locate strings, regex matches or filenames.
- **Context expansion:** Read neighbouring chunks around a hit.
- **Related code:** Find similar code in other files.
- **Language-aware chunking:** Tree-sitter chunking for 26 languages.
- **Self-hosted embeddings:** Use an AWS SageMaker endpoint instead of Takara's API.

## Good for

- Find where a feature is implemented in an unfamiliar repo
- Track down where an environment variable is read
- Cut the tokens an agent spends exploring code
- Find duplicate or similar logic across files

## Install

### Claude Code (Terminal)

```sh
claude mcp add miru --env TAKARA_API_KEY='<TAKARA_API_KEY>' -- npx -y @takara-ai/miru-code
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "miru": {
      "command": "npx",
      "args": [
        "-y",
        "@takara-ai/miru-code"
      ],
      "env": {
        "TAKARA_API_KEY": "<TAKARA_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "miru": {
      "command": "npx",
      "args": [
        "-y",
        "@takara-ai/miru-code"
      ],
      "env": {
        "TAKARA_API_KEY": "<TAKARA_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "miru": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@takara-ai/miru-code"
      ],
      "env": {
        "TAKARA_API_KEY": "<TAKARA_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "miru": {
      "command": "npx",
      "args": [
        "-y",
        "@takara-ai/miru-code"
      ],
      "env": {
        "TAKARA_API_KEY": "<TAKARA_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "miru": {
      "command": "npx",
      "args": [
        "-y",
        "@takara-ai/miru-code"
      ],
      "env": {
        "TAKARA_API_KEY": "<TAKARA_API_KEY>"
      }
    }
  }
}
```

## Tools

- `search`: Find code by meaning
- `locate`: Find exact strings, regex matches or filenames
- `expand`: Read neighbouring chunks in the same file
- `find_related`: Find similar code in other files
- `auth`: Sign in or configure a SageMaker endpoint
- `read_benchmark`: Read token-savings totals when benchmark mode is enabled

## FAQ

### What does it send off my machine?

By default file chunks and queries go to Takara over HTTPS for embeddings.

### Can I keep embeddings private?

Yes, via a self-hosted AWS SageMaker endpoint.

### What do I need to install?

Bun 1.1 or later, then a Claude Code plugin or the CLI installer.

### What licence is it?

MIT.

### Is Miru free?

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

### How do I add Miru to Claude Code?

Run this command in your terminal: claude mcp add miru --env TAKARA_API_KEY='<TAKARA_API_KEY>' -- npx -y @takara-ai/miru-code

### What are the best alternatives to Miru?

The closest alternatives to Miru 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.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/miru
