How to connect Claude Code to Confluence with MCP (step by step)
Updated 2 December 2026 · 8 min read
Short answer: Run claude mcp add --transport http atlassian <URL> with the Atlassian Rovo MCP Server URL from Atlassian's current getting-started page, start Claude Code, run /mcp and sign in with your Atlassian account. As of December 2026 the URL is the v2 endpoint shown below. To add Folio's read-only tools as well, a site admin first turns them on in Atlassian Administration, then you run the command shown in Folio's Rovo & MCP tab. Every call runs with your own Confluence permissions.
What do you need before you connect Claude Code to Confluence?
- A Confluence Cloud site. Atlassian's setup pages for the Rovo MCP Server require an Atlassian cloud site.
- Claude Code installed, and a browser on the same machine for the Atlassian sign-in.
- An organization that has not blocked the Atlassian MCP server. Org admins can restrict AI tool domains, API token sign-in and the Read, Write and Search permissions.
- For Folio's tools: Folio installed on the site, and a site admin who can enable its tools.
Atlassian's remote MCP server and Folio's MCP tools are separate connections. You can add either one or both.
Step 1: How do you add the Atlassian Rovo MCP Server to Claude Code?
- Open Atlassian's getting-started page and copy the current Claude Code command. As of December 2026 it is:
Hereclaude mcp add --transport http atlassian https://mcp.atlassian.com/v2/mcpatlassianis a local name you choose,--transport httpselects a remote HTTP server, and the URL comes last. Atlassian has changed this endpoint before: it says that on March 1, 2027 existing v1 usage will start exposing v2 tools. If this article and Atlassian's page ever differ, follow Atlassian's page. - Choose a scope with
--scope.localis the default and applies to the current project only.usermakes the server available in all your projects.projectwrites a.mcp.jsonfile you can commit. Put options before the server name, for example:claude mcp add --transport http --scope user atlassian https://mcp.atlassian.com/v2/mcp - Start Claude Code and run
/mcp. Select atlassian, complete the browser sign-in and choose your Confluence site. Claude Code stores and refreshes the tokens automatically. - Verify the connection. Run
claude mcp listto see server health, then ask Claude something that needs Confluence data. Example prompt (illustrative): Search Confluence for our rollback runbook and summarize the steps. Atlassian's verification guide says a working setup returns answers that reference live Jira or Confluence data.
For Cursor, VS Code and other editors, start from Atlassian's IDE setup page. The server's Confluence tools include CQL search and reading page content, and also tools that create and update pages. Whether those write tools are available to you is an admin decision. Atlassian also says some calls use Rovo credits from the organization's shared pool.
Step 2: How do you add Folio's read-only tools to Claude Code?
- Install Folio for Confluence on your Confluence Cloud site. A site admin must approve the install. The Folio documentation has the quick start.
- Ask a site admin to turn on Folio's tools in Atlassian Administration → Apps → Sites → Connected apps → Folio for Confluence → Details → Tools. Atlassian's
rovo:mcpreference says external MCP exposure is off by default and is set per app and per site. It also lists Forge app MCP tools as a Preview feature as of December 2026. - In Confluence, open Space apps → Folio for Confluence → Rovo & MCP, choose Connect a coding tool, pick Claude Code and copy the command. It has this shape:
Copy the endpoint from Folio instead of from a guide, because Folio shows the right one for your installation.claude mcp add --transport http folio <endpoint shown in Folio> - Run the command, start Claude Code, run
/mcp, select folio and sign in. Atlassian's consent screen asks you to pick a site, limited to sites where Folio is installed and its tools are enabled, and to review the scopes and tools before you approve. - Try a prompt (illustrative): Use Folio to audit the health of the Payments Runbooks section and list the three most important fixes.
Folio exposes exactly four tools, all read-only:
| Tool | What it returns |
|---|---|
audit-section-health | A 0 to 100 Context Health Score and a prioritized issue list for a section |
get-clean-markdown | One page as clean GitHub-flavored Markdown, with its labels, token count and referenced Jira keys |
export-context-pack | A token-budgeted llms-full.md pack at 8k, 32k or 128k tokens |
check-jira-drift | The Jira keys a section cites, compared with live ticket status and update times |
Every call runs with your own Confluence and Jira permissions. Folio's tools cannot change pages, so Claude Code can read your docs through them but never edit them. Jira drift checks need the optional Jira connection on the same site.
Large packs behave differently from small ones. Claude Code warns when an MCP result passes 10,000 tokens and, by default, saves results above 25,000 tokens to a file that Claude reads when it needs the content. To allow bigger inline results, set a higher limit before you start Claude Code, as described in Claude Code's MCP documentation:
export MAX_MCP_OUTPUT_TOKENS=50000
claude
How do you use both servers together?
Use Atlassian's server when the question needs search across spaces or Jira context. Use Folio when you want one section as clean Markdown, a token-budgeted pack or a health score before you trust the pages. Claude Code defers MCP tool definitions by default, so a second server adds little to the context window.
The guide on giving coding agents your Confluence docs compares these options with exporting files into the repository.
How do you share the setup with your team?
Add the server at project scope and commit the resulting .mcp.json. Everyone signs in with their own Atlassian account, and Claude Code asks each person to approve a project-scoped server the first time. The file for the Atlassian server looks like this:
{
"mcpServers": {
"atlassian": {
"type": "http",
"url": "https://mcp.atlassian.com/v2/mcp"
}
}
}
Do not put tokens in this file. OAuth needs none, and a shared file with credentials is a leak waiting to happen. For Folio, paste the endpoint that Folio's tab shows.
What do you do when the connection fails?
Atlassian's troubleshooting page and Claude Code's documentation cover most failures.
| Symptom | Likely cause | Fix |
|---|---|---|
Server shows as failed or needs authentication in /mcp | You have not signed in, or the token expired | Run /mcp, select the server and sign in again, or run claude mcp login <name>. Atlassian notes that an expired token can fail silently. |
| "Your organization admin must authorize access from this redirect URL" | API token sign-in is disabled, or the redirect URL is not allowed in the MCP server domain settings | Remove any headers block from .mcp.json so Claude Code uses OAuth, then ask an org admin to allow the redirect URL, as described in Atlassian's article on this error. |
| Browser sign-in loops or fails on redirect | Blocked pop-ups or a blocked redirect URI | Allow pop-ups. Atlassian's guide says to allow http://localhost:3334 in browser and firewall settings. You can also pin Claude Code's callback port with --callback-port. |
| "invalid token" or "invalid context" | A device clock that is out of sync, a deprecated endpoint or a stale session | Time-sensitive tokens can be rejected when the clock drifts by a few minutes, so turn on automatic time sync. Use the current endpoint, and retry in a private window. |
| Empty or partial results | Expired token or missing scopes | Reauthenticate and confirm the scopes on the consent screen. |
| A page you expect is missing | Your Confluence permissions | The agent cannot exceed your access. Ask the space admin. |
| Folio's tools do not appear | Tools not enabled for the site, or Folio not installed on the site you chose | Ask a site admin to enable the tools under Connected apps → Folio for Confluence → Details → Tools, then reconnect. |
| "MCP server atlassian already exists in local config" | The name is already used at that scope | Run claude mcp remove atlassian, then add it again. |
| A long result is saved to a file | Claude Code's MCP output limit | This is expected. Request a smaller token budget or raise MAX_MCP_OUTPUT_TOKENS. |
If the problem persists, check Claude Code's logs for the HTTP status, confirm your network is not blocking Atlassian, and contact Atlassian Support with the details.
How do you disconnect or revoke access?
Run claude mcp logout <name> first, then claude mcp remove <name>. Removing a remote server deletes its stored tokens on your machine but does not revoke them at the authorization server, so the logout step matters. A site admin can also switch off Folio's tools in Connected apps, and org admins can change the Atlassian MCP server's permissions in Atlassian Administration.
FAQ
Do I need an API token to connect Claude Code to Confluence?
No. OAuth 2.1 is the default for the Atlassian Rovo MCP Server, and you sign in through your browser. API token authentication is an optional alternative that an organization admin can turn on or off. Folio's tools use the same Atlassian sign-in and need no API keys.
Can I use the same setup in Cursor, Codex or VS Code?
Yes. Both the Atlassian server and Folio's tools work with MCP clients, and Atlassian's setup pages and Folio's Rovo and MCP tab cover Cursor, Codex and VS Code as well as Claude Code. The command or config format differs by client.
Can I make Claude Code read-only for Confluence?
Yes. Use only Folio's tools, which are read-only, or ask an organization admin to block the Write permission for the Atlassian MCP server in Atlassian Administration.
Why does Claude Code find some Confluence pages but not others?
Claude Code can read only what your own Atlassian account can read. Pages in spaces you cannot view, or pages whose restrictions exclude you, do not appear in search or reads. Ask the space admin for access instead of changing the connection.