CAIAO
Server-as-atomic-unit framework for tool orchestration.
CAIAO turns every solver, tool, or external capability into an independent Server process. The Hub discovers, routes, and manages them. Add a new capability by writing one Server file and registering it — no core code changes.
Two paths, same contract
| MCP SDK Path | Lightweight Path | |
|---|---|---|
| What | pip install caiao |
Copy 3 files into your project |
| Dependencies | mcp>=1.0.0 |
Python stdlib only |
| Async | Full asyncio lifecycle | Synchronous, in-process or subprocess |
| Best for | Production platforms, team projects, AI ecosystem | Embedded Python (Abaqus/Blender), prototypes, CLI tools |
| Upgrade path | — | Replace ~10 lines to switch to MCP SDK |
Quickstart (MCP SDK path)
pip install caiao
from caiao import CAIAOClientHub
from caiao.discovery import discover_server_configs
configs = discover_server_configs(servers_dir="./servers")
hub = CAIAOClientHub(configs)
await hub.start_all()
result = await hub.call_tool("my_tool", {"param": "value"})
Create a new project:
caiao init my-project
cd my-project
caiao new server my-solver
# → servers/my-solver/server.py + caiao.yaml
Quickstart (Lightweight path)
Copy caiao_lightweight/server.py, hub.py, subprocess.py into your project.
from server import CAIAOServer, tool
from hub import Hub
class MyServer(CAIAOServer):
name = "my_server"
@tool
def greet(self, args: dict) -> dict:
return {"hello": args.get("name", "world")}
hub = Hub()
hub.register(MyServer())
result = hub.call_tool("greet", {"name": "CAIAO"})
Project structure (after caiao init)
my-project/
├── servers/ # All CAIAO Servers live here
│ └── my-solver/
│ ├── server.py # MCP Server with list_tools/call_tool
│ └── caiao.yaml # Declarative manifest
├── gateway/ # Application entry point (optional)
│ └── main.py # Hub initialization + API
├── caiao/ # (lightweight only) Framework files
├── caiao.yaml # Project-level config
└── requirements.txt
CLI commands
caiao init <name> Create a new CAIAO project
--lightweight Use zero-dependency lightweight path
caiao new server <name> Scaffold a new Server
--kind atomic-mcp Default: standard Server
--kind composite Pipeline orchestration Server
caiao validate Validate all caiao.yaml manifests
caiao list List all Servers with status
caiao doctor Check environment (Python, MCP SDK, etc.)
How it works
User → Application → Hub.call_tool("analyze", {...})
│
├─→ Local handler? ──→ Execute in-process
├─→ Tool registry? ──→ Route to Server subprocess
├─→ Lazy? ───────────→ Start Server on-demand
└─→ Not found? ──────→ Semantic fuzzy match
Each Server is an independent process communicating via stdio JSON-RPC (MCP protocol). The Hub manages the full lifecycle: start, stop, restart, health check, metrics.
Exit mechanism
CAIAO is designed to be removable. Your Servers are standard MCP servers — they import from mcp.server, not from caiao.
To remove CAIAO:
pip uninstall caiao(or deletecaiao_lightweight/directory)- Replace Hub calls in your application with direct MCP Session connections
- Your Servers continue to work unchanged — each is a standalone MCP server
No server code changes required. The framework is a convenience layer, not a hard dependency.
Documentation
Full documentation at caiao-knowledge-base/ (this repository):
- Core concepts and design principles
- Server patterns and reusable code patterns
- Development guides for both implementation paths
- Protocol specification v1.0
- Operations manuals (merge, test, review, absorb)
Requirements
- Python >= 3.11
- MCP SDK path:
pip install mcp - Lightweight path: Python stdlib only
Metadata
Release files for caiao 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| caiao-1.0.3.tar.gz | 17.4 kB | Without provenance | Details for caiao-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| caiao-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for caiao-1.0.3-py3-none-any.whl |
Total release size: 36.5 kB
Release files / caiao-1.0.3.tar.gz
| Download URL | caiao-1.0.3.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91177c07404922257a0bccd992e6d8779ad0a04d3cd4797096372492ee33e116
|
|
BLAKE2b-256 checksum How to use checksums |
d69a2dcd09d8cf8c4a6de888d9effdb2a26284bb2f2b3915161cc548ca6e8ba6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / caiao-1.0.3-py3-none-any.whl
| Download URL | caiao-1.0.3-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f15cb4262c78de6e3ede894619b6ea08a5986c2180d5f33db56721f8c6521eb
|
|
BLAKE2b-256 checksum How to use checksums |
28bef894e0407e302fcf01fe1da88dc4dffb2895ef74e09e7f4472195ff4f24a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for caiao 1.0.3
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.