> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qontext.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP

> Interact with Qontext via MCP

## Overview

MCP (Model Context Protocol) allows AI tools to connect directly to your context repository.

Once connected, AI agents can retrieve, search, and update context while respecting the permissions and access controls configured in Qontext.

Examples include:

* [ChatGPT](/clients/chatgpt)
* [Claude](/clients/claude)
* [Codex](/clients/codex)
* [Langdock](/clients/langdock)

***

## Connecting via MCP

Qontext exposes a hosted MCP server:

```text theme={null}
https://api.qontext.ai/mcp
```

Configure this URL in your MCP client and complete the authentication flow.

Please refer to the [Clients](/clients/index) section for client-specific setup instructions.

***

## Available operations

The MCP server exposes the context repository through a POSIX-like set of operations.

### Read

Browse the file system and read content.

| Operation      | Description                                                                                                                         |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `qontext_ls`   | List the direct children of a path (files and folders).                                                                             |
| `qontext_find` | Recursively list all descendants under a path. Filterable by kind (file / folder) or the date of the last update to the descendant. |
| `qontext_cat`  | Read the full content of one or more files. If any item in the batch cannot be read, the whole call fails.                          |

References between files are returned inline as file IDs, so a client can traverse the interconnected file system by passing a returned ID straight into `qontext_cat`.

### Search

Locate context by content or by meaning.

| Operation       | Description                                                                                                           |
| --------------- | --------------------------------------------------------------------------------------------------------------------- |
| `qontext_grep`  | Exact content search across the repository. Allows searching literally or using regex.                                |
| `hybrid_search` | Hybrid search over the repository. Takes a qualitative, natural-language query and returns the most relevant context. |

### Write

Create and maintain context.

| Operation       | Description                                        |
| --------------- | -------------------------------------------------- |
| `qontext_write` | Create or update a file in an existing folder.     |
| `qontext_mkdir` | Create a folder.                                   |
| `qontext_mv`    | Rename or move a file.                             |
| `qontext_rm`    | Delete a file or folder. Deletion is irreversible. |

Writes flow through Qontext's versioning: every edit is captured in the [version history](/features/version-history) and reconciled into the repository, so concurrent edits are tracked rather than silently overwritten.
