← All Cookbooks
Claude MCPBeginner2 min

Claude MCP + HatiData: Connect in 60 Seconds

Connect Claude Desktop or Claude Code to HatiData via MCP. Get 24 agent-native SQL tools in under a minute.

What You'll Build

A working MCP connection between Claude and HatiData, giving Claude access to 24 tools including SQL queries, memory storage, branch management, and chain-of-thought logging.

Prerequisites

$hati init

$Claude Desktop or Claude Code installed

Architecture

┌──────────────┐    ┌──────────────┐    ┌──────────────┐
│   Claude     │───▶│  HatiData    │───▶│   Engine     │
│  Desktop     │MCP │  MCP Server  │    │  + Vectors   │
└──────────────┘    │  (24 tools)  │    └──────────────┘
                    └──────────────┘

Key Concepts

  • MCP (Model Context Protocol): an open standard for connecting AI assistants to external tools and data sources — HatiData implements 24 MCP tools
  • Zero-config setup: hati init starts the MCP server automatically alongside the SQL proxy — no separate server to manage
  • 24 agent-native tools: query, store_memory, search_memory, branch_create, branch_merge, log_reasoning_step, register_trigger, and 17 more
  • Works everywhere: the same MCP configuration works with Claude Desktop, Claude Code, Cursor, and any MCP-compatible client

Step-by-Step Implementation

1

Start HatiData

Initialize and start HatiData locally. The MCP server starts automatically on port 5440.

Bash
# Install and initialize HatiData
curl -fsSL https://hatidata.com/install.sh | sh
hati init

# The MCP server is now running on localhost:5440

Note: hati init starts both the SQL proxy (port 5439) and the MCP server (port 5440).

2

Configure Claude Desktop

Add HatiData as an MCP server in Claude Desktop's configuration file.

JSON
{
  "mcpServers": {
    "hatidata": {
      "command": "hati",
      "args": ["mcp-server"],
      "env": {
        "HATIDATA_HOST": "localhost",
        "HATIDATA_PORT": "5440"
      }
    }
  }
}

Note: Save this to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent path on your OS.

3

Use HatiData Tools in Claude

Restart Claude Desktop and start using HatiData's 24 MCP tools. Try querying, storing memories, and creating branches.

text
# Example prompts to try in Claude Desktop:

"Query my sales data: SELECT region, SUM(revenue) FROM sales GROUP BY region"

"Store a memory: I prefer dark mode and concise responses"

"Create a branch called 'experiment-1' and run some test queries"

"Show me the chain-of-thought log for today's session"
Expected Output
Claude now has access to 24 HatiData tools: query, store_memory, search_memory, branch_create, log_reasoning_step, and more.

Ready to build?

Install HatiData locally and start building with Claude MCP in minutes.

Join Waitlist