Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions ai/mintlify-mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

## About the admin MCP

The admin MCP server gives AI tools write access to your Mintlify content and settings. Use it to update content and access your dashboard. With the admin MCP, you can use your preferred AI tools to edit pages, restructure navigation, update `docs.json`, open pull requests, change settings, create workflows, and more.
The admin MCP server gives AI tools write access to your Mintlify content and settings. Use it to update content and access your dashboard. With the admin MCP, you can use your preferred AI tools to edit pages, restructure navigation, update `docs.json`, open pull requests, change settings, create automations, and more.

Connect an MCP client such as Claude, Claude Code, ChatGPT, or Cursor to the admin MCP server. Use it to collaborate on your Mintlify content and settings with the same tools you use to write code. Each content tool call names the branch it works on. Edits to your deploy branch land as unpublished changes, and edits to any other branch go through a pull request. They ship when you call `publish` or merge the pull request. [Project management](#project-management) changes, such as workflow and settings updates, apply immediately to the live project. If your organization has multiple projects, a single admin MCP connection can access and switch between all of them.
Connect an MCP client such as Claude, Claude Code, ChatGPT, or Cursor to the admin MCP server. Use it to collaborate on your Mintlify content and settings with the same tools you use to write code. Each content tool call names the branch it works on. Edits to your deploy branch land as unpublished changes, and edits to any other branch go through a pull request. They ship when you call `publish` or merge the pull request. [Project management](#project-management) changes, such as automation and settings updates, apply immediately to the live project. If your organization has multiple projects, a single admin MCP connection can access and switch between all of them.

<Note>
The admin MCP server allows AI tools to access your Mintlify dashboard. Treat it as a tool with write access. Connect it only from trusted AI tools, review every pull request before merging, and be aware that project management changes apply immediately without a pull request.
Expand All @@ -28,9 +28,9 @@
| | Admin MCP | Search MCP |
| :-- | :-- | :-- |
| **Audience** | Your team | Your end users |
| **Access** | Read, edit, restructure, publish, create workflows, manage settings | Read and search one site's published pages |
| **Access** | Read, edit, restructure, publish, create automations, manage settings | Read and search one site's published pages |
| **Endpoint** | `https://mcp.mintlify.com` | `/mcp` on your site domain |
| **Output** | Content edits, navigation changes, pull requests, workflow runs | Search results and page content from your site |
| **Output** | Content edits, navigation changes, pull requests, automation runs | Search results and page content from your site |

## Prerequisites

Expand Down Expand Up @@ -107,7 +107,7 @@

The AI tool acts as you on the deploy branch:

- **Edits are live to collaborators.** Anyone else editing the deploy branch in the dashboard sees the AI's changes as they happen.

Check warning on line 110 in ai/mintlify-mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/mintlify-mcp.mdx#L110

Did you really mean 'ato'?
- **`publish` publishes only your changes.** It commits your pending changes straight to the deploy branch, like clicking **Publish** in the editor. Other people's unpublished changes stay pending. Your own unpublished edits from the dashboard editor publish too.
- **`discard` reverts only your changes.** It returns `discardedChanges` with the number of changes it reverted. Other people's changes and the branch itself stay untouched.
- **`status` lists only your changes.**
Expand All @@ -120,10 +120,10 @@

- **Push directly to your deploy branch** is off in your [publishing settings](#publishing).
- Branch protection on your deploy branch requires pull requests, or Mintlify can't check your branch protection rules.
- Editing the deploy branch is locked in the dashboard editor.

Check warning on line 123 in ai/mintlify-mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/mintlify-mcp.mdx#L123

In general, use active voice instead of passive voice ('is locked').
- You connected with a client or machine-to-machine token instead of an OAuth login. These tokens aren't tied to a user, so they have no "own" changes.

Mintlify checks these conditions on every edit and caches your branch protection rules for up to 30 seconds. Comment tools still work on the deploy branch when edits to it are refused. If your deploy branch starts requiring a pull request after you edit it, `publish` returns `branch_protected` and your changes stay pending. Open the dashboard editor to move them to a new branch.

Check warning on line 126 in ai/mintlify-mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/mintlify-mcp.mdx#L126

In general, use active voice instead of passive voice ('are refused').

## Work on a branch

Expand All @@ -143,7 +143,7 @@

This toggle shares the same `agentReviewProcess` setting as the Slack and dashboard agent, so any change here also applies to those flows.

The toggle is disabled in three cases:

Check warning on line 146 in ai/mintlify-mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/mintlify-mcp.mdx#L146

In general, use active voice instead of passive voice ('is disabled').

- **Your deploy branch requires a pull request.** If branch protection rules or required approvals prevent direct pushes, MCP changes always go through a pull request regardless of this setting.
- **Mintlify hosts your project.** For Mintlify-hosted sites, MCP changes always push directly, unless branch protection still requires a pull request.
Expand Down Expand Up @@ -178,7 +178,7 @@

### Images

- **`upload_image`**: Start uploading a local image file to `branch`. Pass the destination `path` (for example, `images/dashboard.png`), the file's `contentType`, and its exact `size` in bytes. Returns an `uploadId`, a presigned `uploadUrl`, and the `headers` to send with the upload.

Check warning on line 181 in ai/mintlify-mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/mintlify-mcp.mdx#L181

Did you really mean 'contentType'?

Check warning on line 181 in ai/mintlify-mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/mintlify-mcp.mdx#L181

Did you really mean 'uploadId'?

Check warning on line 181 in ai/mintlify-mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/mintlify-mcp.mdx#L181

Did you really mean 'uploadUrl'?
- **`finalize_image_upload`**: Save the uploaded image to `branch`. Pass the `uploadId` and the same `path`. Returns the `src` to reference in MDX with `edit_page` or `write_page`, or in the `logo` or `favicon` fields of `docs.json` with `update_config`.

After `upload_image`, the AI tool uploads the file bytes to `uploadUrl` with a `PUT` request and the returned headers. For example:
Expand All @@ -194,7 +194,7 @@
Work with the [comments and suggestions](/editor/collaborate#comments) that your team leaves in the dashboard editor.

- **`read_comments`**: List the open comment and suggestion threads on a page, oldest first. Pass `path` in the same forms as `read`. Each thread includes a `threadId`, its `type` (`comment` or `suggestion`), the `quotedText` it's anchored to, the `suggestedText` for suggestions, and its `comments` with each `author`, `content`, and `createdAt`. If the anchored text no longer exists on the page, the thread includes `anchorRemoved: true` and `quotedText` shows the original quote. Reads threads on `branch`, or on your deploy branch when you omit it.
- **`add_comment`**: Start a new comment thread on a page without changing its content. Use it to leave feedback for your team instead of editing. Pass `path` in the same forms as `read`, the `content` of the comment, and `quotedText`: the smallest unique span of visible text to anchor to, within one paragraph or heading. Use rendered words, not Markdown or MDX syntax. For example, quote `custom domain`, not `[custom domain](/path)`. Returns the new `threadId`. If the text isn't on the page, the error is `no_match`. If it matches more than once, the error is `not_unique`, so quote a longer span.

Check warning on line 197 in ai/mintlify-mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/mintlify-mcp.mdx#L197

Did you really mean 'threadId'?

Check warning on line 197 in ai/mintlify-mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/mintlify-mcp.mdx#L197

Did you really mean 'no_match'?
- **`suggest_edit`**: Propose a tracked-changes suggestion on a page instead of editing it. The original text stays on the page with a strikethrough and the replacement appears alongside it. Nothing changes until someone accepts or rejects the suggestion in the dashboard editor. Pass `path` in the same forms as `read`, `oldString`, and `newString`. `oldString` is the smallest unique span of visible text to replace, within one paragraph or heading. Use rendered words, not Markdown or MDX syntax. Pass an empty `newString` to suggest a deletion, and an optional `note` to explain the change. Returns the new `threadId` with the `originalText` and `suggestedText`, trimmed to the span that changes. If the same suggestion is already open, the response includes `alreadyExists: true` and the existing `threadId`. The `no_match` and `not_unique` errors work as they do for `add_comment`. The error is `no_change` when both strings are the same, and `conflicting_annotation` when the text overlaps another open suggestion.
- **`reply_to_comment`**: Reply to a thread by `threadId` with `content`. Pass `resolve: true` to also resolve the thread. Mintlify posts the reply as the agent on behalf of the authorizing user, and it appears live in the dashboard editor.
- **`resolve_comment`**: Resolve a thread without replying.
Expand All @@ -217,7 +217,7 @@

### Project management

Project management tools handle project-level operations, such as managing workflows, project settings, custom domains, Git sources, authentication, members, analytics, and [private page](/editor/pages#private-pages) sharing. They act on the live project, not on a branch.
Project management tools handle project-level operations, such as managing [automations](/automations), project settings, custom domains, Git sources, authentication, members, analytics, and [private page](/editor/pages#private-pages) sharing. They act on the live project, not on a branch.

Each tool takes a `subdomain` for the project to act on. Organization-wide connections must pass `subdomain`. Call `list_deployments` to find it. Read tools also accept `subdomains`, a list of up to 25 projects, and return a result or error for each one. Most tools take a `request` object whose `action` field selects the operation. For example:

Expand All @@ -234,23 +234,23 @@
- **`get_analytics_report`**: Read a prebuilt analytics report, such as page views, popular pages, referrals, feedback, assistant chats, or search quality. Select the report with `request.report`. Large results paginate with `maxRows` and `rowOffset`. For custom queries, use `query_analytics`.
- **`get_analytics_schema`**: Read the tables, events, and SQL rules that `query_analytics` accepts. The AI tool calls it once before writing a query.
- **`query_analytics`**: Run one read-only `SELECT` query on your site's analytics, such as page views, search, assistant, feedback, and agent and human traffic. Results are already scoped to the project. If analytics queries aren't enabled for the project, both analytics query tools return a `not_enabled` error.
- **`get_workflows`**: List workflows, get one workflow, or page through its runs.
- **`list_repos_and_prs`**: List connected repositories, a repository's pull requests, or available integrations to use in a workflow.
- **`get_workflows`**: List automations, get one automation, or page through its runs.
- **`list_repos_and_prs`**: List connected repositories, a repository's pull requests, or available integrations to use in an automation.

Write tools:

- **`update_deployment_settings`**: Change one dashboard setting, such as `noindex`, `base_path`, `name`, `disable_ai_chat`, `search_settings`, `privacy`, `custom_scripts`, or an add-on. Use `update_config` for `docs.json` settings.
- **`manage_custom_domain`**: Add or remove a custom domain, provision its hostname, or retrigger hostname validation.

Check warning on line 243 in ai/mintlify-mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/mintlify-mcp.mdx#L243

Did you really mean 'retrigger'?
- **`manage_git_source`**: Add, update, remove, or reorder the Git repositories a project builds from, or set the base source.
- **`manage_access_auth`**: Configure or remove site [authentication](/deploy/authentication-setup), add or delete passwords, configure end-user authentication, or switch which one is active.
- **`manage_workflow`**: Create, update, enable or disable, delete, or trigger a workflow.
- **`manage_workflow`**: Create, update, enable or disable, delete, or trigger an automation.
- **`manage_workflow_prs`**: Merge or close a pull request that an [automation](/automations) run opened. To merge a pull request for a branch the AI tool edited, use `publish` with `merge: true` instead.
- **`manage_members_sharing`**: List or remove organization members, update their roles, or manage private page grants and moves in internal projects.

Write tools return the project's updated state under `state`, so the AI tool can confirm the change without a second call. Each action checks the connection's granted scopes and your dashboard role. An action you aren't authorized for returns an error such as `insufficient_scope`.

<Warning>
Project management writes apply immediately to the live project. They don't create a branch or open a pull request. Confirm the intended change before prompting an AI tool to update workflows, settings, domains, authentication, or members.
Project management writes apply immediately to the live project. They don't create a branch or open a pull request. Confirm the intended change before prompting an AI tool to update automations, settings, domains, authentication, or members.
</Warning>

### Branches and publishing
Expand All @@ -260,8 +260,8 @@
- **`list_branches`**: List Git branches available for a project's repository, with optional `query` filtering. Returns the branch names, total count, and the deploy branch. Pass any of them as `branch`.
- **`status`**: List the edited files, changed `docs.json` keys, and pending navigation diff on `branch`, or on your deploy branch when you omit it. On the deploy branch, lists only your changes.
- **`diff`**: List all changes between `branch` and your deploy branch. Each changed file and `docs.json` entry includes `authors` and `byYou`. `authors` lists the members whose unpublished edits the entry contains. `byYou` is `true` when the entry includes your own edits. Use `byYou` to tell your changes apart from a colleague's on a shared branch.
- **`publish`**: On the deploy branch, commit only your pending changes directly. On a branch, commit pending changes and return the branch's pull request, opening one if needed. Pass `merge: true` to also merge the pull request when edits to the deploy branch are allowed. When the changes reach the deploy branch, also returns a `deployment` status to follow with `deployment_status`.

Check warning on line 263 in ai/mintlify-mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/mintlify-mcp.mdx#L263

In general, use active voice instead of passive voice ('are allowed').
- **`deployment_status`**: Check whether published changes are live on your docs site. Pass the `commitSha` from `publish`, or omit it to check the latest deploy. Returns a `state` of `pending`, `queued`, `building`, `live`, `not_live`, `failed`, or `skipped`, along with `live` and a `message` to share with you. `not_live` means the site still serves an earlier version, for example because the deploy was rolled back or your deployment is pinned to an earlier version.

Check warning on line 264 in ai/mintlify-mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/mintlify-mcp.mdx#L264

In general, use active voice instead of passive voice ('was rolled').

Check warning on line 264 in ai/mintlify-mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/mintlify-mcp.mdx#L264

In general, use active voice instead of passive voice ('is pinned').
- **`discard`**: Abandon the edits on `branch`. On the deploy branch, reverts only your pending changes. On another branch you created, deletes the branch and closes its pull request.

## Example prompts
Expand All @@ -281,7 +281,7 @@
</Accordion>

<Accordion title="Review every PR">
The admin MCP is powerful enough to rewrite hundreds of pages in a single session. Before merging, read the PR diff and skim the rendered preview. Don't rubber-stamp large changes.

Check warning on line 284 in ai/mintlify-mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/mintlify-mcp.mdx#L284

Cut or rephrase 'powerful'. See 'Phrases to cut' in the style guide.
</Accordion>

<Accordion title="Keep branches focused">
Expand Down
Loading