VJRA.US / CONFLUENCE

Confluence Knowledge Agent

← Research Library
Retrieval: Claude Code + MCP
01 · Business Problem
The Problem
Organizational/family knowledge — financial tracking, project docs, historical records — lives scattered across 8 Confluence spaces with dozens of pages and nested tables. Finding a specific fact (e.g. “what did we spend on X”, “who is Y”) means manually opening pages and scanning tables — slow and error-prone. On top of that, CORS blocks any browser-based tool from calling the Confluence API directly, so a simple client-side script can't just fetch the data itself.
The Solution
A Claude Code session connects directly to Confluence through the official mcp-confluence MCP server — no browser, no CORS workaround needed at all. Claude searches with real CQL, opens full pages, and answers with citations, working the way a researcher would: search, look, search again if needed, then answer.
02 · What We Tried First, and Why It Changed
V1: Browser + Local Proxy
Built a Flask proxy so this page could call Confluence from the browser (CORS forces a server hop either way)
To keep responses fast, the proxy truncated every page to the first 8,000 characters before handing it to Claude
Real failure found in testing: on a page where the actual answer lived well past that cutoff, Claude had zero real data to work with — and fabricated a complete, plausible-looking answer instead of saying so. Confident-sounding, ungrounded.
V2: Claude Code + Native MCP
Swapped the proxy for the official mcp-confluence MCP server, run directly inside a Claude Code session
No arbitrary truncation — pages are returned in full (large ones get written to a file Claude reads in full, not silently cut)
Re-ran the same question that caused the earlier hallucination — this time it retrieved the real data and answered correctly, catching its own prior mistake
03 · Technical Snapshot
Runtime
Claude Code CLI
local session, not a browser
MCP Server
mcp-confluence
stdio subprocess, 22 tools
Search
search_content
real CQL, no result cap workaround
Retrieval
get_page
full page content, no truncation
Data Source
Confluence Cloud
gutmoss.atlassian.net · 8 spaces
Auth
API token in ~/.claude.json
never touches a browser
Retrieval — Claude Code → MCP → Confluence
MCP (Model Context Protocol) servers run as local subprocesses talking over stdio — that's only possible inside a real client like Claude Code, which can spawn processes and hold a persistent connection. A static browser page cannot do this: JavaScript in a page can make HTTP calls, but it can't launch a subprocess or speak stdio. That's the actual reason the earlier version of this page needed a proxy at all — not a design choice, the only bridge CORS allowed. With MCP, there's no browser in the loop to bridge for.
Claude Code
local CLI session
runs the agentic search → read → answer loop
mcp-confluence
local stdio subprocess
22 tools: search, get/create/update/delete pages, blog posts, labels, attachments
Confluence Cloud REST API
gutmoss.atlassian.net
real CQL search + full page content
Because this only runs inside a local session, the Sample Session tab shows real transcripts from actually using it, rather than a live chat embedded in this page.
Debugging Note — the config was in the wrong file
The MCP server was initially registered in ~/.claude/settings.json, which looked correct and even ran fine when tested standalone — but Claude Code actually reads locally-added MCP servers from a different file, ~/.claude.json, populated via claude mcp add. Two full app restarts changed nothing, because there was nothing to pick up. claude mcp list was the tool that surfaced the real state (“No MCP servers configured”), which is what pointed at the actual root cause instead of continuing to guess at session-lifecycle issues. Re-registering it correctly with claude mcp add -s user fixed it on the first try.
Reliability Note — the truncation hallucination
The proxy version of this page capped every fetched page to 8,000 characters to keep responses fast. On one page, the section containing the actual answer started well past that cutoff — so Claude was working from an excerpt that literally could not contain the answer. Instead of saying so, it produced a complete, confident, well-formatted answer with no real grounding. The system prompt did instruct it to admit when it lacked information, and it still didn't catch it. Switching to get_page via native MCP removes the arbitrary cutoff entirely: large pages are returned in full (written to a file and read completely, not silently sliced), so there's no window in which the model has to guess in the dark and doesn't know it.
Real transcripts, not a live demo
As explained on the Architecture tab, MCP only runs inside a real client (Claude Code), not a static browser page — so there's no live chat to embed here. What follows are two unedited exchanges from an actual session against gutmoss.atlassian.net, including the exact tool calls Claude made along the way.
👤
tell me about Dr Rulin Xiu
📁
search_content("Rulin Xiu")13 results
get_page("Dr Rulin's Corner..")bio
get_page("Papers by Dr Rulin Xiu")publication list

Dr. Rulin Xiu — quantum physicist and string theorist. Doctorate from UC Berkeley; post-doctoral research at Harvard's Lyman Laboratory of Physics and the Houston Advanced Research Center. Her life's work is the pursuit of the Grand Unification Theory — unifying all forces, matter, and space-time — alongside research into the mathematical definition of “positive information” as a new way to study life and medicine.

Published papers (several co-authored with Dr. Zhi Gang Sha):

  • 2022 — Holographic Principle, String Theory, and Grand Unification Theory (Science of Consciousness, Tucson AZ)
  • 2020 — Information Mechanics: The Dynamics of “It from Bit”
  • 2019 — Derivation of the Existence of Two Kinds of Space and Time from the Law of Creation
  • 2018 — String Theory Explanation of Large-Scale Anisotropy and Anomalous Alignment
  • 2017 — Dark Energy and Estimate of Cosmological Constant from String Theory
👤
tell me about the Billionaire and the Mechanic
📁
search_content("Billionaire and the Mechanic")2 results
get_page("The Billionaire and the Mechanic")full page, view format

Julian Guthrie's book tells the story of Larry Ellison (Oracle founder) and Norbert Bajurin (a San Francisco radiator-shop mechanic and yacht builder) winning the 2013 America's Cup with USA-17. Key takeaways: partnership between complementary skill sets, innovation under pressure (a 223-ft wing sail too tall for the Golden Gate Bridge), persistence through repeated setbacks, and an unlikely, enduring friendship across a wealth divide.

Team USA-17 included skipper Russell Coutts (4x America's Cup winner), navigator John Kostecki, and designers Dirk Kramers, Scott Ferguson, and Joseph Ozanne — ranging from ~20–30 people to over 100 during the final race push. Bajurin's parents, Croatian immigrants who ran a SF radiator repair shop, are where he first learned the mechanical skills later applied to the yacht's hydraulics.