# confluence-server-mcp

> MCP server exposing the Confluence Server/Data Center REST API (search, pages, spaces, labels, attachments)

Latest version **1.0.1** (published 2026-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install confluence-server-mcp
pnpm add confluence-server-mcp
yarn add confluence-server-mcp
bun add confluence-server-mcp
```

Provides the command `confluence-server-mcp`.

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2026-09-24 |
| First published | 2026-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 2 |
| Unpacked size | 18.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | systematiccaos |
| Keywords | mcp, confluence, atlassian, model-context-protocol |

## Links

- npm: https://www.npmjs.com/package/confluence-server-mcp
- npm.io page: https://npm.io/package/confluence-server-mcp

## Dependencies (2)

- [zod](https://npm.io/package/zod.md) ^3.25.0
- [@modelcontextprotocol/sdk](https://npm.io/package/@modelcontextprotocol/sdk.md) ^1.30.1

## Recent versions

- 1.0.1 (latest) — 2026-09-24
- 1.0.0 — 2026-09-24

## README

# Confluence MCP Server (`confluence-server-mcp`)

A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that exposes the
Confluence **Server / Data Center** REST API to MCP clients (Claude Desktop, Cursor, etc.).

It authenticates with a **Personal Access Token (PAT)** using the `Authorization: Bearer` header.

## Install

```bash
npm install -g confluence-server-mcp
```

Or run it directly via `npx`:

```bash
npx confluence-server-mcp
```

## Features

Read and write access to Confluence via these tools:

| Tool | Description |
|------|-------------|
| `list_spaces` | List spaces (optionally filter by `global` / `personal`) |
| `get_space` | Get a single space by key |
| `get_page` | Fetch a page by ID (body, version, space, ancestors, labels) |
| `search` | Search content with CQL |
| `create_page` | Create a page in a space (optional parent) |
| `update_page` | Update a page title/body (creates a new version) |
| `add_labels` | Add labels to a page |
| `list_labels` | List labels on a page |
| `list_attachments` | List attachments on a page |

## Requirements

- Node.js >= 18
- A Confluence Server/Data Center instance (version 7.9+ for PAT support)
- A Personal Access Token (create it in your Atlassian profile: **Profile → Personal Access Tokens**)

## Setup (from source)

```bash
npm install
npm run build
```

## Configuration

The server reads configuration from environment variables:

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `CONFLUENCE_URL` | **Yes** | — | Base URL (no trailing slash) |
| `CONFLUENCE_TOKEN` | **Yes** | — | Personal Access Token |
| `CONFLUENCE_PAGE_SIZE` | No | `25` | Page size for list/search tools |

You can create a `.env` file and load it with your MCP client, or export the variables directly.

> **Note:** the SDK does not auto-load `.env`. Pass env vars explicitly (see below), or use a tool
> like `dotenv-cli` / `direnv` / your MCP client's `env` block.

## Running

```bash
npm run start          # from source
confluence-server-mcp  # global install (bin name)
```

## MCP Client Configuration

Add this to your MCP client config. Example for **Claude Desktop** (`claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "confluence": {
      "command": "npx",
      "args": ["-y", "confluence-server-mcp"],
      "env": {
        "CONFLUENCE_URL": "https://confluence.example.com",
        "CONFLUENCE_TOKEN": "your-personal-access-token"
      }
    }
  }
}
```

For **Cursor** (`.cursor/mcp.json`):

```json
{
  "mcpServers": {
    "confluence": {
      "command": "npx",
      "args": ["-y", "confluence-server-mcp"],
      "env": {
        "CONFLUENCE_URL": "https://confluence.example.com",
        "CONFLUENCE_TOKEN": "your-personal-access-token"
      }
    }
  }
}
```

## Example tool calls

Search for pages mentioning "roadmap" in a space:

```
search: { "cql": "space = \"MYSPACE\" AND text ~ \"roadmap\"", "limit": 10 }
```

Get a page body:

```
get_page: { "pageId": "123456789" }
```

Create a page:

```
create_page: { "spaceKey": "MYSPACE", "title": "New page", "body": "<p>Hello <strong>world</strong></p>" }
```

## Development

```bash
npm run dev      # run with tsx (hot reload)
npm run typecheck
npm run build
```

## Security

- Never commit your token. It is provided only via the `CONFLUENCE_TOKEN` environment variable.
- The token is used exclusively in the `Authorization: Bearer` header for REST API calls.

---
_Source: https://npm.io/package/confluence-server-mcp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
