How to give Claude Code, Cursor and Codex your Confluence docs

Updated 2 December 2026 ยท 8 min read

Short answer: Export the section your agent needs to Markdown and commit it, or load it as one token-budgeted llms-full.md file, when you want stable, reviewable context. Connect the agent over MCP when you want live reads: either the official Atlassian Rovo MCP Server, which can also write, or Folio's four read-only tools. MCP calls run with the signed-in user's own Confluence permissions, while exported files are copies that anyone with the repository can read.

Why can't a coding agent just read Confluence?

Coding agents read files and call tools. Confluence pages live behind an authenticated REST API in Atlassian Document Format (ADF), a JSON structure, not as Markdown files in your repository. An agent therefore needs one of two bridges: a copy of the docs as files, or a live connection over the Model Context Protocol.

MCP (Model Context Protocol) is an open protocol that lets an AI client such as Claude Code call tools and read data exposed by a server.

The second constraint is context size. An agent can only use what fits in its context window, so dumping a whole space into a session usually backfires. Whatever option you pick, send the smallest section that answers the task.

What are the options for giving a coding agent Confluence docs?

There are five practical options. They differ mainly in freshness and in whose permissions apply.

OptionFreshnessWhose permissions applyBest forMain catch
Copy and pasteAs fresh as the moment you copyYours at copy timeOne-off questions about one pageManual, loses structure and links, never refreshes
Markdown export committed to the repoSnapshot, stale until you export againAnyone with repo accessSpecs and runbooks the agent needs on most tasksCopies drift, and restricted pages can leak into the repo
llms-full.md packSnapshot of a section within a token budgetAnyone who gets the fileLoading one section into one sessionThe budget forces omissions
Atlassian Rovo MCP ServerLiveThe signed-in user'sSearching and reading across Confluence and Jira, and writing when allowedBroad scope, write tools exist, some calls use Rovo credits
Folio's read-only MCP toolsLiveThe signed-in user'sClean Markdown, health scores and token-budgeted packs for a sectionNeeds Folio on your site and an admin to enable the tools; four tools only

Option 1: When is copy and paste enough?

For one question about one page, paste it. Paste the text, not a screenshot, and include the page title and last-updated date so the agent can say when the content looks old. Do not paste credentials or customer data.

Nothing refreshes. If you paste the same page every week, move to an export or to MCP.

Options 2 and 3: How do you export Confluence docs into a repo?

Exporting gives the agent plain files it can search with the same tools it uses for code. The process is the same whether you keep many Markdown files or one llms-full.md pack.

  1. Pick the smallest section that answers the agent's questions, for example the runbooks for one service, not the whole space.
  2. Export it to Markdown. With Folio, open Space apps โ†’ Folio for Confluence โ†’ Audit & fix, choose the section, pick an 8k, 32k or 128k token budget, then download one llms-full.md or a nested .zip of Markdown with YAML frontmatter and relative links. If the section is over budget, Prioritize key pages keeps shallow, healthy, recent pages and lists the pages it left out, while Compact to fit shortens pages to fit more of them. Other export methods are covered in the export guide.
  3. Commit the files, for example under docs/confluence/, and add a short pointer in your agent instructions file.
  4. Export again when the Confluence pages change, and review the diff in Git.

Example layout (illustrative):

docs/confluence/
  llms-full.md
  payments/
    deploy.md
    rollback.md

Example pointer in CLAUDE.md or AGENTS.md (illustrative):

## Reference docs
Engineering docs exported from Confluence are in docs/confluence/.
Read docs/confluence/llms-full.md before changing deployment code.
They are a snapshot. If they conflict with the code, tell me.

