# Cline plans before it acts. Give the plan a map.

Canonical source: https://maguyva.ai/for-cline

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).

Cline reads files, runs commands, and asks before it changes anything. Maguyva indexes the whole repo and serves it back over MCP, so Plan mode starts from real call sites instead of a directory listing.

> Use .clinerules for how to work. Use Maguyva for what the code says now.

## What Cline needs to know

Four facts specific to Cline.

### cline_mcp_settings.json

Open it from the MCP Servers icon in the Cline panel: Configure tab, then Configure MCP Servers. Servers go under `mcpServers`.

### Remote, by URL

Cline connects to Maguyva’s endpoint over Streamable HTTP. No local process, no Node.js.

### A literal header

The key goes straight into the `Authorization` header, as in Cline’s own examples. The settings file lives in your editor’s user storage, not in your repo.

### streamableHttp, not SSE

Keep `"type": "streamableHttp"` in the entry: without a type, Cline assumes legacy SSE. List the tools you trust in `autoApprove` to skip their approval prompt.

## Cline rules are a working agreement. Use them.

```text
# .clinerules/testing.md
- Run the test suite before you mark a task complete.
- Ask before adding a dependency.
```

Workspace rules are Markdown files in `.clinerules/` or `.cline/rules/`; Cline also picks up `AGENTS.md`, `.cursorrules`, and `.windsurfrules`. Rules are the right place for:

- Commands Cline should run.
- Guardrails scoped to a path with a frontmatter glob.
- Team conventions you are tired of repeating.

Rules tell Cline how to behave. They do not tell it which services read the table it is about to migrate.

## Where rules and file reads run out

Three gaps Cline fills by reading more files, one request at a time.

### // a plan built from a listing

Plan mode reasons from what Cline has read so far. On a large repo that is a directory tree and a handful of files, and the plan inherits the gaps.

### // every read is a round trip

Each file Cline opens to orient itself costs tokens and a model request. Orienting in an unfamiliar package can use much of the context window before the first edit.

### // text search finds strings, not callers

“Who else calls this?” is a graph question. A text search finds the string; it does not separate the real callers from a comment, a mock, and a method with the same name.

## Maguyva as an MCP server in Cline

One mcpServers entry gives Cline:

- **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 a plan cites real files.
- **Tools that only read**: Maguyva’s tools query the index. None of them edit your files.

> Cline rules tell Cline *how to work*.
> Maguyva gives Cline *a map to plan from*.

## Two workflows

Plan against the map, then act.

### 01. Plan a change from real call sites

```text
cline plan> move session refresh into the auth package

dependency_search("refreshSession", dependents)
  src/api/middleware.ts:58
  src/jobs/renew.ts:12
  src/web/hooks/useSession.ts:30

→ The plan lists three call sites before Act mode starts.
[exit 0]
```

The plan names every file it will touch, so you approve a list, not a hunch.

### 02. Find the real implementation, not the test fixture

```text
cline> how do we calculate proration?

semantic_search("proration calculation")
  src/billing/proration.ts:22   prorate()   ← implementation
  test/billing/proration.spec.ts:7   ← fixture

→ Cline reads one file instead of six.
[exit 0]
```

Ranked results put the implementation above the fixture that shares its name.

## Setup in Cline

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 Cline’s MCP settings

`cline_mcp_settings.json`

```json
{
  "mcpServers": {
    "maguyva": {
      "type": "streamableHttp",
      "url": "https://maguyva.tools/mcp",
      "headers": {
        "Authorization": "Bearer mgv_xxxx"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}
```

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

Swap `mgv_xxxx` for your API key and save the file. Ask one question whose answer you already know, then open the cited file.

Cline’s [MCP docs](https://docs.cline.bot/mcp/mcp-overview) cover remote servers, timeouts, and auto-approval.

## Index one repo you already know.

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