> For the complete documentation index, see [llms.txt](https://docs.humanity.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.humanity.org/working-with-llms/claude-code-integration-guide.md).

# Claude Code Integration Guide

{% embed url="<https://claude.com/product/claude-code>" %}

The easiest way to work with Claude Code is using our MCP server

{% embed url="<https://github.com/humanity-developers/humanity-docs-claude-mcp>" %}

## 1. Clone the repository and run `install.sh` script

```bash
cd humanity-docs-mcp
./setup.sh
```

At the end of the installation the script will print out the command you need to run afterwards.&#x20;

```bash
claude mcp add humanity-docs --scope user node /your/path/to/humanity-docs-mcp/dist/index.js
```

Being `/your/path/to/humanity-docs-mcp/` the location of the folder in your system

## 2. Verify the connection

Open Claude Code and run

```bash
/mcp
```

If you are using the VSCode extension click on `/` and select ***Manage MCP Servers***

You should see the following&#x20;

```bash
humanity-docs · ✓ connected
```

## 3. Try it out

```
How PCKE authentication flow works with the SDK?
```

## 4. Uninstalling

```bash
claude mcp remove humanity-docs
```

<br>


---

# 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://docs.humanity.org/working-with-llms/claude-code-integration-guide.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.
