Skip to main content

Bonito MCP Server

A Model Context Protocol (MCP) server that wraps the Bonito AI Platform REST API. Use it from Claude Desktop, Cursor, or any MCP-compatible client to manage your multi-provider AI infrastructure.

Features

  • Provider Management – Connect and verify AWS Bedrock, Azure, Google Vertex, OpenAI, Anthropic, Groq, OpenRouter and DeepInfra
  • Model Management – List (by provider, search, chat-only), sync, and activate models
  • Unified Gateway – Chat completions through Bonito's OpenAI-compatible gateway; gateway keys limited to providers or models (create, update, revoke)
  • Projects – List and create projects (budget, retention)
  • Agents – Create, update, run (with sessions) and disable agents; read a run that was queued at the agent's rate limit
  • Knowledge Bases – Create KBs, upload text documents, list their status, search them, link and unlink them to agents
  • Cost & Observability – Gateway usage, request logs, and cloud billing per provider
  • Data Residency – Keep model calls in one geography (CA, US, EU) and see which providers can serve (get_data_residency, set_data_residency)
  • Stacks (bonito.yaml) – Plan a whole stack (providers, routing, keys, knowledge bases, agents, MCP servers, integrations) and apply it after review (plan_stack, apply_stack)
  • Agents in your clouds – List agents running in your own AWS and Google accounts (AgentCore, Bedrock Agents, Agent Registry, Agent Engine) with findings, let Bonito agents call them, and manage the relay that lets cloud agents call each other (list_cloud_agents, connect_cloud_agent, agent_relay, Pro+)

Total: 38 tools. 1.5.0 adds plan_stack and apply_stack: give a bonito.yaml (as text or a path on your machine) and Claude shows what would be created, changed, refreshed or left alone, then applies exactly that plan once you agree. See Stacks below. 1.4.2 fixes the write tools: create_agent sent fields the API rejects (422), create_knowledge_base left out source_type, upload_to_kb posted JSON to a file-upload endpoint, link_kb_to_agent called a route that does not exist, and several tools sent parameters the API ignores (create_project budget, list_models filters, gateway_usage and get_costs periods). Errors now carry the API's own message, and empty (204) replies no longer crash. New: update_agent, delete_agent, unlink_kb_from_agent, search_knowledge_base, list_kb_documents, revoke_gateway_key. 1.4.1 fixed every tool failing with "ctx: Field required".

Use a bp- personal access token as BONITO_API_KEY: it works on both the management API and the gateway (chat_completion, ask_decision). A sign-in token works for management calls only.

Still missing (next pass): access-token CRUD, image and video generation, and agent-to-agent connections outside a stack.

Quick Start

Install from source

git clone https://github.com/ShabariRepo/bonito.git
cd bonito/mcp-server
pip install -e .

Set your API key

export BONITO_API_KEY="your-bonito-api-key"

Run (stdio – for Claude Desktop)

bonito-mcp

Run (SSE – for network clients)

bonito-mcp --transport sse --port 8080

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "bonito": {
      "command": "bonito-mcp",
      "env": {
        "BONITO_API_KEY": "your-bonito-api-key"
      }
    }
  }
}

Docker

docker build -t bonito-mcp .
docker run -e BONITO_API_KEY="your-key" -p 8080:8080 bonito-mcp

Available Tools

