> 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). Agents can also search and read this documentation through its [MCP server](https://docs.humanity.org/~gitbook/mcp).

# Claude Code Integration Guide

Use custom MCP server to give Claude Code (CLI and VS Code extension) real-time access to Humanity documentation and examples.

{% 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.humanity.org/working-with-llms/claude-code-integration-guide.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
