Connect Confluence to Claude Code
Search the wiki, read pages, publish and revise documentation. Add Toolspoke to Claude Code once and it can use 10 Confluence actions. Your Confluence credential stays in Toolspoke, and you choose which actions Claude Code may call.
Set it up in Claude Code
Three steps, the first one once for every toolkit you will ever add.
Add Toolspoke to Claude Code
Run it in your project, then /mcp to sign in
claude mcp add --transport http toolspoke https://toolspoke.com/mcpThe sign-in opens in your browser, and Toolspoke asks you to approve it.
Install Confluence and connect it
Add Confluence to a project in your Toolspoke workspace.
Atlassian API token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.
- Atlassian site name
- Just the subdomain. For https://acme.atlassian.net/wiki this is acme.
- Email and API token
- Your Atlassian account email, a colon, then an API token from id.atlassian.com → Security → API tokens. Sent as HTTP Basic. The token inherits your own Confluence permissions, so create it on an account that can read the spaces this connection should reach.
Choose what Claude Code may do
All 10 actions start on. Switch off any of the 3 actions that change something in Confluence, and Claude Code gets a refusal if it tries.
What you can ask Claude Code for
A few of the Confluence actions that only read, so they are safe to try first.
- List pages, newest changes first when you sort that way, optionally restricted to one space
- Fetch one page with its body and its current version number
- List the direct children of one page, in the order they appear in the sidebar tree
- List the spaces this token can read, with their numeric id, key and name
What Claude Code can do in Confluence
7 actions read and 3 write.
Reads
Search pages
Search the whole site with CQL, Confluence's query language, and return matching content with a short excerpt and its id. This is the only full-text search Confluence offers, and the starting point when you know what a page says but not where it lives; use list_pages instead when you already know the space and only want its contents listed. CQL examples: "type = page AND text ~ 'onboarding'", "space = ENG AND lastModified > now('-14d')", "title ~ 'runbook' AND type = page". Take the id from a result and call get_page for the body. This one action reaches the v1 API at /wiki/rest/api/search, because REST v2 has no search endpoint.
List pages
List pages, newest changes first when you sort that way, optionally restricted to one space. Returns ids, titles and status but no body unless you ask for one. Use it to walk a space you already know, call list_spaces for the space_id first, and search_pages when you need full-text matching instead. Paging is by the opaque cursor returned in the previous response.
Get page
Fetch one page with its body and its current version number. Call this before update_page: the version number it returns is what update_page has to increment, and an update sent with the wrong version is rejected. body_format decides what you get back, storage is Confluence's XHTML storage format and is what create_page and update_page take, while view is rendered HTML that cannot be written back.
List child pages
List the direct children of one page, in the order they appear in the sidebar tree. Use it to walk a documentation hierarchy downwards from a known page rather than searching; each result carries an id you can pass to get_page or back into this action. Returns titles and ids only, never bodies.
List attachments
List the files attached to a page: filename, media type, size, download link and the version that added each one. Use it to find out what supporting material a page carries. This returns metadata only, it does not download file contents.
List spaces
List the spaces this token can read, with their numeric id, key and name. Call this first for almost anything else: create_page needs the numeric space_id and will not take the key, and CQL queries in search_pages use the key. Takes no required arguments and changes nothing, which is why it is the install-time health check.
Get space
Fetch one space by its numeric id: name, key, type, description, homepage id and author. Use it after list_spaces when you need the homepage id to start walking the tree with list_child_pages, or to read what a space is for before writing into it.
Writes
Create page
Publish a new page in a space. Needs the numeric space_id from list_spaces, the space key such as ENG is not accepted here. Pass parent_id to file the page under an existing one; omit it and the page lands at the top level of the space. The body is sent in the representation you name: storage is Confluence's XHTML storage format (<p>text</p>), wiki is legacy wiki markup, atlas_doc_format is ADF JSON. Returns the new page's id, version and links.
Update page
Replace a page's title and body with a new version. Confluence has no partial edit here: whatever you send becomes the whole page, so read it with get_page first, change what you need, and send the result back. version_number must be exactly the current version plus one, get_page returns the current one, and a stale number is refused rather than silently overwriting someone else's edit. Every version is kept, so this is recoverable through the page history.
Add comment
Post a footer comment on a page, the comment thread at the bottom, not an inline annotation on selected text. Prefer this over update_page when you are commenting on a document rather than changing it, because update_page replaces the body wholesale. The body is sent in the representation you name; storage format is plain XHTML such as <p>Looks right to me.</p>.
Confluence in Claude Code: questions
Does Claude Code see my Confluence credential?
No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.
Can I stop Claude Code from changing things in Confluence?
Yes. Each of the 10 actions can be switched off for a project. Turn off the 3 that change something and Claude Code can only read.
Will 10 actions crowd Claude Code's context?
No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Confluence action it needs when it needs it. Adding more toolkits does not add more tools to its list.
Can I add it once for every project?
Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.
What does it cost?
Tool calls are free on every plan, and a Confluence call does not run in a sandbox, so it bills nothing.
Confluence in your other apps
More knowledge toolkits for Claude Code
Try Confluence in Claude Code
Free to start, and tool calls cost nothing on any plan.