Dat
Asking yours data in a natural language way through pre-modeling (data models and semantic models).
What is Dat?
Dat is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to asking yours data in a natural language way through pre-modeling (data models and semantic models).
Asking yours data in a natural language way through pre-modeling (data models and semantic models).
This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Asking yours data in a natural language way through pre-mode
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx datConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Dat
DAT (Data Ask Tool) is a natural language data querying platform that lets you ask questions about your databases in plain language and receive accurate, structured answers by converting questions into SQL through pre-built semantic models. It supports MySQL, PostgreSQL, Oracle, and DuckDB and integrates with multiple LLM providers including OpenAI, Anthropic, Ollama, and Gemini for the NL-to-SQL translation layer. Teams use DAT to enable non-technical stakeholders to query business data without writing SQL, and developers use its MCP server mode to expose data query capabilities to AI agents.
Prerequisites
- Java 17 or higher (OpenJDK recommended) installed on the host machine
- A supported database: MySQL, PostgreSQL, Oracle, or DuckDB
- An LLM API key: OPENAI_API_KEY, ANTHROPIC_API_KEY, or a local Ollama instance
- DAT CLI downloaded from the GitHub releases page and added to PATH
- An MCP client such as Claude Desktop or Claude Code to use MCP mode
Download and install the DAT CLI
Download the latest release archive from the DAT GitHub releases page, extract it, and add the bin directory to your system PATH.
# Linux/macOS
wget https://github.com/hexinfo/dat/releases/latest/download/dat-cli-0.7.2-full.tar.gz
tar -xzf dat-cli-0.7.2-full.tar.gz
export PATH=$PATH:$(pwd)/dat-cli/bin
# Verify installation
dat --versionInitialize a DAT project
Run dat init in an empty directory to create a new DAT project. The interactive wizard will prompt for your database type and LLM provider.
mkdir my-dat-project && cd my-dat-project
dat initConfigure your database and LLM in dat_project.yaml
Edit the generated dat_project.yaml to set your real database URL, credentials, and LLM API key. The embedding section controls the vector model used for semantic matching.
db:
provider: postgres
configuration:
url: jdbc:postgresql://localhost:5432/mydb
username: your_username
password: your_password
llm:
provider: openai
configuration:
api-key: your-openai-api-key
model-name: gpt-4o
embedding:
provider: bge-small-zh-v15-qDefine semantic models
Add YAML-based semantic models in your project that define entities, dimensions, and measures. These models tell DAT how to interpret your schema in business terms.
# models/sales.yaml
entity: sales
dimensions:
- name: region
column: region_name
measures:
- name: total_revenue
column: amount
aggregation: sumStart the MCP server
Run dat server mcp to expose the DAT query engine as an MCP server that AI agents and MCP clients can connect to.
dat server mcp -p ./my-dat-projectTest interactive querying
Use dat run for interactive CLI querying to verify models are working before connecting an AI client.
dat run -p ./my-dat-project -a default
# Then type natural language questions at the prompt:
# What was total revenue by region last month?Dat Examples
Client configuration
Claude Desktop configuration to connect to a running DAT MCP server. The server must already be started with dat server mcp.
{
"mcpServers": {
"dat": {
"command": "dat",
"args": ["server", "mcp", "-p", "/path/to/my-dat-project"],
"env": {}
}
}
}Prompts to try
Natural language questions you can ask once connected to the DAT MCP server
- "What was total revenue by region for last quarter?"
- "How many new customers signed up each month this year?"
- "Show me the top 10 products by units sold"
- "What is the average order value segmented by customer tier?"Troubleshooting Dat
dat command not found after extraction
Verify that dat-cli/bin is in your PATH by running echo $PATH. You may need to add the export PATH line to your ~/.bashrc or ~/.zshrc so it persists between sessions.
LLM returns incorrect SQL or errors on complex queries
Improve your semantic models by adding more explicit dimension and measure definitions. Also try switching to a more capable LLM model (e.g. gpt-4o instead of gpt-3.5-turbo) by updating model-name in dat_project.yaml.
Database connection fails with JDBC URL error
Double-check the JDBC URL format for your database provider. For PostgreSQL use jdbc:postgresql://host:port/dbname and for MySQL use jdbc:mysql://host:port/dbname. Ensure the database server is running and the credentials have SELECT permission.
Frequently Asked Questions about Dat
What is Dat?
Dat is a Model Context Protocol (MCP) server that asking yours data in a natural language way through pre-modeling (data models and semantic models). It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Dat?
Follow the installation instructions on the Dat GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Dat?
Dat works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Dat free to use?
Yes, Dat is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
Dat Alternatives — Similar Data Science & ML Servers
Looking for alternatives to Dat? Here are other popular data science & ml servers you can use with Claude, Cursor, and VS Code.
Ultrarag
★ 5.6kA Low-Code MCP Framework for Building Complex and Innovative RAG Pipelines
RocketRide
★ 3.1k📇 🏠 - MCP server that exposes RocketRide AI pipelines as t
Aix Db
★ 2.1kAix-DB 基于 LangChain/LangGraph 框架,结合 MCP Skills 多智能体协作架构,实现自然语言到数据洞察的端到端转换。
NeMo Data Designer
★ 1.9k🎨 NeMo Data Designer: Generate high-quality synthetic data from scratch or from seed data.
PaperBanana
★ 1.7kOpen source implementation and extension of Google Research’s PaperBanana for automated academic figures, diagrams, and research visuals, expanded to new domains like slide generation.
MiniMax
★ 1.5kBridges MiniMax AI capabilities to the Model Context Protocol, enabling AI agents to perform image understanding, text-to-image generation, and speech synthesis. It provides a standardized interface for accessing MiniMax's core tools via JSON-RPC.
Browse More Data Science & ML MCP Servers
Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Dat in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Dat?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.