Skip to content

ashkarin/confluence-fetch-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

confluence-fetch-mcp

Minimal MCP server focused on reading Confluence documents.

Why this exists

This server is intentionally small so you can pair it with other MCP servers (for example ADO MCP) and fetch Confluence content only when a comment or description contains a Confluence link.

Implemented tools

  • confluence_read_document
    • Input: url or page_id
    • Output: raw markdown string (not JSON) with YAML frontmatter + markdown body
    • Format:
      ---
      title: ...
      version: ...
      space_name: ...
      url: ...
      ---
      
      # markdown content...
  • confluence_search_documents
    • Input: search query, optional limit
    • Output: lightweight page matches
  • confluence_read_documents_from_text
    • Input: free-form text (for example ADO comments/descriptions)
    • Output: JSON object with detected_urls, documents, and errors
    • Note: each document in documents includes markdown under content
  • confluence_get_child_pages
    • Input: url or page_id, optional limit, optional cursor
    • Output: direct children (page/folder/whiteboard/etc) + next_cursor for pagination

Configuration

The server reads settings from a .config file in the project directory. Environment variables still take precedence over .config values.

Start by copying .config.example to .config and filling your credentials.

cp .config.example .config

Supported keys in .config:

Required:

  • CONFLUENCE_URL

Authentication (required):

  • CONFLUENCE_USERNAME and CONFLUENCE_API_TOKEN

Optional:

  • CONFLUENCE_TIMEOUT (default: 30)
  • CONFLUENCE_SSL_VERIFY (default: true)
  • MCP_CONFLUENCE_CONFIG_FILE (optional env var to point to a custom config file path)

Install

cd confluence-fetch-mcp
make install

Run

make run

This uses values from .config by default.

Development

make test        # run tests
make format      # format with black
make typecheck   # type-check with mypy

MCP client config example

{
  "mcpServers": {
    "confluence": {
      "command": "confluence-fetch-mcp",
      "env": {
        "CONFLUENCE_URL": "https://your-domain.atlassian.net/wiki",
        "CONFLUENCE_USERNAME": "you@example.com",
        "CONFLUENCE_API_TOKEN": "..."
      }
    }
  }
}

ADO workflow suggestion

When your ADO MCP returns comments or descriptions, call:

  1. confluence_read_documents_from_text using the raw comment/description text.
  2. If no URLs are found, call confluence_search_documents using extracted title text.

About

Minimalistic MCP server with Basic Auth to fetch Confluence pages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors