Dat

v1.0.0Data Science & MLstable

Asking yours data in a natural language way through pre-modeling (data models and semantic models).

agent-frameworkagentschatbichatdatacontext-engineering
Share:
251
Stars
0
Downloads
0
Weekly
0/5

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

Query data in natural language using pre-built data models.
Perform semantic analysis on structured datasets.
Chat with your data through AI-powered interfaces.
hexinfo

Maintainer

LicenseApache-2.0
Languagejava
Versionv1.0.0
UpdatedMay 15, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx dat

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 --version
2

Initialize 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 init
3

Configure 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-q
4

Define 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: sum
5

Start 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-project
6

Test 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.

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.

Quick Config Preview

{ "mcpServers": { "dat": { "command": "npx", "args": ["-y", "dat"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides