Confluence Integration
Codity integrates with Confluence via MCP (Model Context Protocol) to pull relevant documentation into the context of pull request reviews. Codity searches your Confluence space to find requirement pages relevant to the PR and uses that content to provide more accurate, requirement-aware review feedback.
Prerequisites
- A Confluence Cloud or self-hosted Confluence instance
- An Atlassian API token with read access to the relevant Confluence spaces
- A running MCP server configured to connect to your Confluence instance
Setup
Step 1: Create a Confluence API Token
- Go to https://id.atlassian.com/manage-profile/security/api-tokens
- Click Create API token
- Enter a label such as
Codity Integration - Copy the token immediately: it will not be shown again
Step 2: Configure Confluence in Codity Dashboard
- Navigate to Settings in the Codity dashboard
- Find the Confluence section
- Enter the following:
- Confluence URL: Your Confluence base URL (e.g.,
https://yourcompany.atlassian.net) - Email: The Atlassian account email associated with the API token
- API Token: The token created in Step 1
- MCP Server URL: The URL of your Confluence MCP server (e.g.,
http://localhost:3000)
- Confluence URL: Your Confluence base URL (e.g.,
- Click Test Connection to verify the credentials
- Click Save
How It Works
- Codity connects to the MCP server and retrieves the list of available tools
- An orchestration agent is given the PR title and description
- The agent calls MCP tools (such as
confluence_searchandconfluence_read) to find relevant documentation - The agent runs up to 3 rounds of tool calls to retrieve sufficient context
- The retrieved content is formatted and included in the review prompt
The agent extracts requirements verbatim from Confluence pages. The output format is:
CONFLUENCE REQUIREMENTS:
- <exact requirement from page>
- <exact requirement from page>
...
SOURCE: <page title>
URL: <page URL>
Token Storage and Security
- Confluence API tokens are encrypted using Fernet symmetric encryption before being stored in the database
- Tokens are never returned in plain text via the API
- All communication with Confluence uses HTTPS
- Connection tests authenticate using Basic Auth (
email:tokenbase64-encoded)
Next Steps
- Set up Jira integration to link tickets to PRs: JIRA Integration
- Configure review behavior: Auto-Review Configuration