Python client for the clariBI MCP server. Typed tool methods auto-generated from the live tool catalog.
Project description
claribi-mcp
Python client for the clariBI MCP Server.
The clariBI MCP Server lets you sign up users, list dashboards, run
analyses, and generate reports via the Model Context Protocol.
This SDK is a thin synchronous JSON-RPC client built on httpx
with one typed Python method per registered server tool:
from claribi_mcp import Client
with Client(api_key="claribi_mcp_...") as client:
client.initialize()
dashboards = client.list_dashboards()
print(dashboards.structured["items"])
result = client.run_analysis(question="What was revenue last quarter?")
print(result.text)
Install
pip install claribi-mcp
Authentication
Either:
- API key — mint a
claribi_mcp_*key from Developer Portal → MCP Server → Clients & Keys and pass it asapi_key=. - OAuth 2.1 bearer token — pass
auth=BearerTokenAuth(access_token=..., refresh_callable=...).
from claribi_mcp import Client, BearerTokenAuth
def refresh():
new_token, new_expires_at = some_oauth_refresh()
return new_token, new_expires_at
client = Client(
auth=BearerTokenAuth(
access_token=initial_token,
expires_at=initial_expires_at,
refresh_callable=refresh,
),
)
Tool surface
The SDK exposes one typed method per server tool. Methods are
auto-generated from the live /api/mcp-server/tool-catalog/
endpoint so they always match what the server actually supports.
Headline methods (read-only):
client.list_dashboards(limit=20, offset=0, search=None)client.get_dashboard(dashboard_id=...)client.list_reports(...),client.get_report(...)client.list_data_sources(...),client.get_data_source_schema(...)client.get_usage(),client.get_billing_status()client.check_pricing(tier=None)
Write methods (require analysis:run, reports:write, etc. scopes):
client.run_analysis(question=..., wait_seconds=30)client.get_analysis_status(job_id=...)client.generate_report(name=..., template_id=None, output_format='pdf')client.create_checkout_session(tier='professional', billing_period='monthly')
Signup methods (no auth required):
client.register_account(email=..., organization_name=..., accept_terms=True)client.verify_email(pending_id=..., code=..., password=...)
Sign up via SDK
client = Client() # no auth — public tools only
pending = client.register_account(
email="me@example.com",
organization_name="My Team",
accept_terms=True,
)
pending_id = pending.structured["pending_id"]
code = input("Enter the 6-digit code from your email: ")
verified = client.verify_email(
pending_id=pending_id,
code=code,
password="a-strong-password",
)
api_key = verified.structured["mcp_api_key"]
print(f"Save this key: {api_key}")
Codegen
Regenerate the typed tool surface against your server:
python scripts/codegen.py \
--catalog https://claribi.com/api/mcp-server/tool-catalog/ \
--output claribi_mcp/generated
License
MIT.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claribi_mcp-0.1.0.tar.gz.
File metadata
- Download URL: claribi_mcp-0.1.0.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf678514442c76cb264514507c5a056a9bd52b2708c7aa2a5f561e60d1be550d
|
|
| MD5 |
54a312f52a0d7275e5995331cba033cf
|
|
| BLAKE2b-256 |
dbedaaec70301dcc3e1998405bdbfdd49e0f66dea82f29afbbdba57a2137f624
|
Provenance
The following attestation bundles were made for claribi_mcp-0.1.0.tar.gz:
Publisher:
sdk-python.yml on ICS-cz/Claribi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claribi_mcp-0.1.0.tar.gz -
Subject digest:
bf678514442c76cb264514507c5a056a9bd52b2708c7aa2a5f561e60d1be550d - Sigstore transparency entry: 1703999958
- Sigstore integration time:
-
Permalink:
ICS-cz/Claribi@f7e269e1c87014e4e4ead6ae0110f7e3456bbeed -
Branch / Tag:
refs/heads/master - Owner: https://github.com/ICS-cz
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-python.yml@f7e269e1c87014e4e4ead6ae0110f7e3456bbeed -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file claribi_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: claribi_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70fc883b335fa60c099a1ddce4da06e3c292db5e367c06f1e1a83c813f8cf4e4
|
|
| MD5 |
81985966ddbd10c80666df35fd15bb22
|
|
| BLAKE2b-256 |
5eaea7aa5a0e5501e8e9f79d400f000f38696a495d98acc1e6a76eb5fbc4f939
|
Provenance
The following attestation bundles were made for claribi_mcp-0.1.0-py3-none-any.whl:
Publisher:
sdk-python.yml on ICS-cz/Claribi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claribi_mcp-0.1.0-py3-none-any.whl -
Subject digest:
70fc883b335fa60c099a1ddce4da06e3c292db5e367c06f1e1a83c813f8cf4e4 - Sigstore transparency entry: 1703999981
- Sigstore integration time:
-
Permalink:
ICS-cz/Claribi@f7e269e1c87014e4e4ead6ae0110f7e3456bbeed -
Branch / Tag:
refs/heads/master - Owner: https://github.com/ICS-cz
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-python.yml@f7e269e1c87014e4e4ead6ae0110f7e3456bbeed -
Trigger Event:
workflow_dispatch
-
Statement type: