fusion
Provides an in-memory analytics engine using DuckDB, enabling fast columnar queries, aggregations, materialized views, and cross-source federation.
Connects to MySQL databases via the Warp REST API to load data and perform analytical queries, aggregations, and cross-source joins.
Exposes 10 analytical tools in OpenAI Function Calling format, allowing LLMs to list sources, query data, create views, and more.
Connects to PostgreSQL databases via the Warp REST API to load data and perform analytical queries, aggregations, and cross-source joins.
Uses Warp as a data source gateway to automatically discover and connect to PostgreSQL and MySQL databases, providing a unified REST API for data access.
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., "@fusionanalyze monthly revenue trends from mydb.orders"
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.
Fusion
DuckDB-powered in-memory analytics engine with LLM tool support.
Fusion connects to PostgreSQL/MySQL databases via Warp REST API, loads data into DuckDB for fast columnar analytics, and exposes 10 tools for LLMs through MCP and OpenAI Function Calling.
Features
10 LLM Tools —
list_sources,describe_table,query_data,search_data,aggregate_data,create_view,list_views,refresh_view,load_table,cache_statsDual Format — Tool definitions in both MCP (Model Context Protocol) and OpenAI Function Calling format
3 Access Layers — MCP Server (stdio), REST API (FastAPI/HTTP), Python SDK
Query Pushdown — Routes queries directly to source databases when possible, avoiding unnecessary data transfer
Lazy Loading — Only fetches table data from sources when actually referenced in queries
SQL Guardrails — Blocks destructive SQL (DROP, DELETE, INSERT) to protect data integrity
LRU Cache — Query result caching with configurable TTL for millisecond response times
Materialized Views — Pre-computed aggregation tables with scheduled auto-refresh
Cross-Source Federation — JOIN across multiple databases (PostgreSQL + MySQL) in a single query
Auto-Discovery — Automatically discovers all databases and tables from Warp
Related MCP server: PostgreSQL MCP Server
Architecture
┌─────────────────────────────────────────────────────────────────────────────┐
│ 1. Data Source Layer │
│ ┌──────────────┐ REST ┌─────────────────┐ │
│ │ PostgreSQL │ ──────────► │ │ │
│ │ MySQL │ │ WarpConnector │ auto-discovery │
│ └──────────────┘ │ (query pushdown) │ pagination, schema │
│ Warp REST API └────────┬────────┘ │
└────────────────────────────────────────┼──────────────────────────────────┘
│
┌─────────────────────────────────────────▼──────────────────────────────────┐
│ 2. DuckDB Core Layer │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ OLAPEngine │ │
│ │ • DuckDB (in-memory, columnar) • QueryCache (LRU + TTL) │ │
│ │ • SchemaCatalog (multi-source) • MaterializedViewManager │ │
│ │ • FetchStrategy (lazy load) • SQLGuardrails (SELECT only) │ │
│ └──────────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────┬──────────────────────────────────┘
│
┌─────────────────────────────────────────▼──────────────────────────────────┐
│ 3. LLM Tool Layer │
│ ┌─────────────┐ ┌──────────────────┐ ┌─────────────────┐ │
│ │ ToolExecutor│ │ 10 tools │ │ MCP / REST / SDK│ │
│ │ (dispatch) │─►│ query_data, etc. │─►│ → LLM → Result │ │
│ └─────────────┘ └──────────────────┘ └─────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────┘Installation
pip install -e .Optional dependencies:
pip install -e ".[mcp]" # MCP Server support
pip install -e ".[rest]" # REST API (FastAPI + uvicorn)
pip install -e ".[dev]" # Development (pytest, ruff, mypy)
pip install -e ".[all]" # EverythingQuick Start
Python SDK
from fusion import OLAPEngine
engine = OLAPEngine(memory_limit="4GB")
engine.connect_source("mydb", {
"type": "warp",
"base_url": "http://localhost:8000",
"database": "mydb",
})
executor = engine.get_tool_executor()
# Discover available data
sources = executor.list_sources()
# Run an analytical query (auto-loads referenced tables)
result = executor.query_data("SELECT * FROM mydb.orders LIMIT 10")
# Aggregate data
agg = executor.aggregate_data(
table="mydb.orders",
group_by="status",
agg_column="amount",
agg_func="SUM",
)
# Create a materialized view
executor.create_view(
name="daily_revenue",
sql="SELECT status, SUM(amount) as total FROM mydb.orders GROUP BY status",
refresh="hourly",
)MCP Server (Claude Desktop / Cursor)
fusion-mcp --warp-url http://localhost:8000 --database mydbConfigure in claude_desktop_config.json:
{
"mcpServers": {
"fusion": {
"command": "fusion-mcp",
"args": ["--warp-url", "http://localhost:8000", "--database", "mydb"]
}
}
}Auto-discover all databases:
fusion-mcp --warp-url http://localhost:8000 --auto-discoverREST API
fusion-rest --warp-url http://localhost:8000 --auto-discover --port 9000Swagger UI at http://localhost:9000/docs. Key endpoints:
Endpoint | Method | Description |
| GET | List connected sources and tables |
| GET | Table schema details |
| POST | Execute analytical SQL query |
| POST | Filter search on a table |
| POST | GROUP BY aggregation |
| GET/POST | List or create materialized views |
| POST | Refresh a materialized view |
| POST | Explicitly load a table |
| GET | Cache statistics |
| POST | Generic tool dispatch |
OpenAI Function Calling
from fusion import get_openai_tools, OLAPEngine
engine = OLAPEngine()
engine.connect_source("mydb", {"type": "warp", "base_url": "http://localhost:8000"})
executor = engine.get_tool_executor()
# Get tool definitions for OpenAI Chat Completions API
tools = get_openai_tools()
# When the LLM makes a tool call:
result = executor.execute("query_data", {"sql": "SELECT ..."})Tools
Tool | Description |
| Connected sources and tables with row counts |
| Table schema (columns, types, row count) |
| Run analytical SQL on DuckDB (SELECT only, max 100 rows) |
| Filter search on a table (exact match or LIKE with %) |
| GROUP BY aggregation (SUM, AVG, COUNT, MIN, MAX) |
| Create a materialized view from a SELECT query |
| List materialized views with refresh schedule |
| Manually refresh a materialized view |
| Explicitly load a table from source into DuckDB |
| Query cache hit rate, entry count, memory usage |
Warp Setup
Fusion uses Warp as its data source gateway:
git clone https://github.com/yasinyaman/warp.git
cd warp
docker compose up -dWarp provides a REST API that federates access to PostgreSQL and MySQL databases.
Project Structure
fusion/
├── __init__.py # Public API exports
├── engine.py # OLAPEngine — main orchestration
├── cache.py # QueryCache (LRU + TTL)
├── catalog.py # SchemaCatalog — multi-source metadata
├── guardrails.py # SQLGuardrails — blocks destructive SQL
├── result.py # QueryResult — format conversions
├── strategy.py # FetchStrategy — smart table loading
├── exceptions.py # Custom exception hierarchy
├── connectors/
│ ├── base.py # BaseConnector (abstract)
│ └── warp.py # WarpConnector (Warp REST API)
├── tools/
│ ├── definitions.py # 10 tool schemas (OpenAI + MCP)
│ ├── executor.py # ToolExecutor — routes tool calls
│ ├── mcp_server.py # MCP Server (stdio transport)
│ └── rest_server.py # REST API Server (FastAPI)
└── views/
└── materialized.py # MaterializedViewManagerDevelopment
pip install -e ".[all]"
pytest tests/ -v # 236 tests
ruff check fusion/ # Lint
python -m demo.demo # Demo with synthetic dataRequirements
Python 3.10+
DuckDB 1.2+
Warp (data source gateway)
License
Apache 2.0 — see LICENSE for details.
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.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants and IDEs to execute SQL queries on local DuckDB databases, in-memory databases, or cloud-stored databases with support for flexible connections and configurable result limits.11MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to interact deeply with PostgreSQL databases—query data, manage schema, analyze performance, and administer the database.2254MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLM agents to load, explore, and analyze CSV and Excel files using DuckDB, with tools for SQL querying, statistical analysis, expense optimization, and anomaly detection.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query a PostgreSQL database through a small set of controlled, read-only tools for schema inspection, row lookup, and aggregate statistics.1MIT
Related MCP Connectors
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
The grounded data layer for any LLM: governed SQL, metrics, lineage and catalog over your data.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/yasinyaman/fusion'
If you have feedback or need assistance with the MCP directory API, please join our Discord server