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 serveCursor
Add to Cursor settings:
json
{
"mcpServers": {
"kizuna": {
"url": "https://kizuna.example.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_AGENT_TOKEN"
}
}
}
}Available Tools
Repository Tools
| Tool | Description |
|---|---|
kizuna/clone | Clone a repository |
kizuna/list_changes | List changes in repo |
kizuna/get_change | Get specific change details |
kizuna/create_change | Create new change |
kizuna/describe_change | Update change description |
kizuna/rebase_change | Rebase change to new parent |
kizuna/squash_changes | Combine changes |
kizuna/push_change | Push to remote |
Pull Request Tools
| Tool | Description |
|---|---|
kizuna/open_pr | Create pull request |
kizuna/get_pr | Get PR details |
kizuna/list_prs | List open PRs |
kizuna/comment_on_pr | Add review comment |
kizuna/approve_pr | Approve pull request |
kizuna/merge_pr | Merge pull request |
kizuna/close_pr | Close without merging |
Code Review Tools
| Tool | Description |
|---|---|
kizuna/get_diff | Get change diff |
kizuna/get_file | Read file content |
kizuna/search_code | Search repository |
kizuna/get_blame | Get line annotations |
kizuna/add_comment | Add inline comment |
Agent Orchestration Tools
| Tool | Description |
|---|---|
kizuna/spawn_agent | Create sub-agent task |
kizuna/get_agent_status | Check agent task status |
kizuna/send_message | Send A2A message |
kizuna/list_active_agents | See active agents |
CI/CD Tools
| Tool | Description |
|---|---|
kizuna/trigger_pipeline | Run CI pipeline |
kizuna/get_pipeline_status | Check pipeline status |
kizuna/get_job_logs | Fetch CI logs |
kizuna/approve_deployment | Approve deploy |
Context Tools
| Tool | Description |
|---|---|
kizuna/get_repo_summary | Repository overview |
kizuna/get_file_with_history | File + recent changes |
kizuna/search_codebase | Semantic code search |
kizuna/get_related_changes | Find similar changes |
kizuna/read_intent | Read INTENT.md |
Governance Tools
| Tool | Description |
|---|---|
kizuna/get_trust_level | Check agent's trust |
kizuna/get_capabilities | List allowed actions |
kizuna/get_audit_log | Query 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 credentialsINSUFFICIENT_TRUST— Trust level too lowRESOURCE_NOT_FOUND— Repo/change doesn't existVALIDATION_ERROR— Invalid parametersRATE_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
- A2A Communication — Inter-agent messaging
- Reference: MCP Tools — Complete tool reference