# `mcp`

Use the `mcp` option to configure the Model Context Protocol (MCP) server of your project.
The MCP server gives AI clients such as Claude, ChatGPT, Cursor, and VS Code access to your documentation and API descriptions.
The MCP server is on by default on plans that include it.
To turn off the MCP server, set `hide` to `true`.

The `name`, `ignore`, and `publicEndpoint` options need `@redocly/framework` 0.140 or later.
On an earlier version, set them in the [`docs` object](#docs-object).

## Options

| Option | Type | Description |
| --- | --- | --- |
| hide | boolean | Turn off the MCP server. Default: `false`. |
| name | string | Set the name that the server shows to AI clients when they connect. When you do not set `name`, Redocly uses a default name. |
| ignore | [string] | List of glob patterns, matched against file paths, for content to exclude from the MCP server. Default: `[]`. |
| publicEndpoint | boolean | Serve public content to anonymous users at `/mcp-public` when `/mcp` requires authentication. For the conditions and the warning, see [Serve public content without a sign-in](/docs/platform/customization/mcp-server/access#serve-public-content-without-a-sign-in). Default: `false`. |
| docs | [Docs object](#docs-object) | Deprecated. See [`docs` object](#docs-object). |

### Docs object

**Deprecated configuration**

The `docs` object is deprecated.
Move its options to `mcp`: `mcp.docs.hide` becomes `mcp.hide`, and the same for `name`, `ignore`, and `publicEndpoint`.
The `docs` object continues to work with a deprecation warning.
When both are set, the `mcp` options win, and the server is off when either `hide` is `true`.
For an example, see [Migrate from the `docs` object](#migrate-from-the-docs-object).

| Option | Type | Description |
| --- | --- | --- |
| hide | boolean | Use `mcp.hide` instead. |
| name | string | Use `mcp.name` instead. |
| ignore | [string] | Use `mcp.ignore` instead. |
| publicEndpoint | boolean | Use `mcp.publicEndpoint` instead. |

## Examples

### Rename the server

The following example sets the name that AI clients show for the server:

```yaml
mcp:
  name: Redocly Cafe
```

### Ignore specific patterns

The following example removes the files in the `openapi-files` folder and the test endpoint files from the MCP server:

```yaml
mcp:
  ignore:
    - openapi-files/**
    - '**/test-endpoints*'
```

### Default values

The following example shows the default value of each option:

```yaml
mcp:
  hide: false
  publicEndpoint: false
  ignore: []
```

## Migrate from the `docs` object

If you use the `mcp.docs` object, move its options one level up to `mcp`:

**Old format (deprecated):**

```yaml
mcp:
  docs:
    name: Redocly Cafe
    ignore:
      - openapi-files/**
    publicEndpoint: true
```

**New format (recommended):**

```yaml
mcp:
  name: Redocly Cafe
  ignore:
    - openapi-files/**
  publicEndpoint: true
```

## Resources

- **[MCP server](/docs/platform/customization/mcp-server)** - Learn what the MCP server of your project serves to AI clients
- **[Control access to the MCP server](/docs/platform/customization/mcp-server/access)** - Restrict the server to teams and serve public content without a sign-in
- **[Custom tools](/docs/platform/customization/mcp-server/custom-tools)** - Add your own functions to the server with code that you write
- **[Connect MCP tag](/docs/platform/content/markdoc-tags/connect-mcp)** - Add a button that connects an AI client to the server from any page
