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

# Connect your agent

Select your agent and connect it to a Hive. Every agent uses the same MCP endpoint from the dashboard.

Every agent connects to a [Hive](/reference/glossary.md#hive) through the Hive's [MCP](/reference/glossary.md#mcp) endpoint, and every agent uses the same one. Claude Code, Cursor, and Codex also get a NeoHive plugin, which tells each agent when to use NeoHive. The following diagram shows how the endpoint and the plugin fit together:

<figure><img src="https://3192197639-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4OPHduIiSuhnAhSI2yPb%2Fuploads%2Fgit-blob-4339a5f74519f5619f3917369a418293aec8b38c%2Fget-started-connect.svg?alt=media" alt="Your agent reaches the Indexes in one Hive through the Hive&#x27;s MCP endpoint. A plugin inside the agent adds instructions for when to use the memory tools."><figcaption></figcaption></figure>

The following table lists the page for each agent and what you set up on it:

| Agent                                   | Page                                                                      | What you set up                                                     |
| --------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| **Claude Code**                         | [Claude Code](/get-started/connect/claude-code.md)                        | `claude mcp add`, then the NeoHive plugin                           |
| **Cursor**                              | [Cursor](/get-started/connect/cursor.md)                                  | `.cursor/mcp.json`, then the NeoHive plugin                         |
| **Codex**                               | [Codex](/get-started/connect/codex.md)                                    | `~/.codex/config.toml`, then the NeoHive plugin                     |
| **ChatGPT**                             | [ChatGPT](/get-started/connect/chatgpt.md)                                | A custom MCP server in the ChatGPT desktop app                      |
| **Claude Desktop** or any other MCP app | [Claude Desktop and other MCP apps](/get-started/connect/desktop-apps.md) | The endpoint, or `mcp-remote` for apps that only run local commands |

## Tell your agent to use NeoHive

A NeoHive plugin sets up the following instructions for you, either from its own rules file or through its `getting-started` skill. Your agent's page says which. If your agent has no plugin, paste the instructions into your agent's rules file, such as `CLAUDE.md` or `AGENTS.md`, or into its system prompt. Then adjust the instructions to match what your team wants to keep:

```
## NeoHive

- At the start of every session, call `memory_context` with a short description of the task, for example "adding rate limits to the Express gateway". It loads the conventions and decisions that apply.
- Before reading many files to learn how something works, call `memory_recall` with specific terms, for example "payment retry handler". The indexed code often answers it directly. If it does not, read the files that `memory_recall` returns.
- When I correct you, set a convention, or point out a gotcha, call `memory_store`. Write one self-contained statement with the terms a later search would use and the reason behind it.
- If more than one Hive is connected and you are unsure which one a Memory belongs in, ask before storing.
```


---

# 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.neohive.ai/get-started/connect.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.
