better-confluence-mcp AGENTS.md

better-confluence-mcp AGENTS.md is an instructions file for Codex, OpenCode from twinity1/better-confluence-mcp. It costs 1,194 tokens per session, scanned A, original, from a forked repository, MIT.

Instructions for a coding agent working with Better Confluence MCP, a tool that copies Confluence spaces into local HTML files and sends edits back to Confluence. Confluence is a platform for team documentation and shared pages.

In plain words
What is it for?
Syncing a Confluence space or page to local files, editing those HTML files, and publishing the changes back to Confluence.
Why use it?
It removes the need to make complicated Confluence API requests during a coding session. The agent can work with ordinary local files instead.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/twinity1/better-confluence-mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/twinity1/better-confluence-mcp

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for better-confluence-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/twinity1/better-confluence-mcp/agents-md.svg)](https://agentmods.dev/instructions/twinity1/better-confluence-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/twinity1/better-confluence-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/twinity1/better-confluence-mcp/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,194 This file is loaded in full into every session.
When invoked 1,194 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin fork From a forked repository.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01194 $0.01194
Opus 5 $0.00597 $0.00597
Sonnet 5 $0.00239 $0.00239
Haiku 4.5 $0.00119 $0.00119

Measured 4d ago against content hash 54fe9f9f58f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

better-confluence-mcp AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 163 lines

How it starts

The opening of the file, as written. The whole thing — 163 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS

Audience: LLM-driven engineering agents

This file provides guidance for autonomous coding agents working inside the Better Confluence MCP repository.


What This MCP Does

This MCP is designed for coding agents. It syncs Confluence spaces to local HTML files, so agents can:

  1. Sync spaces to .better-confluence-mcp/ directory
  2. Edit HTML files using native file tools
  3. Push changes back to Confluence

No complex API calls mid-conversation. Just simple file operations.


Repository map

Path Purpose
src/mcp_atlassian/ Library source code (Python ≥ 3.10)
├─ confluence/ Confluence client, mixins, and operations
├─ models/ Pydantic data models for API responses
├─ servers/ FastMCP server implementations
├─ local_storage.py Local filesystem caching logic
└─ utils/ Shared utilities (auth, logging, SSL)
tests/ Pytest test suite with fixtures

Available MCP Tools

Tool Description
confluence_sync_space Sync a space to local filesystem (incremental by default)
confluence_read_page Fetch a single page and save locally
confluence_push_page_update Push local HTML changes back to Confluence

Mandatory dev workflow

uv sync --frozen --all-extras --dev  # install dependencies
pre-commit install                    # setup hooks
pre-commit run --all-files           # Ruff + Prettier + Pyright
uv run pytest                        # run full test suite

Tests must pass and lint/typing must be clean before committing.


Testing the MCP Server

Using MCP Inspector (Recommended)

npx @modelcontextprotocol/inspector uv --directory . run better-confluence-mcp

Using JSON-RPC from Command Line

MCP servers communicate via JSON-RPC over stdio. Test directly:

# Initialize the server
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | uv run better-confluence-mcp

# Multiple requests with heredoc
uv run better-confluence-mcp << 'EOF'
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
EOF

Read the full file on GitHub · 163 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 163 lines · 1,194 tokens per session scan A 54fe9f9f58f4

Subscribe to this mod's changes

better-confluence-mcp AGENTS.md is an instructions file published in the GitHub repository twinity1/better-confluence-mcp (2 stars, last pushed 8d ago), licensed MIT. It adds 1,194 tokens to every session, about $0.0060 per session on Opus 5. A static security scan graded it A with 0 findings. It comes from a forked repository.

Related

Other instructions, from other repositories