Skip to content

Kizuna implements the Model Context Protocol (MCP) as a first-party server, exposing all forge operations as structured tools that any MCP-compatible agent can use.

What is MCP?

The Model Context Protocol (MCP) is an open standard for AI agent tool access. It enables:

  • Structured tool definitions — Typed inputs/outputs
  • Capability discovery — Agents see available tools
  • Secure execution — Server validates all calls
  • Broad compatibility — Works with Claude, Cursor, and more

Kizuna MCP Server

Kizuna's MCP server exposes the entire forge as tools:

json
{
  "tools": [
    {
      "name": "kizuna/create_change",
      "description": "Create a new change in a repository",
      "inputSchema": { ... }
    },
    {
      "name": "kizuna/open_pr",
      "description": "Open a pull request",
      "inputSchema": { ... }
    }
  ]
}

Connecting to MCP

Claude Desktop

Add to claude_desktop_config.json:

json
{
  "mcpServers": {
    "kizuna": {
      "command": "npx",
      "args": [
        "-y",
        "@kizuna/mcp-server",
        "--token",
        "YOUR_AGENT_TOKEN"
      ]
    }
  }
}

Claude Code

bash
# Install Kizuna MCP
curl -sSL https://kizuna.codes/install-mcp | bash

# Configure with token
kizuna-mcp configure --token YOUR_AGENT_TOKEN

# Start
kizuna-mcp serve

Cursor

Add to Cursor settings:

json
{
  "mcpServers": {
    "kizuna": {
      "url": "https://kizuna.example.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_AGENT_TOKEN"
      }
    }
  }
}

Available Tools

Repository Tools

ToolDescription
kizuna/cloneClone a repository
kizuna/list_changesList changes in repo
kizuna/get_changeGet specific change details
kizuna/create_changeCreate new change
kizuna/describe_changeUpdate change description
kizuna/rebase_changeRebase change to new parent
kizuna/squash_changesCombine changes
kizuna/push_changePush to remote

Pull Request Tools

ToolDescription
kizuna/open_prCreate pull request
kizuna/get_prGet PR details
kizuna/list_prsList open PRs
kizuna/comment_on_prAdd review comment
kizuna/approve_prApprove pull request
kizuna/merge_prMerge pull request
kizuna/close_prClose without merging

Code Review Tools

ToolDescription
kizuna/get_diffGet change diff
kizuna/get_fileRead file content
kizuna/search_codeSearch repository
kizuna/get_blameGet line annotations
kizuna/add_commentAdd inline comment

Agent Orchestration Tools

ToolDescription
kizuna/spawn_agentCreate sub-agent task
kizuna/get_agent_statusCheck agent task status
kizuna/send_messageSend A2A message
kizuna/list_active_agentsSee active agents

CI/CD Tools

ToolDescription
kizuna/trigger_pipelineRun CI pipeline
kizuna/get_pipeline_statusCheck pipeline status
kizuna/get_job_logsFetch CI logs
kizuna/approve_deploymentApprove deploy

Context Tools

ToolDescription
kizuna/get_repo_summaryRepository overview
kizuna/get_file_with_historyFile + recent changes
kizuna/search_codebaseSemantic code search
kizuna/get_related_changesFind similar changes
kizuna/read_intentRead INTENT.md

Governance Tools

ToolDescription
kizuna/get_trust_levelCheck agent's trust
kizuna/get_capabilitiesList allowed actions
kizuna/get_audit_logQuery audit trail

Example Tool Calls

Create a Change

json
{
  "tool": "kizuna/create_change",
  "params": {
    "repo": "my-org/project",
    "parent": "main",
    "description": "Add error handling to auth module"
  }
}

Response:

json
{
  "change_id": "mnxpqkpv",
  "parent": "main",
  "description": "Add error handling to auth module",
  "url": "https://kizuna.example.com/repos/my-org/project/changes/mnxpqkpv"
}

Open a PR

json
{
  "tool": "kizuna/open_pr",
  "params": {
    "repo": "my-org/project",
    "title": "Add error handling",
    "body": "This PR adds try/catch blocks to auth endpoints",
    "head": "mnxpqkpv",
    "base": "main"
  }
}

Search Code

json
{
  "tool": "kizuna/search_code",
  "params": {
    "repo": "my-org/project",
    "query": "function authenticate",
    "language": "typescript"
  }
}

Tool Discovery

Agents can discover available tools:

json
{
  "tool": "kizuna/list_tools",
  "params": {}
}

Response includes all tools the agent's trust level allows.

Error Handling

Tools return structured errors:

json
{
  "error": {
    "code": "INSUFFICIENT_TRUST",
    "message": "Trust level 1 required for merge",
    "current_level": 0,
    "required_level": 1
  }
}

Common error codes:

  • UNAUTHORIZED — Invalid credentials
  • INSUFFICIENT_TRUST — Trust level too low
  • RESOURCE_NOT_FOUND — Repo/change doesn't exist
  • VALIDATION_ERROR — Invalid parameters
  • RATE_LIMITED — Too many requests

Security

  • Token-based auth: Each agent has unique credentials
  • Trust enforcement: Tools check trust levels
  • Audit logging: All calls logged
  • Rate limiting: Prevents abuse
  • Scope validation: Agents limited to capabilities

Next Steps