Skip to main content

Using the bowrain plugin with AI assistants

kapi (with the bowrain plugin) exposes project management capabilities as an MCP (Model Context Protocol) server. This lets AI tools like Claude, GitHub Copilot, Cursor, Windsurf, and other MCP-compatible agents check project status, list tracked files, push and pull translations, and manage flows — all through structured tool calls.

Quick Start

Start the MCP server:

kapi mcp

This launches a JSON-RPC server on stdio. You don't run it manually — your AI tool starts it as a subprocess. The server requires a .kapi project (it walks upward looking for a kapi.yaml recipe, like git).

tip

For ad-hoc file processing without a project, use the Kapi MCP server instead.

Setup

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
"mcpServers": {
"bowrain": {
"command": "kapi",
"args": ["mcp"]
}
}
}

Restart Claude Desktop. The bowrain plugin's tools will appear in the tool picker.

Using both servers together: You can register kapi and bowrain side by side. Use kapi for standalone file operations and bowrain for project workflows:

{
"mcpServers": {
"kapi": {
"command": "kapi",
"args": ["mcp"]
},
"bowrain": {
"command": "kapi",
"args": ["mcp"]
}
}
}

Claude Code

Add to your project's .mcp.json file (or create it at the repository root):

{
"mcpServers": {
"bowrain": {
"command": "kapi",
"args": ["mcp"]
}
}
}

Claude Code will automatically discover and connect to the bowrain MCP server.

VS Code (GitHub Copilot / Copilot Chat)

Add to .vscode/mcp.json in your project:

{
"servers": {
"bowrain": {
"command": "kapi",
"args": ["mcp"]
}
}
}

Or add to your VS Code settings (.vscode/settings.json):

{
"mcp": {
"servers": {
"bowrain": {
"command": "kapi",
"args": ["mcp"]
}
}
}
}

Cursor

Add to your Cursor MCP config (~/.cursor/mcp.json):

{
"mcpServers": {
"bowrain": {
"command": "kapi",
"args": ["mcp"]
}
}
}

Windsurf

Add to your Windsurf MCP config (~/.windsurf/mcp.json):

{
"mcpServers": {
"bowrain": {
"command": "kapi",
"args": ["mcp"]
}
}
}
tip

If kapi is not in your $PATH, use the full path to the binary (e.g. /usr/local/bin/kapi or $HOME/go/bin/kapi).

Available Tools

Once connected, your AI assistant can call these tools:

ToolWhat it does
project_configRead project configuration from the kapi.yaml recipe
project_statusShow sync status — pending push/pull counts, server connection
project_lsList tracked files with optional stats (word counts, dirty detection)
project_pushUpload local changes to Bowrain Server
project_pullDownload translations from Bowrain Server
list_flowsList available flows (built-in and project-defined)
concept_searchSearch the workspace brand knowledge graph for governed concepts
concept_storyShow the chronological timeline of a governed concept
experiment_statusReport brand knowledge-graph change-sets, with detail and blast radius for one change-set

The three concept tools read the workspace brand knowledge graph; they require a project connected to a workspace on a Bowrain server.

Example Conversations

"What's the state of my project?"

Ask your AI assistant:

What's the translation status of this project?

The assistant calls project_status and returns a summary: how many files, words, and blocks are tracked, how many changes are pending push or pull, and whether the project is synced with the server.

"Which files have changed?"

Which content files have local changes?

The assistant calls project_ls with dirty: true and returns only files with uncommitted changes, along with block and word counts.

"How big is this project?"

How many words and files are in this translation project?

The assistant calls project_ls with stats: true and returns a breakdown of every tracked file with block counts, word counts, and totals.

"Show me the project config"

What locales are configured for this project?

The assistant calls project_config and returns the project name, source locale, target locales, server URL, and file mapping count.

"Push my changes"

Push the latest translation changes to the server

The assistant calls project_push and returns how many blocks were uploaded, the word count, and how many files were scanned.

"Pull latest translations"

Pull the latest French and German translations from the server

The assistant calls project_pull with locales: ["fr", "de"] and returns how many blocks were downloaded and files were updated.

"Preview before pushing"

What would get pushed if I push now? Don't actually push yet.

The assistant calls project_push with dry_run: true and shows what would be uploaded without making any changes.

Tool Reference

project_status

Show project sync status. Returns local project info when no server is configured.

No parameters.

project_config

Read project configuration from the kapi.yaml recipe at the project root.

No parameters.

project_ls

List files tracked by the project.

ParameterTypeRequiredDescription
pathsstring[]noFilter by path prefixes
statsboolnoInclude block and word counts per file
dirtyboolnoShow only files with local changes

project_push

Upload local changes to Bowrain Server.

ParameterTypeRequiredDescription
pathsstring[]noSpecific file paths to push (default: all)
forceboolnoRe-upload everything even if unchanged
dry_runboolnoShow what would be uploaded without sending

project_pull

Download translations from Bowrain Server.

ParameterTypeRequiredDescription
localesstring[]noLanguages to download (e.g. ["fr", "de"])
forceboolnoRe-download everything even if unchanged
dry_runboolnoShow what would change without writing files

list_flows

List available processing flows. Returns both built-in flows and project-defined flows (inline on the recipe and from .kapi/flows/).

No parameters.

Search the workspace brand knowledge graph for governed concepts (terms, status, domain) matching a query.

ParameterTypeRequiredDescription
querystringnoFree-text query against the term text
statusstringnoFilter by term lifecycle status (preferred, admitted, deprecated, forbidden)
marketstringnoFilter by market validity tag
domainstringnoFilter by subject-field domain
limitintnoMaximum number of concepts to return (default 50)

concept_story

Show the chronological timeline of a governed concept — revisions, observations, comments, and change-sets.

ParameterTypeRequiredDescription
concept_idstringyesThe concept ID whose timeline to fetch

experiment_status

Report brand knowledge-graph change-sets. With a changeset_id, returns that change-set's detail and a blast-radius summary (affected blocks, new violations, resolved violations, words); without one, lists the workspace's change-sets.

ParameterTypeRequiredDescription
changeset_idstringnoA change-set ID to detail; omit to list all change-sets
statusstringnoWhen listing, filter by status (draft, in_review, approved, merged, abandoned)

How It Works

No server process, ports, or additional authentication is needed. Your AI tool starts kapi mcp as a subprocess, communicates over stdin/stdout, and shuts it down when the session ends. It discovers your project the same way the CLI does — by walking up the directory tree to find the nearest kapi.yaml recipe.