Files
mintlify__docs/ai/mintlify-mcp.mdx
Ethan Palm 017d7c7377 Fix Vale warnings (#6378)
* fix: reduce Vale false positives via vocab and config updates

- Make English-word vocab entries case-insensitive so sentence-start
  capitalization and normal prose usage stop flagging (agents, rest,
  cursor, setup, endpoints, etc.)
- Add vocab entries for filenames and code identifiers that appear in
  frontmatter and JSX contexts (docs.json, llms.txt, CLAUDE.md, etc.)
- Ignore openapi frontmatter lines, filenames, JSX attributes, email
  addresses, and internal link targets via TokenIgnores
- Skip inline code scope and indented code fences
- Add Headings exceptions for proper nouns (Claude Code, GitHub
  Actions, Route 53, GA4, etc.)
- Disable linting for the all-code vercel-json-generator snippet

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: resolve all Vale warnings and errors across docs

Content fixes:
- Reword sentences using 'will', first person, spaced em dashes,
  'e.g.', Latin abbreviations, and hyphenated adverbs
- Sentence-case headings that started with dotted filenames
- Backtick literal API values instead of bolding them
- Move periods inside quotation marks
- Fix Oxford comma rule misfires by restructuring sentences

False-positive suppression:
- Vale toggles around example user questions, keyboard shortcut keys
  (Cmd+I), UI labels, and code samples in JSX contexts that Vale
  misparses
- Exclude vale toggle comments from the brace Token/BlockIgnores so
  in-document commands actually reach Vale (the greedy brace pattern
  was also silently swallowing large regions; now lazy)
- Vocab entries for code identifiers (internal_id, handleSubmit, etc.)
- Per-file rule disables for component docs with dotted JSX names and
  files where link-target linting ignores in-document toggles

Result: vale --minAlertLevel warning is clean repo-wide; only
suggestion-level items (Passive, Semicolons, Acronyms) remain.
mint broken-links passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: correct WordList rule instead of degrading prose

- Restore sentence-start "Email" in advanced-support; the rule now
  only flags hyphenated e-mail/E-mail forms
- Restore the idiom "above all else"; the above->preceding swap now
  exempts "above all"

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: restore deliberate prose flagged by blunt rules

- Restore spatial 'above the navbar' / 'above a page title' in
  custom-scripts; the above->preceding swap now exempts 'above
  the/a/an'
- Restore the '= ...' in the react-components named-export example
  (the ellipsis is inside inline code) with an Ellipses toggle
- Restore SLA phrasing 'will use commercially reasonable efforts'
  with a Will toggle
- Restore the quoted developer question in the GEO guide intro with a
  FirstPerson toggle, matching the file's other example questions

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: remove WordList swaps that flag legitimate English

- Drop tablet->device and firewalls->firewall rules; both words are
  correct in ordinary prose
- Narrow touch->tap to UI-instruction phrasing (touch the/a) so
  'keep in touch' and 'touch devices' stop flagging

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: reposition vale toggles to wrap whole blocks

Toggle comments placed between list items split the lists (restarting
ol numbering in deployments) and comments flush against tables risked
breaking GFM table parsing. Wrap entire lists/tables with blank-line
separation instead. Verified rendering with mint dev: single ol with
two items, tables intact, no comments in visible DOM.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* refactor: prune accept.txt to load-bearing entries

Empirically removed 166 vocab entries (575 -> 409) whose removal
causes no Vale flags across all 908 English pages: dictionary words
that never needed listing (agents, setup, endpoints, webhooks, yaml),
lowercase entries the speller already accepts, and filename entries
made redundant by inline vale toggles.

Kept every case-enforcing entry (API, JSON, GitHub, ...) so casing
policy is unchanged, plus entries that double as capitalization
exceptions for headings (mcp, md, auth, cursor, txt).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Update ai/mintlify-mcp.mdx

* Update api/agent/v2/create-agent-job.mdx

* chore: alphabetize Headings exceptions and accept.txt

Case-insensitive sort, ignoring the (?i) prefix; also drops a
duplicate Scala entry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: re-apply OxfordComma rewrite lost in branch merge

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: resolve Vale suggestions batch 1 (acronyms, semicolons, passive voice)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: resolve remaining Vale suggestions (passive voice batch 2)

Rewrite ~90 passive constructions to active voice across deploy,
guides, migration-services, and organize docs. Toggle the deliberate
passive examples in the style-and-tone guide ('by zombies' test).
Add axios/lodash vocab entries for a repositioned code example.

vale . is now fully clean: 0 errors, 0 warnings, 0 suggestions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 17:17:56 -07:00

204 lines
12 KiB
Plaintext

---
title: "Admin Model Context Protocol (MCP) server"
sidebarTitle: "Admin MCP"
description: "Give AI tools like Claude and Cursor write access to your Mintlify content and dashboard so they can edit pages, update settings, and open PRs."
keywords: ["MCP", "write access", "AI", "editing", "Claude", "Cursor", "branch", "pull request"]
---
## 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.
Connect any MCP client like Claude, Claude Code, or Cursor to the admin MCP server to collaborate on your Mintlify content and settings with the same tools you use to write code. When you use the admin MCP server, all changes happen on a branch and require a pull request to merge. If your organization has multiple deployments, 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 like a coworker with write access. Connect it only from trusted AI tools and review every pull request before merging.
</Note>
The admin MCP is a hosted Mintlify service at `https://mcp.mintlify.com`. Every client connects to the same endpoint and authenticates with your Mintlify account.
### How the admin MCP differs from the search MCP
| | Admin MCP | Search MCP |
| :-- | :-- | :-- |
| **Audience** | Your team | Your end users |
| **Access** | Read, edit, restructure, save, create workflows, manage settings | Read and search published pages |
| **Endpoints** | Hosted by Mintlify, scoped to your project | `/mcp` on your site domain |
| **Output** | Content edits, navigation changes, pull requests, workflow runs | Search results and page content |
## Prerequisites
Before connecting the admin MCP, confirm the following:
- **Mintlify account**: You need a Mintlify account with access to the project you want to edit. The OAuth session inherits your dashboard permissions, so admin-only actions (such as `update_config` on protected settings) require an admin role on the project.
- **Git provider access**: The Mintlify GitHub App or GitLab connection for the project must have write access to the deploy branch's repository. `save` opens PRs through the same integration used for normal deploys.
- **MCP client**: An MCP-capable AI tool such as Claude, Claude Code, Cursor, or Codex.
## Connect to the admin MCP
You must have an interactive OAuth login against your Mintlify account to connect to the admin MCP. AI tools exchange that login for a session token scoped to one or more deployments, depending on how you grant access. A connection scoped to specific deployments can only check out those, while an organization-wide connection can check out any deployment in your organization.
<Tabs>
<Tab title="Claude">
<Steps>
<Step title="Add the admin MCP as a custom connector">
1. Navigate to the [Connectors](https://claude.ai/settings/connectors) page in the Claude settings.
2. Click **Add custom connector**.
3. Add the connector:
- Name: Admin MCP
- URL: `https://mcp.mintlify.com`
4. Click **Add** and complete the OAuth login.
</Step>
<Step title="Use the MCP in a chat">
Click the attachments button (the plus icon), then select your admin MCP server. Claude can now call the Mintlify admin MCP tools while answering your prompt.
</Step>
</Steps>
</Tab>
<Tab title="Claude Code">
Add the admin MCP server with the Claude Code CLI:
```bash
claude mcp add --transport http mintlify https://mcp.mintlify.com
```
On first use, Claude Code opens a browser window to complete the OAuth login. After authenticating, the session is reused for subsequent calls.
</Tab>
<Tab title="Cursor">
1. Open the command palette with <kbd>Command</kbd> \+ <kbd>Shift</kbd> \+ <kbd>P</kbd> (<kbd>Ctrl</kbd> \+ <kbd>Shift</kbd> \+ <kbd>P</kbd> on Windows).
2. Search for **Open MCP settings** and click **Add custom MCP**.
3. In `mcp.json`, add the admin MCP:
```json
{
"mcpServers": {
"mintlify": {
"url": "https://mcp.mintlify.com"
}
}
}
```
4. Reload Cursor and complete the OAuth login when prompted.
</Tab>
<Tab title="Codex">
Add the admin MCP server to your Codex CLI config at `~/.codex/config.toml`:
```toml
[mcp_servers.mintlify]
url = "https://mcp.mintlify.com"
```
On first use, Codex opens a browser window to complete the OAuth login. After authenticating, the session is reused for subsequent calls.
See the [Codex MCP documentation](https://developers.openai.com/codex/mcp) for more details.
</Tab>
</Tabs>
## How a session works
Every admin MCP session binds to a single Git branch. The flow is:
<Steps>
<Step title="Discover deployments (optional)">
If your connection has access to more than one deployment, call `list_deployments` to see which `subdomain` values you can check out. Skip this step if your connection covers only a single deployment.
</Step>
<Step title="Check out a branch">
The first required call is `checkout {subdomain}`. It creates a fresh `mintlify-mcp/<slug>-<sha>` branch from that deployment's deploy branch (or attaches to an existing branch you name) and returns an `editorUrl` you can open to follow along in the dashboard editor.
Call `list_branches` before `checkout` if you need to discover or filter existing branches in a deployment's repository.
</Step>
<Step title="Read, search, and edit">
The AI uses tools like `search`, `read`, `list_nodes`, `edit_page`, `write_page`, `create_node`, and `update_config` to make changes. All edits buffer on the session branch in real time—nothing touches your deploy branch yet.
</Step>
<Step title="Review the diff">
Call `diff` at any time to see exactly what changed since `main`. Open the `editorUrl` in your dashboard to see the same changes rendered.
</Step>
<Step title="Save">
Call `save` to flush the branch to Git. Use `mode: "pr"` (default) to open a pull request, or `mode: "commit"` to push directly to an existing PR branch.
</Step>
<Step title="Discard if needed">
Call `discard_session` to drop all in-session changes and release the branch.
</Step>
</Steps>
<Tip>
If your connection has access to multiple deployments, each checked-out deployment keeps its own session and branch in memory at the same time.
Calling `checkout` again with a different `subdomain` or branch switches which session is active. It doesn't discard the others. To abandon an in-progress draft instead of switching away from it, call `discard_session`.
</Tip>
## What the admin MCP can do
### Content
- **`read`** — Fetch the full MDX of any page on the session branch.
- **`search`** — Find lines matching a substring or regular expression across every page.
- **`edit_page`** — Apply a targeted edit to a page.
- **`write_page`** — Overwrite a page's full MDX content.
### Navigation
- **`list_nodes`** — Walk the navigation tree with optional filters. Filter by `parentId` (use `recursive: true` to include all descendants), one or more node types, or any division scope: `language`, `version`, `tab`, `dropdown`, `anchor`, `product`, or `item`. Results paginate through an opaque `cursor`.
- **`create_node`** — Add a new page, group, tab, anchor, version, language, product, or dropdown.
- **`update_node`** — Update a node's properties in place (rename a group, change an icon, set a default version).
- **`move_node`** — Move a node, including renaming a page's path.
- **`delete_node`** — Remove a node from the navigation.
### Configuration
- **`update_config`** — Modify `docs.json` (theme, navigation roots, integrations, SEO settings).
### Session
- **`list_deployments`** — List the deployments your connection can access, returning each `{subdomain, name}`. Call this to discover which `subdomain` to pass to `checkout`.
- **`checkout`** — Bind a session to a branch for a given deployment `subdomain`, or switch which deployment's session is active.
- **`list_branches`** — List Git branches available for a deployment's project, with optional `query` filtering. Returns the branch names, total count, and the deploy branch. Call this before `checkout` to attach to an existing branch by name.
- **`get_session_state`** — Inspect the current branch, edited files, and pending nav diff.
- **`diff`** — List all changes between the session and `main`.
- **`save`** — Open a pull request or commit to the session branch.
- **`discard_session`** — Drop the session and its in-flight changes.
## Example prompts
After you connect the admin MCP, you can drive it with natural-language prompts. For example:
- _"Check out a branch called `add-billing-faq` and create a new page under the FAQ group titled 'Billing'. Draft answers for the five questions in this Linear issue."_
- _"Find every page that mentions the deprecated `legacy_token` field and update the example to use `api_key` instead. Save as a PR titled 'docs: replace legacy\_token references'."_
- _"Reorganize the API reference: move the webhooks pages into a new group called 'Webhooks' and update the icons to match the rest of the section."_
## Best practices
<AccordionGroup>
<Accordion title="Open the editor URL">
Every `checkout` returns an `editorUrl`. Open it in a separate tab so you can watch the AI's changes render live in the dashboard editor while you prompt.
</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.
</Accordion>
<Accordion title="Use slugs for branch names">
Pass a `slug` to `checkout` (for example, `add-quickstart`) so the auto-generated branch is human-readable. Without it, the branch name derives from the session token and is hard to recognize in your repository.
</Accordion>
<Accordion title="Keep sessions focused">
Keep each session focused to one change. Smaller sessions produce easier to review pull requests and preserve agents' context windows. Use `discard_session` and `checkout` again to pivot to unrelated work.
</Accordion>
</AccordionGroup>
<Note>
Sessions hold an in-memory branch on the Mintlify side. If you abandon a session without saving or discarding it, the branch persists until your next checkout overwrites it. Avoid leaving stale `mintlify-mcp/*` branches in your repository. Clean them up periodically.
</Note>
## Disconnect or revoke access
Disconnect the admin MCP when you no longer want an AI tool to edit your project, or when you want to force a fresh OAuth login.
- **Revoke the OAuth grant**: In your Mintlify dashboard, navigate to **Settings → Security & access → Connected apps** and revoke the entry for the AI tool you connected. Revoking invalidates any active session tokens immediately, so in-flight tool calls fail and the tool must complete a new OAuth login on the next call.
- **Remove the connector in the client**:
- Claude: **Settings → Connectors**, then remove the admin MCP entry.
- Claude Code: `claude mcp remove mintlify`.
- Cursor: delete the `mintlify` entry from `mcp.json` and reload.
- Codex: delete the `[mcp_servers.mintlify]` block from `~/.codex/config.toml`.
Revoking the OAuth grant does not affect pull requests the MCP has already opened. Close or revert those PRs in your Git provider if you want to undo pending changes.