A command line utility for managing Bkper Apps and running the Model Context Protocol (MCP) server.
The CLI provides atomic operations for app deployment and management, designed to work seamlessly with AI coding agents (Claude Code, OpenCode) that orchestrate the development workflow.
npm i -g bkper
yarn global add bkper
bun add -g bkper
Bkper apps are developed with AI coding agents as the primary interface. The CLI provides atomic, composable operations that agents orchestrate:
- Typical developers: Work with AI agents (Claude Code, OpenCode) that handle build, watch, and deploy decisions
- Advanced developers: Use CLI directly with the same atomic commands
The CLI focuses on platform operations (deploy, sync, secrets) while build and development workflows are handled by standard tools (bun run build, bun run dev) orchestrated by agents or developers directly.
login- Authenticate with Bkper, storing credentials locallylogout- Remove stored credentials
app init <name>- Scaffold a new app from the templateapp list- List all apps you have access toapp sync- Syncbkper.yamlconfiguration (URLs, description) to Bkper APIapp deploy- Deploy built artifacts to Cloudflare Workers for Platforms--dev- Deploy to development environment--web- Deploy web handler only--events- Deploy events handler only
app status- Show deployment statusapp undeploy- Remove app from platform--dev- Remove from development environment--web- Remove web handler only--events- Remove events handler only
Note:
syncanddeployare independent operations. Usesyncto update your app's URLs in Bkper (required for webhooks and menu integration). Usedeployto push code to Cloudflare. For a typical deployment workflow, run both:bkper app sync && bkper app deploy
app secrets put <name>- Store a secretapp secrets list- List all secretsapp secrets delete <name>- Delete a secret
mcp start- Start the Model Context Protocol server
# Authenticate
bkper login
# Create a new app
bkper app init my-app
# Deploy to production (run from app directory)
bkper app deploy
# Deploy to development environment
bkper app deploy --dev
# Deploy only the events handler to dev
bkper app deploy --dev --events
# Check deployment status
bkper app status
# Manage secrets
bkper app secrets put API_KEY
bkper app secrets listBkper includes an MCP server that allows AI assistants and other tools to interact with your Bkper books through the Model Context Protocol.
bkper mcp startThe server runs on stdio and provides the following tools:
- list_books - List all books accessible by the authenticated user
- get_book - Get detailed information about a specific book
- get_balances - Get account balances with query filtering
- list_transactions - List transactions with filtering and pagination
- create_transactions - Create transactions in batch
- merge_transactions - Merge duplicate transactions into one
Before using the MCP server:
- Login using
bkper loginto set up authentication
The MCP server uses the same authentication as the CLI, reading credentials from ~/.config/bkper/.bkper-credentials.json.
Add to your configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"bkper": {
"command": "bkper",
"args": ["mcp", "start"]
}
}
}For other MCP-compatible clients, configure them to run:
bkper mcp startThe server communicates via stdio, so any MCP client that supports stdio transport can connect to it.
Apps are configured via a bkper.yaml file in the project root.
BKPER_API_KEY is optional. If not set, uses the Bkper API proxy with a managed API key.
Set it for direct API access with your own quotas and attribution. Follow these steps.
See the complete reference with all available fields and documentation:
The CLI automatically syncs AI agent skills from the skills repository. Skills provide procedural knowledge to AI coding assistants (Claude Code, OpenCode) when working on Bkper apps.
Skills are synced when running:
bkper app init <name>- when creating a new appbkper mcp start- when starting the MCP server
The getOAuthToken function returns a Promise that resolves to a valid OAuth token, for use with the bkper-js library:
import { Bkper } from "bkper-js";
import { getOAuthToken } from "bkper";
Bkper.setConfig({
oauthTokenProvider: async () => getOAuthToken(),
});