Set up with an AI agent
Instructions an AI agent follows to connect to Documentation.AI, create a documentation site, and publish its first page. Covers Claude, ChatGPT, Claude Code, Codex, Cursor, and VS Code.
Setting this up for yourself? Paste this into your AI assistant, and it does the rest:
Set up Documentation.AI for me. Follow the instructions at https://documentation.ai/docs/setup.md
To connect by hand instead, see Authoring MCP Server.
The rest of this page is written for the AI agent doing the setup.
How setup works
The person you're helping wants a Documentation.AI site, or wants to work on one they already have. Everything happens through the Documentation.AI MCP server at https://api.documentation.ai/mcp. Signing in to it also lets a new person sign up, and its tools create the organization and site, write pages, and publish. There is no CLI to install and no API key.
Work through these parts in order, and skip any part that is already done:
Keep messages short
Each message to the person says what is done and the one thing they do next, in two or three sentences. Don't pass on IDs, tokens, file paths, or tool output. Give a link only when they need to open it now.
1. Check whether you're connected
Look at your tools. If you have the Documentation.AI tools, such as list_projects, create_organization, and publish, you're connected. Skip to Set up the site.
Don't add the server a second time. Two copies of the same tools make every later call ambiguous.
2. Connect
Which steps apply depends on one question: can you run commands and edit files on the person's computer?
No: you're a hosted assistant, such as Claude or ChatGPT
Adding a connector is a setting only the person can change, so don't try, and don't stop at "I can't do that". Send them the steps as a short numbered list, then stop.
In Claude, send something close to this:
Documentation.AI connects to Claude as a connector:
- Open the Documentation.AI connector and add it. If your organization doesn't allow directory connectors, use the Add custom connector link instead. It fills everything in.
- Sign in with your Documentation.AI account. If you don't have one, sign up on the same screen. You come back to finish connecting.
- Start a new chat and paste the same setup message you sent me.
In ChatGPT, send something close to this:
Documentation.AI connects to ChatGPT as a plugin:
- Install the Documentation.AI plugin.
- Sign in with your Documentation.AI account. If you don't have one, sign up on the same screen.
- Start a new chat, type
@, choose Documentation.AI, and paste the same setup message you sent me.
The new chat starts again at Check whether you're connected, finds the tools, and carries on from there. The rest of this section is for coding agents.
Yes: you're a coding agent
Work out which client you're running in: Claude Code, Codex, Cursor, or VS Code. If you can't tell, ask, because a configuration written for the wrong client does nothing. Then follow that client's steps below. You add the server, and the person signs in once, because sign-in opens their browser.
Ground rules
- Look for an existing connection first. If the client already has a server pointing at
https://api.documentation.ai/mcp, or at the earlierhttps://api.documentationai.app/mcp, under any name, keep it and use it. Only its sign-in may be missing. - Read a configuration file before you change it. Add only the
documentation-aientry, keep everything else exactly as it was, and check that the file still parses. - Say which file you're about to change before you change it.
- Never ask for or handle a password, token, or API key. Sign-in happens in the browser, and the client keeps the credentials.
Claude Code
-
Run
claude mcp list. If it shows Documentation.AI, it's already added. That includesclaude.ai Documentation.AI, which comes from the person's Claude account. If it says the server needs authentication, go to step 3. -
Add the server for all of the person's projects:
claude mcp add --transport http --scope user documentation-ai https://api.documentation.ai/mcp -
Send the person the sign-in steps, then stop:
Documentation.AI is added. To sign in:
- Exit Claude Code, then run
claude --continueto come back to this conversation. - Type
/mcp, choose documentation-ai, and select Authenticate. Sign in, or sign up if you don't have an account. - Tell me when you're done.
- Exit Claude Code, then run
In Claude Code on the web, or a non-interactive run such as claude -p, nobody can complete a sign-in, and a server added there doesn't last. Ask the person to add Documentation.AI in Claude instead, with the steps under hosted assistants. Claude Code sessions signed in with the same Claude account get the connector automatically, so they then start a new session and paste the setup message again.
Codex
-
Run
codex mcp list. If it shows a Documentation.AI server, use it. If your tools already include Documentation.AI, for example from the ChatGPT plugin, skip to Set up the site. -
Add the server:
codex mcp add documentation-ai --url https://api.documentation.ai/mcp -
Send the person the sign-in steps, then stop:
Documentation.AI is added. To sign in:
- Exit Codex and run
codex mcp login documentation-aiin your terminal. Sign in, or sign up if you don't have an account. - Run
codex resume --lastto come back to this conversation, and tell me when you're done.
- Exit Codex and run
Cursor
-
Read
~/.cursor/mcp.json, and.cursor/mcp.jsonin the project if there is one. If either already has a Documentation.AI server, use it. -
Add this entry under
mcpServersin~/.cursor/mcp.json, so it works in every project. Create the file if it doesn't exist.{ "mcpServers": { "documentation-ai": { "url": "https://api.documentation.ai/mcp" } } } -
Send the person the sign-in steps, then stop:
Documentation.AI is added. To sign in:
- Open Cursor's MCP settings and sign in to documentation-ai when it asks. Sign up there if you don't have an account.
- Start a new chat and paste the same setup message you sent me.
VS Code
-
Read
.vscode/mcp.jsonin the workspace. If it already has a Documentation.AI server, use it. -
Add this entry under
servers. Create the file if it doesn't exist.{ "servers": { "documentation-ai": { "type": "http", "url": "https://api.documentation.ai/mcp" } } } -
Send the person the sign-in steps, then stop:
Documentation.AI is added. To sign in:
- Start documentation-ai from the MCP servers list, and sign in when it asks. Sign up there if you don't have an account.
- Start a new chat and paste the same setup message you sent me.
Any other client
Give the client the server URL, https://api.documentation.ai/mcp, and have the person sign in when it asks. If the client only runs local servers, use the mcp-remote configuration in Authoring MCP Server.
3. Set up the site
- Call
list_projects. - If the person has no organization, the account is new. Ask one question: what the company or product is called. Then call
create_organizationwith that name ascompanyName. PassdocsAddressonly when the person asks for a particular address, or when the result says the name can't make one. The tool creates the organization and its first documentation site with starter pages, publishes it, and selects it. - If the person has organizations, ask whether to work on one of their sites or create a new one, naming the sites in plain words. For an existing site, call
select_project. For a new one, callcreate_documentationwith the organization and a name. If it's refused because the organization already has as many sites as it can, offer one of the existing sites instead. - If the person already has documentation on another platform, such as Mintlify, GitBook, ReadMe, or Docusaurus, offer to move it over with the migrator. It runs in Claude Code, Codex, and Claude Cowork.
- Tell the person the site's address from the result. It's live about a minute after the first publish finishes. If the result says the site is still being set up, wait a minute before you edit it.
4. Write and publish a first page
- Offer to write a first page, and ask what it should cover. If they'd rather not, finish with step 5.
- Call
get_component_referencebefore you use any component, andget_site_configwithoutlineto see where the starter pages sit. - Write the page with
create_page, and useaddToNavto place it in the navigation. - Tell the person what you wrote in a sentence or two, and publish with
publishwhen they agree. Then callget_deploymentuntil the deployment finishes, and give them the page's address. - Close with where to go next: they can keep asking you for changes, edit in the web editor at the dashboard address from the result, or connect a Git repository and a custom domain in the dashboard.
If something goes wrong
- The tools don't appear after sign-in. Start a new chat or session. In Claude, check that the connector is turned on for the chat.
- Sign-in fails, or the browser window never finishes. Remove the server and add it again, then sign in once more. See Troubleshooting.
- A tool says no documentation project is selected. Call
list_projects, thenselect_project. - A tool is refused for the person's role. Editing and publishing need the editor or admin role on that site. Ask the person to have an admin of the site change their role.