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

# Connect to the n8n docs MCP server

The n8n documentation publishes a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server. Connect an AI tool to this server to let it search the docs, retrieve specific pages, and answer questions using the documentation content directly.

## MCP server URL

Use this endpoint:

```
https://docs.n8n.io/~gitbook/mcp
```

The server exposes published documentation only. It uses HTTP transport, so your AI tool needs to support remote MCP servers over HTTP. It doesn't support stdio or SSE.

## Connect your AI tool

The steps differ by tool, but each one needs the server URL above. The following examples cover some common tools.

{% tabs %}
{% tab title="Claude Code" %}
Run this command in your terminal:

```bash
claude mcp add --transport http n8n-docs https://docs.n8n.io/~gitbook/mcp
```

{% endtab %}

{% tab title="Cursor" %}
Add the server to your `mcp.json` file:

```json
{
	"mcpServers": {
		"n8n-docs": {
			"url": "https://docs.n8n.io/~gitbook/mcp"
		}
	}
}
```

{% endtab %}

{% tab title="VS Code" %}
Add the server to your `mcp.json` file:

```json
{
	"servers": {
		"n8n-docs": {
			"type": "http",
			"url": "https://docs.n8n.io/~gitbook/mcp"
		}
	}
}
```

{% endtab %}

{% tab title="Other tools" %}
For any other MCP client, add a new remote (HTTP) server in its MCP settings and enter the server URL:

```
https://docs.n8n.io/~gitbook/mcp
```

{% endtab %}
{% endtabs %}

After you connect, your tool can search and read the n8n docs as you work.

{% hint style="info" %}
The exact configuration steps and file locations vary between tools and versions. Check your tool's documentation for how it adds a remote MCP server.
{% endhint %}


---

# 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.n8n.io/connect/connect-to-n8n-docs-mcp-server.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.
