> ## Documentation Index
> Fetch the complete documentation index at: https://docs.elanotes.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP local

> Stdio MCP over a local markdown vault and SQLite FTS5.

`@elanotes/mcp-local` is a **stdio MCP server**. It indexes a markdown
vault into a disposable SQLite FTS5 cache on the device. It indexes
`private/` notes. Without `ELANOTES_API_URL` it is offline — no Postgres,
no OpenAI, no network.

The tool registry is shared with cloud MCP and the HTTP API:
`search_notes`, `grep_notes`, `read_note`, `list_notes`, `list_tags`,
`query_notes`, `get_attachment`, plus vault/index tools.
`search_notes` / `grep_notes` / `list_notes` / `list_tags` accept the
same AIP-160 `filter` string as `GET /v1/notes`.

## Run

```bash theme={null}
pnpm --filter @elanotes/mcp-local build
elanotes-mcp-local --vault /path/to/vault
```

## Cursor / Claude Code

```json theme={null}
{
  "mcpServers": {
    "elanotes": {
      "command": "node",
      "args": [
        "/ABS/PATH/TO/elanotes/packages/mcp-local/dist/cli.js",
        "--vault",
        "/ABS/PATH/TO/your/vault"
      ]
    }
  }
}
```

Prefer an absolute path to `dist/cli.js` so the client does not need
your pnpm PATH.

## Optional replica hydrate

Set `ELANOTES_API_URL` (API origin; `/v1` is on each path) and
`ELANOTES_API_TOKEN` to hydrate from `/v1/sync`. Sync mutations need
`notes.write`. `ELANOTES_E2EE_PASSPHRASE` never leaves the device.

## Cloud MCP

Same tools over authenticated HTTP: [MCP cloud](/mcp-cloud).
