← 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.pyRequired:
LLM_TYPE+ 3 optionalEnvironment Variables
Set these before running Vanna AI MCP Server.
VariableDescriptionRequired
LLM_TYPEThe LLM provider to use (ollama, lmstudio, claude, gemini, openai)YesANTHROPIC_API_KEYAPI key for ClaudeNoGEMINI_API_KEYAPI key for GeminiNoOPENAI_API_KEYAPI key for OpenAINoAvailable Tools (5)
Once configured, Vanna AI MCP Server gives your AI agent access to:
ask_databaseConvert a question to SQL and optionally execute it.questiontrain_vannaProvide DDL or example SQL to teach the model your schema.ddlsqlget_tablesList all available tables.get_schemaGet column details for a specific table.table_nameexecute_sqlRun manual SQL for verification.sqlTry 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.