In-house Confluence MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
python -m pip install -e .
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "CONFLUENCE_BASE_URL=${CONFLUENCE_BASE_URL}" -e "CONFLUENCE_AUTH_MODE=${CONFLUENCE_AUTH_MODE}" inhouse-confluence -- node "<FULL_PATH_TO_INHOUSE_CONFLUENCE_MCP>/dist/index.js"

Replace <FULL_PATH_TO_INHOUSE_CONFLUENCE_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:CONFLUENCE_BASE_URLCONFLUENCE_AUTH_MODE+ 3 optional
README.md

MCP server for self-hosted Confluence Data Center or Server instances.

inhouse_confluence_mcp

In-house Confluence (Data Center/Server) MCP server implementation. Default mode is read-only, and write tools are controlled by policy.

Tools

  • confluence_list_spaces
  • confluence_search_cql
  • confluence_get_content
  • confluence_get_labels
  • confluence_get_children
  • confluence_get_attachments
  • confluence_get_comments
  • confluence_scan_content
  • confluence_get_likes (experimental, off by default)
  • confluence_create_page (write, off by default)
  • confluence_update_page (write, off by default)
  • confluence_add_label (write, off by default)
  • confluence_add_comment (write, off by default)

Quick Start

  1. Copy .env.example to .env
  2. Set required values:
  • CONFLUENCE_BASE_URL
  • CONFLUENCE_AUTH_MODE (pat or basic)
  • CONFLUENCE_PAT or CONFLUENCE_USERNAME/CONFLUENCE_PASSWORD
  1. Install and run:
python -m pip install -e .
confluence-mcp

Or:

python -m confluence_mcp.main

OpenCode Registration

Use OpenCode local MCP config with a command array and environment object.

{
  "mcp": {
    "inhouse-confluence": {
      "type": "local",
      "command": [
        "C:\\Users\\jae_chul.lee\\inhouse_confluence_mcp\\.venv\\Scripts\\python.exe",
        "-m",
        "confluence_mcp.main",
        "--env-file",
        "C:\\Users\\jae_chul.lee\\inhouse_confluence_mcp\\.env"
      ],
      "environment": {
        "PYTHONIOENCODING": "utf-8"
      }
    }
  }
}

Notes:

  • Do not rely on Activate.ps1 in MCP commands.
  • Prefer direct venv python path.
  • --env-file makes startup independent from cwd.
  • Optional override: set CONFLUENCE_MCP_ENV_FILE in environment.

.env Loading Rules

On startup, the server looks for .env in this order:

  1. --env-file path
  2. CONFLUENCE_MCP_ENV_FILE
  3. Current working directory (.env, .env.local)
  4. Python executable neighborhood (useful for .venv layout)
  5. Project/module directory

If no file is found, startup logs searched paths.

Space Auto-Discovery

  • If ALLOWED_SPACES is empty and AUTO_DISCOVER_SPACES=true, the server auto-loads available space keys on startup.
  • DENIED_SPACES is optional. Use it only when you need an explicit sensitive-space blocklist.
  • To generate a ready-to-copy env line manually:
confluence-mcp-sync-spaces
  • Output file: logs/spaces_discovered.json

Recommended Settings

  • Keep WRITE_ENABLED=false initially
  • Configure ALLOWED_SPACES first
  • Add DENIED_SPACES only for sensitive spaces
  • Keep EXPERIMENTAL_LIKES=false unless needed

Logs

  • Audit log path: AUDIT_LOG_PATH (default: logs/audit.jsonl)
  • Fields: timestamp, tool, status, latencyMs, traceId, error

Tests

python -m unittest discover -s tests -v

Tool Probe on Startup

  • By default, the server probes API permissions at startup and exposes only reachable tools.
  • Toggle all probes with TOOL_PROBE_ON_STARTUP=true|false.
  • Disable only space probe with SPACE_PROBE_ON_STARTUP=false.
  • When SPACE_PROBE_ON_STARTUP=false, user-declared ALLOWED_SPACES is trusted for policy checks.
  • If /rest/api/space is blocked, confluence_list_spaces is hidden.
  • If /rest/api/content/search is blocked, read/write content tools are hidden.

Tools (13)

confluence_list_spacesLists available Confluence spaces.
confluence_search_cqlSearches content using Confluence Query Language (CQL).
confluence_get_contentRetrieves content from a specific page or blog post.
confluence_get_labelsGets labels associated with a piece of content.
confluence_get_childrenRetrieves child pages of a specific page.
confluence_get_attachmentsLists attachments for a specific page.
confluence_get_commentsRetrieves comments from a page.
confluence_scan_contentScans content across the instance.
confluence_get_likesRetrieves likes for a piece of content.
confluence_create_pageCreates a new page in Confluence.
confluence_update_pageUpdates an existing Confluence page.
confluence_add_labelAdds a label to a piece of content.
confluence_add_commentAdds a comment to a page.

Environment Variables

CONFLUENCE_BASE_URLrequiredThe base URL of the Confluence instance.
CONFLUENCE_AUTH_MODErequiredAuthentication mode, either 'pat' or 'basic'.
CONFLUENCE_PATPersonal Access Token for authentication.
CONFLUENCE_USERNAMEUsername for basic authentication.
CONFLUENCE_PASSWORDPassword for basic authentication.

Configuration

claude_desktop_config.json
{"mcp":{"inhouse-confluence":{"type":"local","command":["python","-m","confluence_mcp.main"],"environment":{"CONFLUENCE_BASE_URL":"https://your-confluence-url","CONFLUENCE_AUTH_MODE":"pat","CONFLUENCE_PAT":"your-token"}}}}

Try it

Search for all pages related to 'Q4 Project Roadmap' using CQL.
List all spaces available in our Confluence instance.
Get the content of the page with ID 12345 and summarize it.
Add a comment to page 12345 saying 'This looks great, thanks for the update!'
List all attachments for the page titled 'Technical Specifications'.

Frequently Asked Questions

What are the key features of In-house Confluence?

Supports both Confluence Data Center and Server instances. Granular access control with space-level filtering. Audit logging for all operations. Optional write operations including page creation and commenting. Automatic space discovery.

What can I use In-house Confluence for?

Quickly searching internal documentation without leaving the AI chat interface. Summarizing long project pages or technical specifications. Automating the creation of meeting notes or status updates in Confluence. Managing labels and comments on documentation pages programmatically.

How do I install In-house Confluence?

Install In-house Confluence by running: python -m pip install -e .

What MCP clients work with In-house Confluence?

In-house Confluence works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep In-house Confluence docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare