MCP integration
Monjiro provides an MCP (Model Context Protocol) server. Connect AI tools such as Claude Code or Codex to have the AI read your documentation or create pages.
There are two ways to connect an AI tool. Normally, use connecting by signing in, which needs no token. In environments where you cannot sign in with a browser (such as CI or server-side jobs), or with AI tools that do not support connecting by signing in, use connecting with a token.
What you can do
| Permission | What you can do |
|---|---|
| Read only | List documents and pages, read content, search, take page screenshots, read the writing guide, check translation status, and read the question history (questions readers asked in the AI chat, with the AI's answers and readers' ratings) |
| Read and edit | Everything above, plus creating, updating and deleting pages, adding images, changing the order and depth of pages in the page tree, changing page settings (hiding, and showing the header, page tree, breadcrumbs, previous/next links and footer), entering translations, and setting the cover image, header logo and favicon |
You choose the permission on the approval screen when connecting by signing in, or when creating the token when connecting with a token. Either way, the AI tool uses your documentation as the connected user's account, within that user's permissions.
The AI edits only the working content. Nothing is published automatically. The cover image, logo and favicon are also set on the working content. Check the content in the app, then publish by following Publish a document.
The MCP server includes Monjiro's guide to writing documentation (page structure, writing so the AI chat can answer well, when to use each block, and so on). AI tools read this guide before creating pages.
Connect by signing in
You do not need to create a token. You sign in to Monjiro in a browser opened by the AI tool and allow the connection (this uses MCP's OAuth mechanism). Any AI tool that can add an MCP server by URL and supports OAuth sign-in can connect this way.
The MCP server URL to add to your AI tool is:
https://app.monjiro.io/api/mcpThe connection flow is the same for every AI tool.
- Add the URL above to your AI tool as an MCP server.
- Start authentication (sign-in) in the AI tool. A Monjiro screen opens in your browser.
- If you are not signed in to Monjiro, the sign-in screen appears. After you sign in, you move on to the screen for allowing the connection.
- On the approval screen, choose what to allow ("Read only" or "Read and edit") and click "Allow".
- Return from the browser to the AI tool. Monjiro's MCP is now available.
How to add the URL and start authentication differs by AI tool. Also check your AI tool's documentation.
The approval screen shows the name of the app requesting the connection and where you return after allowing it (localhost on your computer, or the address of the AI tool's service). The app name is the one the app gives itself. If you did not start the connection yourself, click "Deny".
Example: Claude Code
- Run the following command in a terminal to add the MCP server.
claude mcp add --transport http monjiro https://app.monjiro.io/api/mcp- In Claude Code, type /mcp, select monjiro from the list, and start authentication. When the browser opens, sign in and allow the connection as in step 3 onward above.
After connecting
Once connected, you can ask your AI tool things like:
- "Show me the list of my Monjiro documents"
- "Write a page about X"
- "Move the X page under the Y page", "Reorder the pages to follow the steps"
- "Hide the X page"
- "Don't show previous/next links on the announcement pages"
- "Look at last month's question history and fix the pages so they can answer the questions whose answers were rated poorly"
- "Set this logo image as the header logo"
A connection made by signing in stays usable. However, if it is not used even once for 30 days, you need to sign in and allow the connection again.
The question history contains exactly what readers typed into the AI chat. If you have an AI tool read it, note that any personal information readers entered is also passed to the AI tool.
Review and revoke connected apps
Open "Account settings" from the account menu at the top right of the screen. "Apps connected via MCP" lists the apps you allowed by signing in. For each app, you can see what you allowed, when it was connected, and when it was last used.
To revoke a connection, click "Revoke" for the app, then click "Revoke" in the confirmation. A revoked app stops working immediately. To use it again, sign in and allow the connection again.
To change what you allowed, sign in again from the AI tool and allow it again; your new choice replaces the old one.
Connect with a token
In environments where you cannot sign in with a browser, or with AI tools that do not support connecting by signing in, connect with a token created in account settings.
Create a token
- Open "Account settings" from the account menu at the top right of the screen.
- Under "MCP tokens", click "Create token".
- Choose a name (for example, Claude Code), an expiration (30 days, 90 days or 1 year) and the permission, then click "Create".
- The new token and connection examples (Claude Code, Codex) are shown. The token is shown only this once. Copy it and keep it in a safe place.
Connect Claude Code with a token
Run the following command in a terminal. Replace <token> with the token you created.
claude mcp add --transport http monjiro \
https://app.monjiro.io/api/mcp \
--header "Authorization: Bearer <token>"Connect Codex
In Codex, you cannot pass the token value directly in the command. Set the token in an environment variable and specify the name of that variable.
- Run the following command in a terminal.
codex mcp add monjiro \
--url https://app.monjiro.io/api/mcp \
--bearer-token-env-var MONJIRO_MCP_TOKEN- Set the token in the environment variable MONJIRO_MCP_TOKEN. Add the following line to your shell's configuration file (such as ~/.zshrc) and reopen the terminal. Replace <token> with the token you created.
export MONJIRO_MCP_TOKEN="<token>"- Restart Codex, and Monjiro's MCP becomes available. You make requests the same way as with other AI tools.
The token is not stored in Codex's settings or in your command history; it is read from the environment variable.
Depending on your Codex version, codex mcp add may not accept --url. In that case, add the following to the configuration file (~/.codex/config.toml) and then go to step 2.
[mcp_servers.monjiro]
url = "https://app.monjiro.io/api/mcp"
bearer_token_env_var = "MONJIRO_MCP_TOKEN"Revoke a token
In the "MCP tokens" list in account settings, click "Revoke" for the token, then click "Revoke" in the confirmation. A revoked token stops working immediately.