Tool Description
list_providers List connected AI providers
connect_provider Connect a provider (credentials as an object)
verify_provider Verify provider credentials
list_models List models: provider type, search, chat only
sync_models Refresh models from one or all providers
activate_model Enable a model on your cloud account
chat_completion Chat completion through the gateway (needs a bp- token)
ask_decision TypeSafe Jev typed decisions (needs a bp- token)
list_gateway_keys List gateway keys
create_gateway_key Create a gateway key, optionally limited to providers or models
update_gateway_key Change a key's name, rate limit, or limits
revoke_gateway_key Revoke a gateway key
gateway_usage Usage statistics for the last N days
get_gateway_logs Gateway request logs
get_data_residency Residency setting and which providers can serve
set_data_residency Keep model calls in CA, US or EU
list_projects List projects
create_project Create a project (budget, retention)
list_agents List agents in a project
get_agent Agent details, including its knowledge bases
create_agent Create an agent
update_agent Change an agent (only what you pass)
delete_agent Disable an agent
execute_agent Run an agent, optionally continuing a session
get_queue_ticket Read a run queued at the agent's rate limit (position, or the reply)
list_knowledge_bases List knowledge bases
create_knowledge_base Create a knowledge base
upload_to_kb Upload text documents (one file each)
list_kb_documents A knowledge base's documents and their status
search_knowledge_base Search a knowledge base
link_kb_to_agent Let an agent search a knowledge base
unlink_kb_from_agent Stop an agent searching a knowledge base
list_cloud_agents Agents in your AWS and Google accounts, with findings
connect_cloud_agent Let a Bonito agent call a cloud agent
agent_relay Routes, call records and per-agent capacity for cloud agents calling each other
get_costs Cloud billing for a provider over a date range
plan_stack What applying a bonito.yaml would change (changes nothing)
apply_stack Apply a reviewed plan by its plan_hash

Stacks (bonito.yaml)

plan_stack takes a bonito.yaml as yaml_text or as a path on the machine running the MCP server. Prompt files, knowledge base directory sources and service_account_file entries it points at are read there and sent with the file (20 MB in all). Only files inside the yaml's folder are read; absolute, ~ and ../ paths that leave it are reported in not_found_locally and never sent. The reply is the plan: each resource with its action (create, update, refresh, unchanged), the fields that change, and any errors, warnings or unresolved variables, plus a plan_hash.

apply_stack takes that plan_hash with the same file. If anything changed on the platform since the plan, nothing is applied and the reply has code: "plan_changed" and the fresh plan to review. Apply creates and updates; it never deletes. A new gateway key's or agent token's secret appears once, in new_keys (agent tokens carry kind: "project token").

Keep secrets out of the file as ${VARS}. A variable is sent only if the env argument gives it, or if its name is listed in BONITO_STACK_ENV (comma-separated) and its value is set in the MCP server's environment (the env block of your client config). BONITO_* variables are never sent. Names the file uses that were not sent come back in env_not_sent. The file decides nothing about what is read from your machine, so a yaml Claude was shown cannot pull other secrets.

Environment Variables

Variable Required Default Description
BONITO_API_KEY Yes – A Bonito personal access token (bp-)
BONITO_API_URL No https://api.getbonito.com API base URL
BONITO_STACK_ENV No – Names of variables plan_stack/apply_stack may send for ${VARS}, e.g. GROQ_API_KEY,DEEPINFRA_API_KEY

License

MIT

Metadata

Release files for bonito-mcp 1.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bonito-mcp 1.6.0
File Size Uploaded Provenance Actions
bonito_mcp-1.6.0.tar.gz 27.6 kB Without provenance Details for bonito_mcp-1.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bonito-mcp 1.6.0
File Interpreter ABI Platform Actions
bonito_mcp-1.6.0-py3-none-any.whl Python 3 none any Details for bonito_mcp-1.6.0-py3-none-any.whl

Total release size: 50.1 kB

Release files / bonito_mcp-1.6.0.tar.gz

Download URL bonito_mcp-1.6.0.tar.gz
Size 27.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9c78b8eed42ffe4cf63d86d38e8b07db7f8d65d1b75cc8203575ea99affd9af5
BLAKE2b-256 checksum
How to use checksums
90d9e559038b3d122bab78272e0f2d1fbc05464c08851b83297b401d17457322
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / bonito_mcp-1.6.0-py3-none-any.whl

Download URL bonito_mcp-1.6.0-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da6e3dc77d2f3d62eb981b08234860b96f992125f81eabf10acad926bb5c62e6
BLAKE2b-256 checksum
How to use checksums
d3af9e6bc8f7ba14e77211601756199d1b3acddae08ea8b5109328b1268094a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for bonito-mcp 1.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page