Semantic Layer Engine
TM/QM models abstract database schemas. AI only understands business semantics. Auto-handles JOINs, dialect translation, and permission injection.
Learn More
Enable AI assistants to query business data safely and accurately through MCP protocol — without exposing database schemas
Letting AI write SQL directly against your database is risky and unreliable
order_status=3 mean? AI doesn't know AI Assistant (Claude / Cursor / Trae)
│
MCP Protocol
│
▼
┌─────────────────────────────────────────────┐
│ Foggy MCP Server │
│ ┌───────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Metadata │ │ Query │ │ Chart │ │
│ │ Tool │ │ Tool │ │ Tool │ │
│ └───────────┘ └──────────┘ └──────────┘ │
└─────────────────────┬───────────────────────┘
│
▼
┌─────────────────────────────────────────────┐
│ Semantic Layer Engine │
│ │
│ TM Model ──→ Dims/Measures ──→ QM Model │
│ │
│ ┌──────────┐ ┌──────────┐ ┌─────────────┐ │
│ │DSL Parser │ │ Access │ │ Dialect SQL │ │
│ │ │ │ Control │ │ Generator │ │
│ └──────────┘ └──────────┘ └─────────────┘ │
└─────────────────────┬───────────────────────┘
│
┌────────────┼────────────┐
▼ ▼ ▼
MySQL PostgreSQL SQL Server ...AI sends JSON DSL → Semantic layer translates to safe SQL
{
"model": "FactSalesQueryModel",
"columns": [
"customer$name",
"product$categoryName",
"sum(totalAmount)"
],
"filters": [
{ "field": "orderDate", "op": ">=",
"value": "2024-01-01" },
{ "field": "product$categoryName",
"op": "in",
"value": ["Electronics", "Books"] }
],
"orderBy": [
{ "field": "totalAmount", "dir": "DESC" }
],
"limit": 10
}SELECT
c.name AS `customer$name`,
p.category_name AS `product$categoryName`,
SUM(f.total_amount) AS `totalAmount`
FROM fact_sales f
JOIN dim_customer c
ON f.customer_id = c.id
JOIN dim_product p
ON f.product_id = p.id
WHERE f.order_date >= '2024-01-01'
AND p.category_name IN
('Electronics', 'Books')
GROUP BY c.name, p.category_name
ORDER BY SUM(f.total_amount) DESC
LIMIT 10docker compose up -d
One-click launch with MySQL + Foggy MCP Server + demo data
Add MCP Server URL in Claude Desktop / Cursor:http://localhost:7108/mcp/analyst/rpc
Ask in natural language:
"Show me sales trends by brand for last week"
Java and Python dual engines, same semantic layer standard
Deploy a semantic layer in 5 minutes. Let AI query your business data safely.