Thin MCP server for OrionBelt Semantic Layer — delegates to REST API
Project description
OrionBelt Semantic Layer MCP
Thin MCP server that delegates to the OrionBelt Semantic Layer REST API
A thin MCP server that delegates all business logic to the OrionBelt Semantic Layer REST API via HTTP. No embedded engine — pure API pass-through.
Architecture
LLM Client ──MCP──> server.py ──HTTP──> OrionBelt Semantic Layer API
(FastMCP + httpx) (Cloud Run / localhost)
- No business logic — all tool calls delegate to the REST API
- Auto-session management — creates an API session on first tool call, caches the ID
- 10 tools for model loading, validation, querying, diagrams, and format conversion
- 3 prompts + 1 resource for OBML reference and usage guidance
Live Demo
A public demo of the OrionBelt Semantic Layer API is available at:
API endpoint:
http://35.187.174.102— Swagger UI | ReDoc | Gradio UI
Set API_BASE_URL=http://35.187.174.102 in your .env file to use it (see .env.example).
Installation
uv sync
For development (includes pytest, respx, ruff):
uv sync --all-groups
Usage
stdio (default)
uv run server.py
HTTP transport
MCP_TRANSPORT=http uv run python server.py
MCP client configuration
Add to your MCP client config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"orionbelt": {
"command": "uv",
"args": ["run", "python", "server.py"],
"cwd": "/path/to/orionbelt-semantic-layer-mcp"
}
}
}
Configuration
Environment variables or .env file (pydantic-settings). See .env.example for defaults.
| Variable | Default | Description |
|---|---|---|
API_BASE_URL |
— (required) | OrionBelt Semantic Layer REST API URL |
MCP_TRANSPORT |
stdio |
stdio, http, or sse |
MCP_SERVER_HOST |
localhost |
Bind host for HTTP/SSE |
MCP_SERVER_PORT |
9000 |
Bind port for HTTP/SSE |
LOG_LEVEL |
INFO |
Logging level |
API_TIMEOUT |
30 |
HTTP timeout in seconds |
Tools
| MCP Tool | Description |
|---|---|
get_obml_reference() |
Returns the full OBML format specification |
load_model(model_yaml) |
Parse, validate, and store a semantic model |
validate_model(model_yaml) |
Validate a model without storing it |
describe_model(model_id) |
Inspect data objects, dimensions, measures, metrics |
compile_query(...) |
Compile a semantic query to SQL (simple + full mode) |
list_models() |
List all models loaded in the current session |
list_dialects() |
List available SQL dialects and capabilities |
get_model_diagram(model_id) |
Generate a Mermaid ER diagram for a loaded model |
convert_osi_to_obml(input_yaml) |
Convert OSI YAML to OBML format |
convert_obml_to_osi(input_yaml) |
Convert OBML YAML to OSI format |
Supported SQL Dialects
postgres, snowflake, clickhouse, databricks, dremio
Workflow
- Get reference — call
get_obml_reference()to learn OBML syntax - Load model — call
load_model(model_yaml)to get amodel_id - Explore — call
describe_model(model_id)to inspect the model - Query — call
compile_query(model_id, dimensions=[...], measures=[...])to generate SQL
Development
# Run tests
uv run pytest
# Lint
uv run ruff check server.py
uv run ruff format server.py tests/
MCP Live Demo Hosting at Prefect Horizon
The OrionBelt Semantic Layer MCP server is available as a hosted live demo on Prefect Horizon, a managed platform for deploying MCP servers.
Quick start with Claude Desktop
- Download the Desktop Extension: orionbelt-semantic-layer.dxt
- Open the
.dxtfile in Claude Desktop (requires Claude Desktop with MCP support)
No local setup or API key needed — the hosted server connects to the live demo API.
License
Copyright 2025 RALFORION d.o.o.
Licensed under the Apache License, Version 2.0. See LICENSE for details.
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 orionbelt_semantic_layer_mcp-0.7.0.tar.gz.
File metadata
- Download URL: orionbelt_semantic_layer_mcp-0.7.0.tar.gz
- Upload date:
- Size: 103.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe769631458e2b8aab2bfc43a4189acd18490ca26867b91f635b3165609537ad
|
|
| MD5 |
3dad93e5d6fcb384724e3583ab04b8e4
|
|
| BLAKE2b-256 |
4b663d74999d89a7b92e9dcdc7400bd5e7ef743b678c0e898cb3ad2c62a00e93
|
File details
Details for the file orionbelt_semantic_layer_mcp-0.7.0-py3-none-any.whl.
File metadata
- Download URL: orionbelt_semantic_layer_mcp-0.7.0-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98ca3e2bd799c7b09e02ac65443174bda1d3aa831738904155810f0dd61c90b3
|
|
| MD5 |
7c80e1ddc6ecf8b7a86d712aa3434ba0
|
|
| BLAKE2b-256 |
d45769dd2a5d1e4f8c75434c9d116119d6cb409eb84e7887c12ba9b695b5da1f
|