The Confluence MCP Server allows AI models to interact with Confluence Data Center through REST API operations like searching, retrieving, creating, updating, and deleting pages. This server bridges the gap between AI capabilities and your Confluence content management system.
To get started with the Confluence MCP Server:
pip install -r requirements.txt
Create a .env
file in the project root directory with your Confluence credentials:
CONFLUENCE_API_BASE=http://localhost:8090/rest/api
CONFLUENCE_USERNAME=your_username
CONFLUENCE_PASSWORD=your_password
Be sure to modify these values to match your specific Confluence instance.
The recommended way to run the MCP server is using the MCP CLI tool in development mode:
mcp dev confluence.py
This launches the MCP Inspector UI at http://127.0.0.1:6274, which provides a convenient environment for testing and debugging.
To make the server available in Claude Desktop:
mcp install confluence.py
Execute CQL (Confluence Query Language) searches to find content:
Parameters:
- cql: CQL query string
- limit: Number of results to return (default: 10)
Get page content by ID:
Parameters:
- pageId: Confluence Page ID
Or retrieve a page with its complete body content:
Parameters:
- pageId: Confluence Page ID
Find pages by space key:
Parameters:
- spaceKey: Confluence Space Key
- limit: Maximum number of results (default: 10)
- expand: Optional comma-separated list of properties to expand
Find a specific page by title and space:
Parameters:
- title: Page title
- spaceKey: Confluence Space Key
Create a new page:
Parameters:
- title: Page title
- spaceKey: Confluence Space Key
- content: Page content in storage format (HTML)
- parentId: Optional parent page ID
Update an existing page:
Parameters:
- pageId: Confluence Page ID
- content: New page content in storage format (HTML)
- title: Optional new title
- spaceKey: Optional space key (only if changing space)
Delete a page:
Parameters:
- pageId: Confluence Page ID
Once connected to an AI model, you can interact with Confluence using natural language commands such as:
Notes from our meeting
'"Updated meeting notes
'"There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.