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

# Claude Code

> Choose local files or configure an OAuth MCP connection, then verify a source read.

**Before you start:** have Claude Code installed with working model access and a
Northern Logic account that can read a test page. For local files, use a machine
that can run `nlkb`; for MCP, your workspace needs connection allowance.

<Tip>
  Use local sync for ordinary work with Markdown on your machine. Use MCP when
  you want direct cloud access without maintaining a replica. Start with one
  route so you can tell which source the tool used.
</Tip>

## Local files

1. Follow [Pair a machine](/connections/local-sync) and paste its **Copy agent
   prompt** into Claude Code on the target machine.
2. Let setup install the replica and harness instructions. If the machine is
   already paired, use **Add this harness** instead of enrolling again.
3. Run `nlkb doctor` and `nlkb orient` on that machine. Use the reported vault
   location as the source; a downloaded ZIP is not a live replica.
4. Let Claude Code access that folder through its normal file-access controls.
   Ask it to read a known page and return its path and a supporting sentence.

## Remote MCP with browser sign-in

This command registers a user-scoped HTTP server in Claude Code. Run it once; if
that name already exists, inspect the existing entry rather than adding a
duplicate.

```sh theme={null}
claude mcp add --transport http --scope user northern-logic https://mcp.northernlogic.ai/mcp
```

Start an interactive Claude Code session and open `/mcp`. Select the Northern
Logic server and complete browser authentication with the intended Northern
Logic identity. Review the resulting workspace connection and selected vaults in
**Connections**. An OAuth-first flow can create its own connection; do not
create extra unused records to repeat sign-in.

User scope makes this server available across your Claude Code projects for your
local user. The command contains no connection key. If authentication fails,
inspect the error before changing server or credential settings.

## Check your result

Ask Claude Code to orient to Northern Logic, open a known page, and return a
short fact with the source path. Compare it with the app. For MCP, also check
the connection's last activity; for local files, check the replica. Continue
with [your first useful AI answer](/tutorials/first-ai-answer).

## If it did not work

* An unknown option suggests a client version mismatch; check `claude --version`
  and the official reference.
* A server awaiting authentication needs the interactive `/mcp` sign-in flow.
* A connected server with a missing page needs
  [scope and source checks](/help/agent-cannot-find-page).
* A local read with stale content needs [sync checks](/help/sync-not-updating).

**Verification status:** HTTP registration syntax was checked against installed
Claude Code 2.1.258 and the
[official MCP reference](https://code.claude.com/docs/en/mcp) on September
5, 2026. An authenticated end-to-end Northern Logic connection has not been
verified for this guide. See [compatibility](/connections/compatibility).