Do not use an @ import for a large pack. Claude Code expands imported files into context together with the CLAUDE.md that imports them, and Anthropic suggests keeping each file under about 200 lines (see Anthropic's memory documentation). A plain-text pointer lets the agent open the file only when it needs it.

The name llms-full.md follows the full-content files that some documentation sites publish next to an llms.txt index. The llms.txt proposal itself defines only the index file. The llms.txt guide covers the difference.

The trade-off is permissions. Exported files leave Confluence's permission model, so anyone with the repository can read them even if the Confluence page was restricted. Export only what the repository's audience may see.

Option 4: How does the Atlassian Rovo MCP Server work with coding agents?

Atlassian runs an official remote MCP server for its cloud products. As of December 2026, its getting-started page describes sign-in with OAuth 2.1, says actions respect each user's existing permissions, and includes setup for Claude Code, Cursor and Codex. Its supported tools page lists Confluence tools to search with CQL and read content, and also tools that create and update pages, so treat it as read and write.

Organization admins control it. They can allow or block AI tool domains, turn API token sign-in on or off, and set Read, Write and Search permissions under Connectors โ†’ Atlassian MCP server in Atlassian Administration, as described on Atlassian's MCP permissions page. Atlassian also says some calls, such as enriched Teamwork Graph search, use Rovo credits from the organization's shared pool.

This is the right choice when the agent must search across spaces or touch Jira as well. The step-by-step setup is in the Claude Code connection guide.

Option 5: What do Folio's read-only MCP tools add?

Folio declares a Forge rovo:mcp module, Folio Context MCP, that exposes exactly four read-only tools through Atlassian's MCP server to Claude Code, Cursor, Codex, Antigravity and VS Code:

  • 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.
  • check-jira-drift: the Jira keys a section cites, compared with live ticket status and update times.

A site admin turns the tools on in Atlassian Administration, you copy the command from Folio's Rovo & MCP tab, and you sign in with Atlassian OAuth. Every call runs with your own permissions and there are no API keys. Atlassian's rovo:mcp reference lists Forge app MCP tools as a Preview feature as of December 2026.

Folio fits when you want Markdown that is already clean, a pack sized to a budget, a health check before the agent trusts the docs, or a guarantee that the agent cannot write. It does not fit when you need search across the whole site or Jira issue work, which the official server covers, or when you are on Data Center, because Folio is Confluence Cloud only.

One practical limit: Claude Code warns when an MCP result passes 10,000 tokens and, by default, saves results above 25,000 tokens to a file instead of placing them in the conversation. An 8k pack fits inline, while 32k and 128k packs usually end up in a file the agent reads on demand. The limit is configurable, as described in Claude Code's MCP documentation.

How do permissions and freshness compare across the options?

  • Files: freshness equals your last export, and the audience is whoever can read the repository.
  • MCP: content is live, and every call uses the signed-in person's permissions. The agent can read everything that person can read, not only the relevant section, so ask narrow questions. Atlassian's own advice is to use least privilege and review high-impact changes before confirming them.
  • Mixed: many teams commit stable standards as files and use MCP for fast-moving pages.

Which option should you choose?

  • One question about one page: paste it.
  • The same handful of docs on most tasks: export to the repo.
  • One section in one session, within a token budget: an llms-full.md pack.
  • Search across spaces and Jira, or creating pages: the Atlassian Rovo MCP Server, with Write permission decided by your admin.
  • Live, read-only, clean Markdown for one service's docs, plus a health check: Folio's MCP tools.

How do you keep the docs your agent reads accurate?

An agent repeats whatever it reads. Stale pages, conflicting duplicates and dead links turn into confident wrong answers, as the guide on why AI gives wrong answers from Confluence explains. Check a section before you export it or connect an agent to it.

Folio's Audit & fix tab scores any page tree from 0 to 100 across freshness (30 points), link integrity (25), length and token density (25) and structure and labels (20), using no AI credits. It proposes only safe fixes, such as removing dead and localhost links while keeping the link text, and you review and apply them. See Fixing docs in the Folio documentation.

FAQ

Can Claude Code edit my Confluence pages through MCP?

It can through the official Atlassian Rovo MCP Server if your organization allows the Write permission, because that server includes tools that create and update content. Folio's MCP tools are read-only, so a coding agent can read your docs through them but never change them.

Will the agent see Confluence pages I cannot open?

No. MCP calls run with the permissions of the person who signed in, so the agent can read only what that person can read. Exported files are different: anyone with access to the repository can read them, whatever the page restrictions were in Confluence.

Do these options work with Confluence Data Center?

Atlassian's setup pages describe the Rovo MCP Server for Atlassian cloud sites, and Folio supports Confluence Cloud only. Neither covers Data Center.

How much Confluence content should I give an agent at once?

As little as answers the task. Start with one section at the 8k token budget, then step up to 32k or 128k only if the agent needs more. Larger packs use more of the context window and can bury the pages that matter.