← Back to Vanna AI MCP Server

Install Vanna AI MCP Server

Pick your client, copy the command, done.

1

Add it to Claude Code

claude mcp add -e "LLM_TYPE=${LLM_TYPE}" vanna-mcp -- uv run main.py
Required:LLM_TYPE+ 3 optional

Environment Variables

Set these before running Vanna AI MCP Server.

VariableDescriptionRequired
LLM_TYPEThe LLM provider to use (ollama, lmstudio, claude, gemini, openai)Yes
ANTHROPIC_API_KEYAPI key for ClaudeNo
GEMINI_API_KEYAPI key for GeminiNo
OPENAI_API_KEYAPI key for OpenAINo

Available Tools (5)

Once configured, Vanna AI MCP Server gives your AI agent access to:

ask_databaseConvert a question to SQL and optionally execute it.
question
train_vannaProvide DDL or example SQL to teach the model your schema.
ddlsql
get_tablesList all available tables.
get_schemaGet column details for a specific table.
table_name
execute_sqlRun manual SQL for verification.
sql

Try It Out

After setup, try these prompts with your AI agent:

What are the top 5 products by sales volume in the inventory table?
List all tables available in the current database.
Show me the schema for the inventory table.
Train the model with this DDL: CREATE TABLE users (id INT, name TEXT);
Run a query to find all items located in bin B-12.
Prerequisites & system requirements
  • An MCP-compatible client (Claude Code, Cursor, Windsurf, Claude Desktop, or Codex)
  • Python 3.8+ with pip installed
  • LLM_TYPE — The LLM provider to use (ollama, lmstudio, claude, gemini, openai)

Keep this setup from going cold

Save the docs, env vars, and workflow around Vanna AI MCP Server in Conare so Claude Code, Codex, and Cursor remember it next time.

Remember this setup