# miru [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/takara-ai/miru-code  
**GitHub Stars:** 11  
**npm Downloads (last month):** 531  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/miru

## Description
Hybrid semantic and keyword code search for coding agents.

## Tools
Capabilities this server exposes over MCP:

- **search** — Default for code exploration — hybrid semantic + keyword search. One call per question.
- **locate** — Exact substrings (env vars, symbols, error codes) — prefer over Grep.
- **expand** — More context in the **same file** when a hit has `truncated: true`.
- **find_related** — Similar code in **other files** from a `file_path` + `anchor_line`.
- **read_benchmark** — Cumulative token-savings rollup *(benchmark mode only)*.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `bunx` (confidence: high):

```json
"mcpServers": {
  "miru": {
    "command": "bunx",
    "args": ["@takara-ai/miru-code@latest"],
    "env": {
      "TAKARA_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `TAKARA_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What miru MCP server does

The miru MCP server helps coding agents find relevant code by combining semantic and keyword search. Results are returned as chunks that identify the file path, line range, and matching snippet. This makes it suitable for questions such as locating authentication middleware, configuration, or an implementation whose exact name is unknown.

The server is designed to reduce the amount of repository text an agent must inspect. It can replace broad grep or glob searches for code exploration, while still providing exact-match and context tools for follow-up work.

## How it works

Agents normally start with `search`, which is the default tool for code exploration and accepts a question in natural language. Use one search call per question. When the required text is known exactly, `locate` searches for substrings such as environment variable names, symbols, or error codes.

A search result can indicate that its snippet is truncated. In that case, `expand` retrieves more context from the same file. `find_related` takes a file path and anchor line, then looks for similar code in other files. The separate `read_benchmark` tool reports cumulative token-savings data when benchmark mode is enabled; it is not part of the normal search workflow.

## Setup and configuration

The miru MCP server can be installed globally with Bun using `bun add -g @takara-ai/miru-code`. Run `miru setup` to authenticate interactively, or select device-code login explicitly with `miru setup --device`. A bearer token can be stored with `miru setup --key YOUR_TOKEN`, and saved credentials can be removed with `miru setup --clear`.

Credentials are stored locally in a versioned `credentials.json` file and can be refreshed automatically. Setting `TAKARA_API_KEY` overrides stored credentials. The interactive MCP or plugin path can also initiate device-code authentication when credentials are missing.

Run `miru install` to select supported agent integrations from an interactive terminal interface. Depending on the selected client, installation can add the MCP configuration, instructions, rules, or optional skills. Restart the IDE after installation. Plugin credentials are separate from CLI credentials, so using both installation methods requires authentication in each scope.

## Tools and capabilities

The miru MCP server exposes these core tools:

- `search`: Hybrid semantic and keyword search for general code exploration.
- `locate`: Exact substring lookup for known text, symbols, variables, and error codes.
- `expand`: Additional context from the same file when a result is truncated.
- `find_related`: Similar code in other files, starting from a file path and anchor line.
- `read_benchmark`: Cumulative token-savings reporting in benchmark mode.

The repository documents integrations for Claude Code, Cursor, Gemini CLI, Kiro, OpenCode, GitHub Copilot, Codex, VS Code, Visual Studio on Windows, and Windsurf or Devin Desktop. Plugin packages are documented for Claude Code, Codex, and Cursor, but their capabilities differ: the Cursor plugin currently provides skills and rules rather than an MCP entry, while Claude Code and Codex expose the listed MCP tools.

## Limitations and notes

Plugin manifests launch the published runtime through `bunx @takara-ai/miru-code@latest mcp`. Local source changes therefore do not affect plugin behavior until a package version is published. A self-contained plugin installation that does not require Bun is not yet available.

Plugin installs do not provide identical features across IDEs. Dedicated sub-agent and benchmark configuration support are limited by the client plugin schemas, and benchmark mode is documented for the Claude Code plugin. Windsurf hooks are experimental and do not provide an MCP entry. Optional Caveman and STE features are skills rather than MCP search tools.

_Full upstream README: https://allmcps.com/mcp/miru/readme_

