Home Optibot for IDE Reviewing code with Optibot MCP

Reviewing code with Optibot MCP

Last updated on Mar 17, 2026

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:

  1. started — Review request accepted

  2. analyzing_patch — Parsing and analyzing the diff

  3. tool_call — Running analysis tools (with tool name and query details)

  4. generating_review — Generating the final review

  5. 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

  1. Generate an API key from the Optibot dashboard or using the create_api_key tool.

  2. Store it as a secret in your CI provider (e.g., GitHub Actions secret, GitLab CI variable).

  3. Pass it as OPTIBOT_API_KEY in 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)