io.github.ralfbecher/orionbelt-analytics
Allows querying ClickHouse databases via Text-to-SQL with ontology-based validation.
Integrates with CrewAI for multi-agent data analysis orchestration.
Allows querying Databricks SQL databases via Text-to-SQL.
Allows querying DuckDB databases via Text-to-SQL.
Integrates with LangChain for AI-powered data analysis workflows.
Allows querying MySQL databases via Text-to-SQL.
Connects to n8n workflows for automated data pipelines.
Supports OpenAI Agents SDK for AI-driven query generation.
Generates interactive Plotly charts from query results.
Allows querying PostgreSQL databases via Text-to-SQL.
Allows querying Snowflake databases via Text-to-SQL.
Integrates with Vercel AI SDK for deployment and scaling.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@io.github.ralfbecher/orionbelt-analyticsanalyze the sales schema in my PostgreSQL database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OrionBelt Analytics is an MCP server that analyzes relational database schemas and generates RDF/OWL ontologies with embedded SQL mappings. It provides relationship-aware Text-to-SQL with automatic fan-trap prevention, GraphRAG for intelligent schema discovery, and interactive charting -- all accessible through any MCP-compatible AI client.
The OrionBelt Ecosystem
Project | Purpose |
OrionBelt Analytics (this) | Schema analysis, ontology generation, GraphRAG, Text-to-SQL |
Declarative YAML models compiled into dialect-specific, fan-trap-free SQL | |
Visual OWL ontology editor with reasoning and graph visualization (live demo) | |
AI chat UI for Analytics + Semantic Layer (Chainlit, multiple LLM providers) |
Run Analytics and Semantic Layer side-by-side in Claude Desktop for schema-aware ontology generation and guaranteed-correct SQL compilation.
Architecture
8 database connectors -- PostgreSQL, MySQL, Snowflake, ClickHouse, Dremio, BigQuery, DuckDB/MotherDuck, Databricks SQL
RDF/OWL ontology generation with
oba:namespace SQL annotations and W3C R2RML mappingsGraphRAG -- graph traversal (up to 12 hops) + ChromaDB vector embeddings for semantic schema discovery
SPARQL 1.1 query interface via persistent Oxigraph RDF store
OBQC validation -- deterministic SQL checks against the ontology (table/column existence, join validity, type mismatches, fan-traps)
Interactive charting -- Plotly charts with MCP-UI rendering in Claude Desktop
Multi-schema support -- analyze multiple schemas simultaneously; ontology and GraphRAG state are isolated per schema
Workspace persistence -- reconnect to the same database and restore your previous session
MCP sampling -- when the connected client supports sampling (e.g. OrionBelt Chat),
suggest_semantic_namesasks the host LLM to pre-fill rename suggestions for cryptic identifiers viasampling/createMessage, collapsing the previous review-then-apply flow into a single tool call. Clients without sampling support (e.g. Claude Desktop) silently fall back to the manual review path
OBQC -- Ontology-Based Query Check
A key differentiator of OrionBelt is OBQC (Ontology-Based Query Check), a deterministic, rule-based SQL validator that catches errors before queries reach the database. Unlike LLM-only approaches that rely on the model "getting it right," OBQC cross-references every generated SQL statement against the loaded RDF/OWL ontology to enforce structural correctness.
What OBQC validates:
Check | What it catches |
Table existence | References to tables that don't exist in the schema |
Column existence | References to columns not present in their table, ambiguous unqualified columns |
Join validity | Missing join conditions (Cartesian products), join columns that don't match declared foreign keys |
Type compatibility | WHERE/ON comparisons between incompatible types (e.g. string vs. integer) |
Aggregation correctness | SELECT columns missing from GROUP BY when aggregates are used |
Fan-trap detection | Aggregations across multiple one-to-many joins that silently multiply results |
How it works:
generate_ontologyorload_my_ontologycreates/loads an ontology withoba:namespace annotations that map OWL classes and properties to actual database tables, columns, types, and foreign keys.When
execute_sql_queryis called, OBQC parses the SQL with sqlglot and validates every table, column, join, and aggregation against the ontology's schema model.Issues are returned with severity levels (error, warning, info) alongside the query results, so the LLM can self-correct before the user sees wrong data.
OBQC is fully deterministic -- no LLM calls, no probabilistic reasoning. It acts as a safety net that complements the LLM's SQL generation with hard structural guarantees. Errors block query execution; warnings are attached to the response for the LLM to act on. See OBQC documentation for the full rule reference, severity behavior, and annotation requirements.
Quick Start
1. Install
git clone https://github.com/ralfbecher/orionbelt-analytics
cd orionbelt-analytics
uv syncRequires Python 3.13+ and uv.
2. Configure
cp .env.template .envEdit .env with your database credentials. At minimum, set the variables for one database (e.g. POSTGRES_HOST, POSTGRES_PORT, POSTGRES_DATABASE, POSTGRES_USERNAME, POSTGRES_PASSWORD).
See docs/configuration.md for all environment variables, transport options, and troubleshooting.
3. Run
uv run server.pyThe server starts on http://localhost:9000 (HTTP transport, configurable via MCP_SERVER_PORT).
Connect Your AI Client
Claude Desktop
Start the server, then add to your claude_desktop_config.json:
{
"mcpServers": {
"OrionBelt-Analytics": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:9000/mcp",
"--transport",
"http-only"
]
}
}
}Claude Code
claude mcp add orionbelt-analytics http://localhost:9000/mcpLibreChat
Set MCP_TRANSPORT=sse in .env, restart the server, then add to librechat.yaml:
mcpServers:
OrionBelt-Analytics:
url: "http://host.docker.internal:9000/sse"
timeout: 60000
startup: trueOther Frameworks
OrionBelt works with LangChain, OpenAI Agents SDK, CrewAI, Google ADK, Vercel AI SDK, n8n, and ChatGPT Custom GPTs. See docs/integrations.md for setup examples.
Tools
OrionBelt exposes 32 MCP tools. Here is a summary by category:
Connection & Schema
Tool | Description |
| Connect to any supported database using |
| List available schemas in the connected database |
| Clear cached schema and ontology data for the current session |
| Analyze schema structure with automatic GraphRAG + ontology generation |
| Get detailed column, key, and constraint info for a specific table |
| Delete all workspace files for the current connection and start fresh |
Ontology & Semantic
Tool | Description |
| Generate RDF/OWL ontology from schema with SQL mapping annotations |
| Detect abbreviations and cryptic names for business-friendly renaming |
| Apply LLM-suggested semantic names and descriptions to ontology |
| Load a custom |
| Download ontology or R2RML mapping as a Turtle file |
Query & Visualization
Tool | Description |
| Preview table data with row limit and injection protection |
| Execute SQL with OBQC validation, security checks, and fan-trap detection |
| Generate Plotly charts (bar, line, scatter, heatmap) with MCP-UI rendering |
GraphRAG
Tool | Description |
| Semantic search + schema overview (auto-initialized by |
| Get optimized context for SQL generation (85-95% token reduction) |
| Discover join paths between tables via graph traversal |
SPARQL & RDF
Tool | Description |
| Persist ontology in Oxigraph for SPARQL access |
| Execute SPARQL queries (SELECT, ASK, CONSTRUCT — auto-detected) |
| Add custom metadata triples to the RDF store |
Semantic Models
Tool | Description |
| Save a semantic model (e.g., OBML YAML) to the workspace |
| Retrieve a stored semantic model by name |
| List all stored semantic models for the current connection |
System
Tool | Description |
| Server version, features, and configuration |
For full parameter details, return values, and examples, see docs/tools-reference.md.
Typical Workflows
Full analysis session:
connect_database("postgresql") -> discover_schema("public") -> generate_ontology() -> execute_sql_query(...)Quick data exploration:
connect_database("duckdb") -> list_schemas() -> sample_table_data("events")Query with visualization:
validate_sql_syntax(query) -> execute_sql_query(query) -> generate_chart(data, "bar", ...)Resume a previous session (auto-restores workspace):
connect_database("postgresql") -> execute_sql_query(...)Documentation
Document | Contents |
Full parameter docs, return values, and usage examples | |
Environment variables, transport setup, troubleshooting | |
Graph-based schema intelligence and OBML workflow | |
Validation rules, severity levels, blocking behavior, annotation requirements | |
The fan-trap problem, detection, and safe SQL patterns | |
LangChain, OpenAI, CrewAI, Google ADK, Vercel, n8n, ChatGPT | |
Project structure, testing, contributing |
License
Copyright 2025-2026 RALFORION d.o.o.
Licensed under the Business Source License 1.1. See LICENSE for details.
Change Date: 2030-03-16 | Change License: Apache License, Version 2.0
For commercial licensing inquiries, contact: licensing@ralforion.com
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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-analytics'
If you have feedback or need assistance with the MCP directory API, please join our Discord server