KūkiOS MCP Client
Official client library for connecting to KūkiOS IAQ Monitoring Platform via MCP (Model Context Protocol).
Features
- ✅ Auto Authentication - Automatic token management and refresh
- ✅ Python + Node.js - Cross-language support
- ✅ Simple API - Easy-to-use methods for all MCP tools
- ✅ Error Handling - Graceful error handling and retries
- ✅ Type Hints - Full type annotations for Python
- ✅ Promise-based - Modern async/await for Node.js
Installation
Python
pip install kukios-mcp-client
Node.js
npm install kukios-mcp-client
Quick Start
Python
from kukios_mcp_client import KukiOSClient
# Initialize client
client = KukiOSClient(
url="https://dashbeta.what-if.sg",
email="user@email.com",
password="your-password"
)
# List all devices
devices = client.list_devices()
print(f"Found {len(devices)} devices")
# Get IAQ health score
health = client.get_iaq_health_score(device_id="...")
print(f"Health Score: {health['health_score']}/100 (Grade {health['grade']})")
Node.js
const { KukiOSClient } = require('kukios-mcp-client');
// Initialize client
const client = new KukiOSClient({
url: 'https://dashbeta.what-if.sg',
email: 'user@email.com',
password: 'your-password'
});
// List all devices
const devices = await client.listDevices();
console.log(`Found ${devices.length} devices`);
// Get IAQ health score
const health = await client.getIAQHealthScore(deviceId);
console.log(`Health Score: ${health.health_score}/100 (Grade ${health.grade})`);
API Reference
Authentication
auth_login(email, password)- Login and store credentialsauth_refresh(refresh_token)- Refresh JWT tokenget_current_user()- Get current user infoget_token_status()- Check token expiry and status
Buildings
list_buildings(page, page_size)- List all buildingsget_building(building_id)- Get building details
Devices
list_devices()- List all devicesget_device(device_id)- Get device detailscreate_device(name, building_id, ...)- Create new deviceupdate_device_position(device_id, x, y)- Update floorplan positiondelete_device(device_id)- Delete devicebatch_get_devices(device_ids)- Get multiple devices
Readings
get_latest_readings(device_id)- Get latest sensor dataget_historical_readings(device_id, start, end)- Get historical databatch_get_latest_readings(device_ids)- Get readings for multiple devices
IAQ Analysis
analyze_iaq_quality(device_id)- Analyze with recommendationsget_iaq_recommendations(device_id)- Get prioritized actionsget_iaq_health_score(device_id)- Get health score (0-100)compare_to_standards(device_id, standard)- Compare against standards
Compliance
list_standards()- List compliance standardscalculate_compliance(device_id, standard)- Calculate compliance grade
Reports
list_reports()- List reportsgenerate_report_pdf(building_id)- Generate PDF report
Alerts
list_alerts(status, severity, device_id)- List IAQ alertsacknowledge_alert(alert_id)- Acknowledge alertresolve_alert(alert_id)- Resolve alert
Auto Re-Authentication
The client automatically handles token expiry and refresh:
- Token Expiry Check - Before each request, checks if token expires within 24 hours
- Auto Refresh - Uses refresh token to get new access token
- Full Re-Auth - If refresh fails, re-authenticates with stored credentials
- Retry - Retries failed requests with new token
All transparent to the user!
Error Handling
Python
try:
devices = client.list_devices()
except KukiOSAuthError as e:
print(f"Authentication failed: {e}")
except KukiOSAPIError as e:
print(f"API error: {e}")
except KukiOSConnectionError as e:
print(f"Connection failed: {e}")
Node.js
try {
const devices = await client.listDevices();
} catch (error) {
if (error instanceof KukiOSAuthError) {
console.error(`Authentication failed: ${error.message}`);
} else if (error instanceof KukiOSAPIError) {
console.error(`API error: ${error.message}`);
} else if (error instanceof KukiOSConnectionError) {
console.error(`Connection failed: ${error.message}`);
}
}
Configuration
Environment Variables
export KUKIOS_URL="https://dashbeta.what-if.sg"
export KUKIOS_EMAIL="user@email.com"
export KUKIOS_PASSWORD="your-password"
Advanced Options
client = KukiOSClient(
url="https://dashbeta.what-if.sg",
email="user@email.com",
password="your-password",
timeout=30, # Request timeout in seconds
max_retries=3, # Maximum retry attempts
retry_delay=1, # Initial retry delay in seconds
cache_ttl=300 # Cache TTL in seconds
)
MCP Integration
Claude Desktop
{
"mcpServers": {
"kukios": {
"url": "https://dashbeta.what-if.sg",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}
mcporter
mcporter config add kukios \
--url https://dashbeta.what-if.sg \
--header "Authorization: Bearer YOUR_TOKEN"
Note: KūkiOS MCP server is cloud-hosted. All connections go to https://dashbeta.what-if.sg. No local MCP server required.
Support
- 📧 Email: hello@what-if.sg
- 🌐 Website: https://what-if.sg
License
MIT © What If Labs
Metadata
Release files for kukios-mcp-client 1.0.1
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 |
|---|---|---|---|---|
| kukios_mcp_client-1.0.1.tar.gz | 9.5 kB | Without provenance | Details for kukios_mcp_client-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kukios_mcp_client-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for kukios_mcp_client-1.0.1-py3-none-any.whl |
Total release size: 18.0 kB
Release files / kukios_mcp_client-1.0.1.tar.gz
| Download URL | kukios_mcp_client-1.0.1.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
875ffc38e406fb506f48b3b21f8270001ed9e10542ed7d811b9dcffa8d95b4cf
|
|
BLAKE2b-256 checksum How to use checksums |
3afa5b4e1f8e6b2c4c91f07d5bdeaff71688b1146dcf4db811b0eb91a6462a4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / kukios_mcp_client-1.0.1-py3-none-any.whl
| Download URL | kukios_mcp_client-1.0.1-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
531bec0eec5af19f0e9d58176a6965d43a6b5af8c3832472ee98035152aaa5c5
|
|
BLAKE2b-256 checksum How to use checksums |
be1f8cd0fcfa497b0ad3ff9a19a97dc5ea8ab3694c82473d752b59736e7b85e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for kukios-mcp-client 1.0.1
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.