home / mcp / confluence mcp server

Confluence MCP Server

Provides programmatic Confluence page management, search, and macro generation via MCP from Cursor Agent mode.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "caijohnny-confluence-node": {
      "command": "node",
      "args": [
        "/absolute/path/to/confluence-node/dist/mcp-server.js"
      ],
      "env": {
        "CONF_SPACE": "DEFAULT_SPACE_KEY",
        "CONF_BASE_URL": "https://your-confluence-instance.atlassian.net",
        "CONF_PASSWORD": "your-api-token",
        "CONF_USERNAME": "[email protected]",
        "Additional MCP env vars if needed": "<Additional MCP env vars if needed>"
      }
    }
  }
}

You can run a Confluence MCP Server that lets you manage Confluence (KMS) pages from natural language through an MCP-enabled agent. It supports creating, updating, deleting, retrieving pages, searching, listing spaces, and generating safe code macros to insert Confluence code blocks.

How to use

Use an MCP client in Cursor with Agent mode to access the Confluence MCP Server. Once the server is running, you can issue natural language requests to perform page operations, search for pages, view history, manage spaces, and generate code macros. Start with simple tasks like listing accessible Spaces or creating a new page, then combine actions to automate complex workflows.

How to install

Prerequisites you need before installation are Node.js and npm. You also need access to a Confluence/KMS instance and appropriate permissions to work with the target Spaces.

# 1) Install dependencies
npm install

# 2) Build the MCP server (produces dist/mcp-server.js)
npm run build

# 3) Prepare environment variables (example shown; replace with real values)
# Copy env-example.txt to .env and fill in the values:
CONF_BASE_URL=https://your-confluence-instance.atlassian.net
[email protected]
CONF_PASSWORD=your-api-token
CONF_SPACE=YOUR_SPACE_KEY

Configure Cursor MCP integration

Create a Cursor MCP entry that points to the local MCP server. Use an absolute path to the compiled server so Cursor can start it directly.

{
  "mcpServers": {
    "confluence": {
      "command": "node",
      "args": ["/absolute/path/to/confluence-node/dist/mcp-server.js"],
      "env": {
        "CONF_BASE_URL": "https://your-confluence-instance.atlassian.net",
        "CONF_USERNAME": "[email protected]",
        "CONF_PASSWORD": "your-api-token",
        "CONF_SPACE": "DEFAULT_SPACE_KEY"
      }
    }
  }
}

Run and use the server

- Fully exit and restart Cursor after configuring the MCP entry. Then switch Cursor to Agent mode and start using the MCP tools.

- Verify access by asking Cursor to list the Spaces you can access, or to list Confluence Spaces directly.

Additional notes

- The MCP server runs in stdio mode, started by the node process that executes dist/mcp-server.js. Ensure the path in the Cursor configuration is absolute.

- Use the provided tools to manage content: list spaces, create/update/delete/get pages, search pages, get child pages, view page history, and build code macros for storage format.

Security and access considerations

- Use a secure Confluence instance URL and an API token or token-based credentials as required by your environment. Ensure the credentials have permissions for the target Space. Regularly rotate credentials and limit access to the MCP server.

Troubleshooting

- If you don’t see confluence_* tools in Cursor, confirm you are in Agent mode and that Cursor was restarted after updating the MCP entry. Verify that the absolute path to dist/mcp-server.js is correct.

- For authentication errors (401/403), double-check CONF_USERNAME and CONF_PASSWORD, and ensure the account has access to the specified Space. For Atlassian Cloud, use an API token.

- If Space keys are unclear, list accessible Spaces to confirm available keys.

Helpful commands you will use often

- List accessible Spaces to confirm connectivity and permissions.

Tools you can invoke

The Confluence MCP Server exposes a set of tools to manage pages and spaces programmatically. See the Tools section for a complete list.

Available tools

confluence_list_spaces

List accessible Spaces for the connected account

confluence_create_page

Create a new Confluence page with given title and content (storage format) in a specified Space

confluence_update_page

Update an existing page by pageId or by space+title, modifying content and/or metadata

confluence_upsert_page

Create a page if it does not exist, otherwise update the existing one

confluence_get_page

Retrieve page details including storage format HTML content

confluence_delete_page

Delete a page by pageId or by space+title

confluence_search_pages

Search for pages by keywords and optional filters

confluence_get_child_pages

Get child pages under a parent page or Space hierarchy

confluence_get_page_history

View the revision history of a page

confluence_build_code_macro

Generate a Confluence Code Macro in storage format for safe code block insertion