> For the complete documentation index, see [llms.txt](https://notara.gitbook.io/notara-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notara.gitbook.io/notara-docs/mcp/claude-code.md).

# Claude Code

Claude Code supports MCP servers natively via its `settings.json` configuration. Once connected, your Notara workspace's tools and context are available to Claude Code in any project.

## Prerequisites

* Claude Code installed (`npm install -g @anthropic-ai/claude-code` or via the desktop app)
* A Notara workspace with at least one connected tool connector
* An MCP endpoint and token generated from the Notara dashboard

## Step 1: Generate an MCP Token

1. In the Notara dashboard, go to **Connect → MCP Endpoints**.
2. Click **New Endpoint** and select the group you want to connect to (e.g., `engineering`).
3. Click **Generate Token**.
4. Copy the token. **It's only shown once** — store it somewhere safe (e.g., your password manager or `~/.zshrc` as an env var).

Your endpoint URL will look like:

```
https://app.notara.ai/mcp/g/your-workspace/engineering
```

## Step 2: Add to Claude Code Settings

Open or create `~/.claude/settings.json` and add the `mcpServers` block:

```json
{
  "mcpServers": {
    "notara": {
      "type": "sse",
      "url": "https://app.notara.ai/mcp/g/your-workspace/engineering",
      "headers": {
        "Authorization": "Bearer ntr_your_token_here"
      }
    }
  }
}
```

Replace:

* `your-workspace` with your workspace slug (visible in the endpoint URL in the dashboard)
* `engineering` with your group slug
* `ntr_your_token_here` with the token you generated

**Tip:** If you prefer not to hardcode the token, use an environment variable:

```json
{
  "mcpServers": {
    "notara": {
      "type": "sse",
      "url": "https://app.notara.ai/mcp/g/your-workspace/engineering",
      "headers": {
        "Authorization": "Bearer ${NOTARA_MCP_TOKEN}"
      }
    }
  }
}
```

Then add `NOTARA_MCP_TOKEN=ntr_your_token_here` to your shell environment.

## Step 3: Restart Claude Code

After saving `settings.json`, restart Claude Code. The MCP server connects on startup.

To verify the connection, open Claude Code and ask: `What Notara tools are available?`

Claude Code should list the tools from your connected Notara group, for example:

```
Available Notara tools:
- linear_search_issues
- linear_create_issue
- github_list_repos
- github_create_issue
- read_context_document
- search_context
...
```

## What's Available

Once connected, Claude Code can:

| Capability                  | Example                                                           |
| --------------------------- | ----------------------------------------------------------------- |
| Search your context library | "What's our API rate limit policy?" (from your docs)              |
| Create a Linear issue       | "Create a P2 bug for the login timeout"                           |
| Read GitHub repo info       | "What's in the main branch of acme-api?"                          |
| Invoke a skill              | "Use the eng-error-digest skill to summarize last night's errors" |
| Search memories             | "What did we decide about the database migration?"                |

## Tool Permissions

Tool permissions still apply. If a tool requires admin approval (`write` capability with `requires_approval`), Claude Code will receive a message saying the action has been queued for approval — exactly like a Slack request. The approving admin will receive a notification via their Notara-connected Slack DM.

Destructive tools (`destructive` capability) trigger a confirmation prompt. In MCP contexts, these are handled synchronously: Claude Code will see a message asking it to confirm before proceeding.

## Troubleshooting

**"Unauthorized" error:** your token is invalid or has been revoked. Generate a new token from the dashboard.

**"Connection refused" or timeout:** check that your internet connection can reach `app.notara.ai`. If you're behind a corporate proxy, configure Claude Code to use it.

**Tools not appearing:** make sure the group you connected to has at least one active connector. If a connector is missing its credentials, its tools are not exposed.

**Context not loading:** if `read_context_document` works but results are empty, check that your group has at least one context collection assigned, with documents that have a `spine` or `on_demand` load policy.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://notara.gitbook.io/notara-docs/mcp/claude-code.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
