Allows AI assistants to interact with MySQL databases by generating SQL from natural language questions, executing queries, and managing training data for improved schema understanding.
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., "@Vanna AI MCP Servershow me the top 5 customers by total sales"
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.
Vanna AI MCP Server
MCP (Model Context Protocol) server that enables AI assistants to query databases using natural language via Vanna AI.
Features
π£οΈ Natural Language SQL: Ask questions in plain English, get SQL queries automatically
π Secure SSH Tunneling: Connects to remote databases via SSH with key or password auth
π€ AI Training: Train Vanna on your database schema and sample queries
π MCP Compatible: Works with Claude Desktop, Gemini CLI, and other MCP clients
π ChromaDB Vector Store: Persistent storage for trained SQL patterns
Quick Start
Using Docker (Recommended)
Server runs on http://localhost:8000
Local Installation
Configuration
Create a .env file with these variables:
Available MCP Tools
generate_sql- Generate SQL from natural language questionrun_sql- Execute SQL query and return resultstrain_question_sql- Train Vanna with example question/SQL pairstrain_ddl- Train Vanna on database schema (DDL statements)get_training_data- View all trained examples
Usage Examples
With Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Example Queries
Project Structure
Tech Stack
Vanna AI: Natural language to SQL conversion
ChromaDB: Vector database for training data storage
MCP: Model Context Protocol for AI tool integration
SSH Tunnel: Secure remote database access
FastAPI/Starlette: HTTP server framework
Security Notes
Never commit
.envfile to version controlUse SSH key authentication when possible
Database credentials are transmitted only through SSH tunnel
ChromaDB data is persisted in
chroma_data/directory
License
Personal use. Database access and credentials remain private.