Skip to main content

Multi-Model MCP SDK — deploy to GPT, Claude, Gemini, Copilot from one codebase.

Project description

Kalibr SDK

Multi-Model AI Integration Framework

Write once. Deploy anywhere. Connect to any AI model.

Kalibr turns Python functions into APIs that work seamlessly with GPT, Claude, Gemini, and Copilot — automatically generating model-specific schemas and endpoints.


🚀 Quick Start (2 minutes)

1. Install

pip install kalibr

2. Get Examples

kalibr-connect examples

This copies example files to ./kalibr_examples/ in your current directory.

3. Run Demo

kalibr-connect serve kalibr_examples/basic_kalibr_example.py

4. See All Schemas

Kalibr now auto-detects your environment and generates the correct base URLs.

Environment Example Base URL
Local Dev http://localhost:8000
Fly.io https://<app-name>.fly.dev
Custom Host Use KALIBR_BASE_URL env var

Then open:

<your-base-url>/gpt-actions.json    # ChatGPT
<your-base-url>/mcp.json            # Claude
<your-base-url>/schemas/gemini      # Gemini
<your-base-url>/schemas/copilot     # Copilot

🧠 What Kalibr Does

Kalibr turns your Python functions into production-ready multi-model APIs.

from kalibr import Kalibr

app = Kalibr(title="Inventory API")

@app.action("get_inventory", "Fetch inventory data")
def get_inventory(product_id: str):
    return {"product_id": product_id, "stock": 42}

Result:
ChatGPT, Claude, Gemini, and Copilot can all call get_inventory() using their native protocols — no schema work required.


💪 Two Modes

Function-Level (Simple)

Ideal for one-off APIs or scripts.

from kalibr import Kalibr

app = Kalibr(title="My API")

@app.action("calculate_price", "Calculate price total")
def calculate_price(product_id: str, quantity: int):
    return {"total": quantity * 19.99}

App-Level (Advanced)

Use KalibrApp for complete control — file uploads, sessions, streaming, and workflows.

from kalibr import KalibrApp
from kalibr.types import FileUpload, Session

app = KalibrApp(title="Advanced API")

@app.file_handler("analyze_doc", [".pdf", ".docx"])
async def analyze_doc(file: FileUpload):
    return {"filename": file.filename, "analysis": "..."}

@app.session_action("save_data", "Save session data")
async def save_data(session: Session, data: dict):
    session.set("my_data", data)
    return {"saved": True}

📚 Examples Included

After running kalibr-connect examples, you’ll get:

  • basic_kalibr_example.py – simple function-level demo
  • enhanced_kalibr_example.py – full app with sessions, uploads, and streaming

🤖 AI Platform Integration

ChatGPT (GPT Actions)

  1. Copy schema URL:
    https://<your-domain>/gpt-actions.json
  2. In GPT Builder → ActionsImport from URL
  3. Done — ChatGPT can call your endpoints.

Claude (MCP)

Add to Claude Desktop config:

{
  "mcp": {
    "servers": {
      "my-api": {
        "url": "https://<your-domain>/mcp.json"
      }
    }
  }
}

Gemini / Copilot

Use:

https://<your-domain>/schemas/gemini
https://<your-domain>/schemas/copilot

🎯 Common Use Cases

  • Customer Service APIs — let AI handle orders or refunds
  • Data Analysis — query your analytics through AI
  • Document Processing — parse or summarize uploaded docs
  • Business Automation — trigger internal workflows
  • Internal Tools — expose secure internal logic to assistants

🔧 CLI Reference

kalibr-connect examples          # Copy examples
kalibr-connect serve my_app.py   # Run locally
kalibr-connect version           # Show version
kalibr-connect --help            # Full CLI

⚡ Key Features

✅ Multi-Model Support — GPT, Claude, Gemini, Copilot
✅ Automatic Schema Generation
✅ Environment-Aware Base URLs (v1.0.21+)
✅ File Uploads
✅ Session Management
✅ Streaming Responses
✅ Workflow Support
✅ Type-Safe API Generation
✅ Async / Await Ready


🔥 Why Kalibr?

Without Kalibr:

  • Learn 4 model specs
  • Maintain 4 codebases
  • Duplicate effort

With Kalibr:

  • One Python function
  • Four schemas generated automatically
  • Deploy anywhere

🆕 Version 1.0.21+

  • Automatic Base-URL Detection
    • Works with KALIBR_BASE_URL or FLY_APP_NAME
    • Fixes all localhost references in deployed schemas
  • Ready for MCP ecosystem production use
  • Drop-in backwards compatibility

🧩 License

MIT License — see LICENSE file for details.


Kalibr SDK — the unified layer between AI models and the real world.
Write once. Deploy anywhere. Integrate everything.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kalibr-1.0.24.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kalibr-1.0.24-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file kalibr-1.0.24.tar.gz.

File metadata

  • Download URL: kalibr-1.0.24.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for kalibr-1.0.24.tar.gz
Algorithm Hash digest
SHA256 5ae4414f3f1337856bb26ccee642827bbb291e4a8a5085d6593b4691f5d6ee15
MD5 de8c343195835e5f097e0ba2d71dd357
BLAKE2b-256 d0cdacbf307c75476308872f72c7f1dfbb9757f4c4bf94fa1c266ea1573fc832

See more details on using hashes here.

File details

Details for the file kalibr-1.0.24-py3-none-any.whl.

File metadata

  • Download URL: kalibr-1.0.24-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for kalibr-1.0.24-py3-none-any.whl
Algorithm Hash digest
SHA256 50f911d3168a38f3e2a8922e2a7e88974e0295deaa2acf722bb51c31d1e64d50
MD5 a463db4e45fa7a9d80ca348a6ade64e9
BLAKE2b-256 81a98466722d4cd4792759ac86424af959b27d30e43a3d9f5d6d39e022d202cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page