# Claude Desktop can’t see your repo. Give it one.

Canonical source: https://maguyva.ai/for-claude-desktop

License: text under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/); code samples under [MIT-0](https://opensource.org/license/mit-0); the Maguyva name, logos, brand assets and other code are not covered. Details: [maguyva.ai/license](https://maguyva.ai/license).

Claude Desktop is where many people ask about code they are not editing right now: reviews, onboarding, incident calls. Maguyva indexes the repo and serves it over MCP, so the answers cite files and lines instead of memory.

> No checkout needed. Ask the index.

## What Claude Desktop needs to know

Four facts specific to Claude Desktop.

### claude_desktop_config.json

Settings → Developer → Edit Config opens it. On macOS it lives in `~/Library/Application Support/Claude/`; on Windows, in `%APPDATA%\Claude\`.

### The local bridge

This file starts local processes, so this guide runs `@maguyva/mcp` through `npx`. Node.js must be installed.

### An env entry

The bridge reads `MAGUYVA_API_KEY` from the server’s `env` block in the same file.

### Quit, then reopen

Claude Desktop reads the file at launch. Quit the app completely after editing it; the server starts on the next launch.

## Project instructions set the brief. Use them.

Claude Projects hold instructions and files that every chat in the project starts with. They are the right place for:

- Who the answers are for: a reviewer, a new hire, an on-call engineer.
- House style for explanations and summaries.
- A few documents you want quoted, like an architecture overview.

Uploaded files are a snapshot. The repo moved on the day after you uploaded them.

## Where pasted code runs out

Three ways a chat about code goes wrong without the code.

### // pasted snippets go stale

A file pasted into the chat last week describes last week’s code. Claude answers confidently from the version it was given.

### // the snippet isn’t the system

One file rarely answers “what happens when this fails?” The handler, the retry, and the alert usually live in three different packages.

### // no checkout, no grep

Claude Desktop has no working copy of your repo. Without a tool, every answer about structure depends on what you remembered to paste.

## Maguyva as an MCP server in Claude Desktop

One mcpServers entry gives Claude:

- **11 tools over your indexed repo**: semantic, structural (AST), graph, and text search, plus symbol lookup, dependents, and file retrieval.
- **Answers with file paths and line numbers**: across 285+ languages, so you can check every claim.
- **Branch-aware results**: so Claude answers about the branch you name, not a file someone uploaded last month.

> Project instructions tell Claude *how to answer*.
> Maguyva gives Claude *the code to answer from*.

## Two workflows

Questions you would otherwise answer by opening an IDE.

### 01. Explain a code path during a review

```text
claude> what happens after a payment webhook fails its signature check?

semantic_search("webhook signature verification failure")
  src/payments/webhooks.ts:64   verifySignature()
  src/payments/webhooks.ts:91   rejectAndAlert()

→ Claude answers with both lines cited.
[exit 0]
```

Every step of the answer points at a file and a line you can open.

### 02. Size a change before you plan it

```text
claude> how many places read the legacy plan_code field?

text_pattern_search("plan_code")
  14 matches in 9 files
dependency_search("getPlanCode", dependents)
  6 callers

→ The estimate starts from a count, not a guess.
[exit 0]
```

Useful in a planning meeting, when nobody has the repo open.

## Setup in Claude Desktop

Three steps. Free tier: 3 repos, 50K indexed lines, no card.

### 01. Index a repo at maguyva.ai

Pick one you already know, so you can grade the answers.

### 02. Add Maguyva to claude_desktop_config.json

`claude_desktop_config.json`

```json
{
  "mcpServers": {
    "maguyva": {
      "command": "npx",
      "args": [
        "-y",
        "@maguyva/mcp"
      ],
      "env": {
        "MAGUYVA_API_KEY": "mgv_xxxx"
      }
    }
  }
}
```

### 03. Replace the placeholder, restart, and ask one question

Swap `mgv_xxxx` for your API key, quit Claude Desktop completely, and reopen it. If the server does not appear, read `mcp-server-maguyva.log` in Claude’s logs folder (`~/Library/Logs/Claude` on macOS).

The [MCP guide to local servers](https://modelcontextprotocol.io/docs/develop/connect-local-servers) covers the config file and its logs in more detail.

## Index one repo you already know.

Connect Claude Desktop over MCP, then ask one question you can check.
