orionbelt-semantic-layer-mcp
Enables querying and analyzing data in ClickHouse through the OrionBelt Semantic Layer REST API.
Enables querying and analyzing data in Databricks through the OrionBelt Semantic Layer REST API.
Enables querying and analyzing data in DuckDB through the OrionBelt Semantic Layer REST API.
Enables querying and analyzing data in Google BigQuery through the OrionBelt Semantic Layer REST API.
Generates Mermaid ER diagrams for loaded semantic models, allowing visualization of data object relationships.
Enables querying and analyzing data in MySQL through the OrionBelt Semantic Layer REST API.
Enables querying and analyzing data in PostgreSQL through the OrionBelt Semantic Layer REST API.
Enables querying and analyzing data in Snowflake through 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
The OrionBelt Semantic Layer platform has two deployment modes. This MCP server supports both:
Standalone — Deploy the OrionBelt Semantic Layer API anywhere (Cloud Run, Docker, localhost) and point this MCP server at it via
API_BASE_URL.Hosted — Connect to the public Cloud Run deployment with zero local setup (see Hosted MCP Server below).
┌────────────┐ ┌──────────────────────────────────────────────────────┐
│ LLM Client │ │ OrionBelt Platform │
│ │ │ │
│ Claude, │──MCP──│──> server.py ──HTTP /v1──> Semantic Layer REST API │
│ Cursor, │ │ (FastMCP (FastAPI: parse OBML, │
│ any MCP │ │ + httpx) validate, compile │
│ client │ │ to SQL) │
└────────────┘ └──────────────────────────────────────────────────────┘No business logic — all tool calls delegate to the REST API (v1 endpoints)
Dual-mode — auto-detects single-model or multi-model API mode at startup
Auto-session management — creates an API session on first tool call, caches the ID (multi-model mode)
30–32 tools (single-model mode) or 33–35 tools (multi-model mode) for querying (QueryObject + OBSQL natural SQL), execution, batch, planning, discovery, examples, diagrams, RDF/SPARQL, freshness cache, reference docs, and format conversion (execute tools add +2 when
QUERY_EXECUTE=true)4 prompts + 2 resources for OBML / OBSQL reference and usage guidance
Live Demo
A public demo of the OrionBelt Semantic Layer API is available at:
API endpoint:
https://orionbelt.ralforion.com— Swagger UI | ReDoc | Gradio UI
Set API_BASE_URL=https://orionbelt.ralforion.com in your .env file to use it (see .env.example).
Installation
uv syncFor development (includes pytest, respx, ruff):
uv sync --all-groupsUsage
stdio (default)
uv run server.pyHTTP transport
MCP_TRANSPORT=http uv run python server.pyMCP 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 |
| — (required) | OrionBelt Semantic Layer REST API URL |
|
|
|
|
| Bind host for HTTP/SSE |
|
| Bind port for HTTP/SSE |
|
| Logging level |
|
| HTTP timeout in seconds |
| — | Bearer token forwarded to |
Tools
Model lifecycle
MCP Tool | Description |
| Returns the full OBML format specification |
| Parse, validate, and store a model (returns health + model_load) |
| Inspect data objects, dimensions, measures, metrics |
| Remove a model from the current session |
| List all models loaded in the current session |
Model discovery
MCP Tool | Description |
| Full model structure as JSON (detailed) |
| List all dimensions in a model |
| Get a single dimension by name |
| List all measures in a model |
| Get a single measure by name |
| List all metrics in a model |
| Get a single metric by name |
| Explain lineage of a dimension, measure, or metric |
| Search artefacts (exact / synonym / fuzzy buckets) |
| List authored example queries (filterable by intent tag) |
| Get one example with query + compiled SQL preview |
| Return the join graph as an adjacency list |
Query, execution & diagrams
MCP Tool | Description |
| Compile a semantic query (QueryObject) to SQL |
| Compile and execute a QueryObject, returning SQL + rows |
| Compile an OBSQL (natural SQL) query to SQL |
| Compile and execute an OBSQL query, returning SQL + rows |
| Planner view (no SQL); optional warehouse |
| One-shot: load a model + run N queries in parallel |
| Generate a Mermaid ER diagram for a loaded model |
Semantic graph (RDF / SPARQL)
MCP Tool | Description |
| Return the model as OBSL-Core RDF (Turtle) |
| Run a read-only SPARQL query (SELECT / ASK) |
Freshness cache
MCP Tool | Description |
| Cache backend, entry count, hit rate, sweep time |
| Notify the API a table refreshed (invalidates cache) |
References
MCP Tool | Description |
| OBML (model authoring) grammar reference |
| OBSQL (natural SQL surface) grammar reference |
| Index of all references published by the API |
| JSON Schema for |
Utilities
MCP Tool | Description |
| List available SQL dialects and capabilities |
| Get API config (modes, TTL, oneshot batch limits) |
| Convert OSI YAML to OBML format |
| Convert OBML YAML to OSI format |
Supported SQL Dialects
postgres, snowflake, clickhouse, databricks, dremio, bigquery, duckdb
Workflow
Get reference — call
get_obml_reference()to learn OBML syntaxLoad model — call
load_model(model_yaml)to get amodel_idExplore — call
describe_model(model_id)or use discovery tools (list_dimensions,find_artefacts,explain_artefact, etc.)Query — call
compile_query(model_id, dimensions=[...], measures=[...])to generate SQLExecute — call
execute_query(model_id, dimensions=[...], measures=[...])to run SQL and get results (requiresQUERY_EXECUTE=trueon the API)
Integration Guides
Use the OrionBelt Semantic Layer MCP server with popular AI agent frameworks and automation platforms:
Framework | Transport | Guide |
OpenAI Agents SDK | stdio, HTTP, SSE | |
LangChain | stdio, HTTP | |
Google ADK | stdio, HTTP, SSE | |
n8n | HTTP, SSE | |
CrewAI | stdio, HTTP |
Each guide includes quick-start examples, multi-agent patterns, and connection options for both the hosted demo and self-hosted deployments.
Development
# Run tests
uv run pytest
# Lint
uv run ruff check server.py
uv run ruff format server.py tests/Hosted MCP Server
A public hosted instance of this MCP server runs on Google Cloud Run, connected to the live OrionBelt Semantic Layer demo API. No local install, no API key.
Endpoint
https://orionbelt.ralforion.com/mcpStreamable HTTP (MCP spec 2025-03-26). Stateful — clients should send the
initialize handshake and reuse the returned Mcp-Session-Id header.
Quick start with Claude Desktop
Claude Desktop's config schema accepts only stdio launchers — for a remote
MCP server, use the mcp-remote
stdio↔HTTP bridge (auto-fetched by npx, no manual install).
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
or %APPDATA%\Claude\claude_desktop_config.json (Windows) and add:
{
"mcpServers": {
"orionbelt": {
"command": "npx",
"args": [
"mcp-remote",
"https://orionbelt.ralforion.com/mcp",
"--transport",
"http"
]
}
}
}Fully quit Claude Desktop (⌘Q on macOS — closing the window isn't enough) and reopen. The OrionBelt tools then appear in the tools menu.
Alternatively, in newer Claude Desktop builds: Settings → Connectors → Add
custom connector, paste the URL above. No file editing or npx required.
Why
mcp-remote? Claude Desktop'sclaude_desktop_config.jsonschema currently only validates stdio entries (command+args). A bare{"url": "…"}entry is rejected with "not valid MCP server configurations and were skipped".mcp-remoteruns a local stdio bridge that forwards to the HTTPS endpoint, so Claude Desktop sees a normal stdio server. Claude Code does support{"type": "url", "url": "…"}natively — see below.
Quick start with Claude Code
Add to .mcp.json in any repo (or ~/.config/claude-code/.mcp.json globally):
{
"mcpServers": {
"orionbelt": {
"type": "url",
"url": "https://orionbelt.ralforion.com/mcp"
}
}
}Other MCP clients
Any client that supports Streamable HTTP transport (MCP spec 2025-03-26) can
point at the URL above. The endpoint accepts POST /mcp with
Accept: application/json, text/event-stream. See
tests/cloudrun/test_mcp_cloudrun.sh
for a stdlib-only Python smoke test that walks the full handshake.
Notes
The hosted instance scales to zero when idle, so the first request after a cold period takes ~1–2 seconds longer.
It connects to the public demo API at
https://orionbelt.ralforion.com— same data, same dialects, no authentication. Don't load production data through it.For self-hosting, see the Installation section above and the
Dockerfile.
License
Copyright 2025 RALFORION d.o.o.
Licensed under the Apache License, Version 2.0. See LICENSE for details.
This server cannot be installed
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ralfbecher/orionbelt-semantic-layer-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server