Skip to main content

MCP Server

Kai exposes a Model Context Protocol (MCP) server that gives AI assistants and development tools direct access to Kai’s capabilities. Connect your IDE, agent framework, or custom tooling to scan code, manage vulnerabilities, run evolutions, and more — all through a standardized protocol.

Server URL

https://production.kai-backend.dria.co/mcp

Authentication

The MCP server uses OAuth 2.1 with PKCE for secure authentication. When you connect an MCP client, the server handles the authorization flow automatically:
  1. Your MCP client initiates a connection to the server URL
  2. The OAuth flow redirects you to sign in with GitHub
  3. A JWT token is issued and used for subsequent requests
  4. Sessions are managed server-side with automatic cleanup
Most MCP clients (Claude Desktop, VS Code Copilot, Cursor, etc.) handle this flow transparently — you just approve the GitHub authorization when prompted.

Available Tools

The MCP server exposes 29 tools across 8 categories. Each tool maps to a Kai API endpoint and returns structured results.

Workspaces

ToolDescription
workspaces_listList all workspaces you’re a member of
workspaces_viewGet details and integrations for a specific workspace

Repositories

ToolDescription
repos_listList all repositories in a workspace
repos_viewGet details of a specific repository
repos_add_githubAdd a GitHub repository to a workspace
repos_deleteDelete a repository from a workspace
repos_file_treeGet the file tree of a GitHub repository
repos_file_contentsGet the contents of one or more files (comma-separated paths)

Scans

ToolDescription
scans_listList all security scans for a repository
scans_startStart a new security scan (use scans_tiers first to get tier IDs)
scans_viewGet details and status of a specific scan
scans_abortAbort a running scan
scans_status_updatesGet real-time status updates and agent iteration logs
scans_tiersGet available scan tiers and their agent configurations

Exploits

ToolDescription
exploits_listList all vulnerability findings from a scan, with severity and status
exploits_viewGet detailed exploit information including hypothesis, verification, and fixes

Evolutions

ToolDescription
evolutions_listList all evolution tasks for a repository
evolutions_startStart a new evolutionary code optimization task
evolutions_viewGet details, status, and progress of an evolution task
evolutions_abortAbort a running evolution
evolutions_iterationsGet iteration history for an evolution task
evolutions_programsGet the generated programs from an evolution task

Evaluators

ToolDescription
evaluators_listList all evaluators for a repository
evaluators_viewGet details of a specific evaluator
evaluators_generate_startStart LLM-based evaluator generation for specified code scopes

Integrations

ToolDescription
integrations_github_issueCreate a GitHub issue for a specific exploit
integrations_jira_issueCreate a Jira issue for a specific exploit

Billing

ToolDescription
billing_creditsGet the current credit balance for a workspace
billing_transactionsGet transaction history (usage, renewals) for a workspace

Connecting Your MCP Client

Claude Desktop

Add the following to your Claude Desktop MCP configuration:
{
  "mcpServers": {
    "kai": {
      "url": "https://production.kai-backend.dria.co/mcp"
    }
  }
}

Cursor / VS Code

Add the MCP server URL in your editor’s MCP settings. The OAuth flow will prompt you to authorize with GitHub on first connection.

Custom Clients

Any MCP-compatible client can connect using the server URL. The server supports SSE (Server-Sent Events) transport and follows the MCP specification for tool discovery and invocation.

Example Workflows

Run a Security Scan

1. workspaces_list → get your workspace ID
2. repos_list → find the repository
3. scans_tiers → check available scan tiers
4. scans_start → kick off the scan
5. scans_view → monitor progress
6. exploits_list → review findings when complete

Create Issues from Findings

1. exploits_list → get exploits from a completed scan
2. exploits_view → review a specific finding
3. integrations_github_issue → create a GitHub issue

Start an Evolution

1. repos_list → find the target repository
2. evolutions_start → begin the evolution task
3. evolutions_view → monitor progress
4. evolutions_programs → review generated solutions

Next Steps