---
title: "Connect an AI app over MCP"
description: "Turn on MazeGraph's MCP server, create a connection password, and add your site to Claude Code, Cursor, VS Code, Claude Desktop, Codex, Gemini CLI, Windsurf or OpenCode."
image: "https://mazegraph.com/docs/og.png"
---

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

# Connect an AI app over MCP

Setting up a connection takes a few minutes and needs a WordPress administrator account. You make one connection per app, so each can be revoked on its own.

## Before you start

- You are signed in as an administrator.
- The site uses HTTPS, or it is a local development site. WordPress offers Application Passwords, which MCP connections use, only in those cases.
- On a multisite network, MazeGraph is network-activated.

## Turn on the server

1. Open **MazeGraph → Settings → MCP**.
2. Under **MazeGraph MCP server**, turn on **Turn on the MCP server**.
3. Leave **Server** on **Automatic: the MCP Adapter if it is installed, else MazeGraph's own** unless you have a reason to choose one. The note below it says which server is answering.
4. Copy the **Address to give your app** if you want it for later. The setup text in the next steps already includes it.

If the screen says **The MCP module is switched off**, turn the module on in **MazeGraph → Tools → Extensions** first.

## Create a connection

1. Under **Connections**, select **New connection**.
2. **Name:** enter a name you will recognise later, for example "Claude Code on my laptop", and select **Next**.
3. **App:** choose the app you are connecting and select **Create connection**. The same address and key work in every app; the choice only changes the setup text.
4. **Copy setup:** copy the text shown under **Setup for**. The key is shown once. If you close the dialog without copying it, regenerate the key from the connections list.

The setup text carries the full `Authorization` header, built from your username and the new password. Treat it like a password: keep it out of shared repositories, screenshots and chat.

## Add it to your app

Use the text MazeGraph gives you; the examples below show its shape, with `https://example.com/wp-json/maze-graph/v1/mcp` for the address and `Basic …` for the header.

### Claude Code

Run the command in your terminal:

```bash
claude mcp add --transport http maze-graph https://example.com/wp-json/maze-graph/v1/mcp --header "Authorization: Basic …"
```

### Cursor

Add this to `~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project), then restart Cursor:

```json
{
  "mcpServers": {
"maze-graph": {
  "url": "https://example.com/wp-json/maze-graph/v1/mcp",
  "headers": { "Authorization": "Basic …" }
}
  }
}
```

### VS Code (Copilot)

Add this to `.vscode/mcp.json` in your workspace:

```json
{
  "servers": {
"maze-graph": {
  "type": "http",
  "url": "https://example.com/wp-json/maze-graph/v1/mcp",
  "headers": { "Authorization": "Basic …" }
}
  }
}
```

### Claude Desktop

Open **Settings → Developer → Edit Config** in Claude Desktop, add this to `claude_desktop_config.json`, then restart the app. It needs Node.js, because the `mcp-remote` helper makes the connection:

```json
{
  "mcpServers": {
"maze-graph": {
  "command": "npx",
  "args": ["-y", "mcp-remote", "https://example.com/wp-json/maze-graph/v1/mcp", "--header", "Authorization:${MAZE_GRAPH_AUTH}"],
  "env": { "MAZE_GRAPH_AUTH": "Basic …" }
}
  }
}
```

### OpenAI Codex CLI

Add this to `~/.codex/config.toml`:

```toml
[mcp_servers.maze-graph]
url = "https://example.com/wp-json/maze-graph/v1/mcp"
http_headers = { "Authorization" = "Basic …" }
```

### Gemini CLI

Add this to `~/.gemini/settings.json`:

```json
{
  "mcpServers": {
"maze-graph": {
  "httpUrl": "https://example.com/wp-json/maze-graph/v1/mcp",
  "headers": { "Authorization": "Basic …" }
}
  }
}
```

### Windsurf

Add this to `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
"maze-graph": {
  "serverUrl": "https://example.com/wp-json/maze-graph/v1/mcp",
  "headers": { "Authorization": "Basic …" }
}
  }
}
```

### OpenCode

Add this to `opencode.json`:

```json
{
  "mcp": {
"maze-graph": {
  "type": "remote",
  "url": "https://example.com/wp-json/maze-graph/v1/mcp",
  "headers": { "Authorization": "Basic …" }
}
  }
}
```

### Another app

Choose **Another app** in the dialog. Add the server in the app's MCP settings as a streamable HTTP server, with the address and the `Authorization` header MazeGraph shows.

## Check that it works

Ask the app something only your site can answer, such as "Use maze-graph to list my active plugins." The app should call a tool named like `maze-graph_list-plugins`. In MazeGraph, the connection's **Last used** date updates, and the call appears in **MazeGraph → Activity** under **Plugin logs** with the **From MCP** filter.

If the app reports an error, see [An MCP app cannot connect](/docs/troubleshooting/an-mcp-app-cannot-connect/).

## Regenerate or revoke a connection

Each row in **Connections** has two actions:

- **Regenerate key** creates a new key for the same connection and revokes the old one. Update the app with the new setup text.
- **Revoke connection** stops the app straight away. Create a new connection if you want it back.

Select several rows to regenerate or revoke them together. Revoke a connection whenever a laptop is lost, a project ends or a key may have been seen by someone else.

Source: https://mazegraph.com/docs/mcp/connect-an-ai-app/index.mdx
