Watch review progress in real time
During reviews, the MCP server connects to the Optibot backend via WebSocket and emits real-time progress notifications using MCP logging messages. Your MCP client will receive updates as the review progresses through these steps:
-
started — Review request accepted
-
analyzing_patch — Parsing and analyzing the diff
-
tool_call — Running analysis tools (with tool name and query details)
-
generating_review — Generating the final review
-
completed — Review finished
CI/CD Integration
The Optibot MCP server can be used in CI/CD pipelines for automated code reviews. Use the OPTIBOT_API_KEY environment variable for headless (non-interactive) authentication — no browser login is needed.
Setting Up
-
Generate an API key from the Optibot dashboard or using the
create_api_keytool. -
Store it as a secret in your CI provider (e.g., GitHub Actions secret, GitLab CI variable).
-
Pass it as
OPTIBOT_API_KEYin your pipeline environment.
GitHub Actions Example
- name: Optibot Review
env:
OPTIBOT_API_KEY: ${{ secrets.OPTIBOT_API_KEY }}
run: npx @optimalai/optibot-mcp
Other CI Providers
Set the OPTIBOT_API_KEY environment variable in your pipeline configuration. The MCP server will automatically use it for authentication without requiring interactive login.
Environment Variables
VariableDescriptionOPTIBOT_API_KEYYour API token (required for automated use)OPTIBOT_API_URLCustom backend URL (defaults to https://agents.getoptimal.ai)