Get the FREE Ultimate OpenClaw Setup Guide →

orionbelt-analytics

Ontology-based MCP server that analyzes database schemas (PostgreSQL, Snowflake, ClickHouse, Dremio) and generates RDF/OWL ontologies with SQL mappings for fan-trap-free Text-to-SQL.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ralfbecher-orionbelt-analytics python -m orionbelt_analytics \
  --env ENV="production" \
  --env DB_HOST="Database host" \
  --env DB_NAME="Target database name" \
  --env DB_PORT="Database port" \
  --env DB_USER="Database user" \
  --env DB_PASSWORD="Database password" \
  --env R2RML_BASE_IRI="Description or placeholder for base IRI"

How to use

OrionBelt Analytics is a Python-based MCP server that analyzes relational database schemas (PostgreSQL, Snowflake, and Dremio) and automatically generates RDF/Turtle ontologies with embedded SQL mappings. It provides a suite of 13 tools for schema analysis, ontology generation, R2RML mapping generation, and safe SQL validation. The server integrates with a FastMCP framework to offer structured, schema-aware responses and can produce both ontologies and the corresponding SQL mappings used for downstream analytics tasks. To run, ensure your environment variables for database connections and R2RML base IRI are set, then start the MCP server which exposes its tools for querying and ontology generation through the MCP protocol.

How to install

Prerequisites:

  • Python 3.13+ installed on your system
  • Git installed to clone the repository
  • Access to a PostgreSQL, Snowflake, or Dremio database (or test DB) for schema analysis

Step-by-step installation:

  1. Clone the repository:
git clone https://github.com/ralfbecher/orionbelt-analytics.git
cd orionbelt-analytics
  1. Create and activate a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate  # on Unix/macOS
# or
venv\Scripts\activate  # on Windows
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure environment variables for your database and base IRI (see additional_notes for details). You can place these in a .env file or export them in your shell.

  2. Run the MCP server:

python -m orionbelt_analytics
  1. Verify the server is up by issuing a simple MCP ping or listing available tools via your MCP client.

Additional notes

Environment variables and configuration:

  • R2RML_BASE_IRI: Base IRI used for generating R2RML mappings. Set to your desired ontology IRI base.
  • DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_NAME: Database connection details for PostgreSQL, Snowflake, or Dremio (via appropriate drivers).
  • The server supports .env loading for optional parameters; if a value is omitted, environment variables or defaults will be used where applicable.

Common issues:

  • Ensure database drivers (psycopg2-binary and related) are installed and system dependencies satisfied.
  • If Snowflake or Dremio connections fail, verify network access and credentials.
  • Validate Python version compatibility (3.13+ as indicated in the README badge).

Tips:

  • Use a dedicated test database for ontology generation to avoid impacting production schemas.
  • Enable production logging for monitoring and debugging through standard FastMCP logging configuration.

Related MCP Servers

Sponsor this space

Reach thousands of developers