Vertica MCP Server

Vertica MCP Server

Enables AI assistants to query and explore Vertica databases through natural language with readonly protection by default. Supports SQL execution, schema discovery, large dataset streaming, and Vertica-specific optimizations like projection awareness.

Category
Visit Server

README

Vertica MCP Server

A Model Context Protocol (MCP) server for Vertica databases. Enables AI assistants to query and explore Vertica databases through natural language.

Safety-first design: Readonly mode by default. Write operations require explicit configuration.

Features

  • 6 MCP Tools: Query execution, streaming, schema discovery
  • Readonly Protection: Only SELECT/SHOW/DESCRIBE/EXPLAIN/WITH queries by default
  • Large Dataset Streaming: Efficient batch processing (up to 1M rows)
  • Vertica-Optimized: Projection awareness, columnar query support
  • Production Ready: Connection pooling, SSL support, timeout configuration
  • Parameter Binding: SQL injection protection

Quick Start

Claude Code

claude mcp add vertica --scope user -- npx -y @hechtcarmel/vertica-mcp@latest  --env-file /path/to/your/.env

Create your .env file with connection details:

VERTICA_HOST=your-vertica-host.com
VERTICA_PORT=5433
VERTICA_DATABASE=your_database
VERTICA_USER=your_username
VERTICA_PASSWORD=your_password

Cursor

  1. Create environment file ~/.cursor/vertica.env:
VERTICA_HOST=your-vertica-host.com
VERTICA_PORT=5433
VERTICA_DATABASE=your_database
VERTICA_USER=your_username
VERTICA_PASSWORD=your_password
  1. Configure ~/.cursor/mcp.json:
{
  "mcpServers": {
    "vertica-mcp": {
      "command": "npx",
      "args": [
        "@hechtcarmel/vertica-mcp",
        "--env-file",
        "/Users/yourusername/.cursor/vertica.env"
      ]
    }
  }
}
  1. Restart Cursor

Claude Desktop

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "vertica-mcp": {
      "command": "npx",
      "args": [
        "@hechtcarmel/vertica-mcp",
        "--env-file",
        "/path/to/your/.env"
      ]
    }
  }
}

Configuration

Required Variables

VERTICA_HOST          # Database hostname
VERTICA_DATABASE      # Database name
VERTICA_USER          # Username

Optional Variables

VERTICA_PORT=5433                      # Default: 5433
VERTICA_PASSWORD                       # Password (optional)
VERTICA_READONLY_MODE=true             # Default: true
VERTICA_CONNECTION_LIMIT=10            # Default: 10 (max: 100)
VERTICA_QUERY_TIMEOUT=60000            # Default: 60000ms
VERTICA_SSL=false                      # Default: false
VERTICA_SSL_REJECT_UNAUTHORIZED=true   # Default: true
VERTICA_DEFAULT_SCHEMA=public          # Default: public

Enabling Write Operations

To allow INSERT/UPDATE/DELETE/CREATE/DROP operations:

VERTICA_READONLY_MODE=false

Warning: Only disable readonly mode if you understand the implications.

Available Tools

Query Execution

  • execute_query: Execute SQL with optional parameters
  • stream_query: Handle large datasets with configurable batching

Schema Discovery

  • get_table_structure: Table columns, types, constraints
  • list_tables: All tables in schema with metadata
  • list_views: All views with definitions
  • list_indexes: Vertica projections for optimization

Usage Examples

Query Data

SELECT customer_state, COUNT(*) as count
FROM customer_dimension
GROUP BY customer_state
ORDER BY count DESC
LIMIT 10;

Explore Schema

SHOW TABLES;
DESCRIBE customer_dimension;

Analyze Performance

EXPLAIN SELECT * FROM store_sales_fact
WHERE sale_date_key > '2023-01-01';

Stream Large Results

When querying large datasets, use the stream_query tool:

  • Default batch size: 1000 rows
  • Configurable batch size: 1-10,000 rows
  • Maximum rows: 1,000,000

Troubleshooting

Connection Failed

# Test connectivity directly
vsql -h localhost -p 5433 -d VMart -U dbadmin

Verify:

  • Host and port are reachable
  • Database credentials are correct
  • User has required permissions

Permission Errors

  • User needs SELECT permissions on tables
  • User needs access to system catalogs (v_catalog.*)

Query Timeouts

Increase timeout for complex queries:

VERTICA_QUERY_TIMEOUT=300000  # 5 minutes

Large Result Sets

Use stream_query instead of execute_query for queries returning >10,000 rows.

Requirements

  • Node.js >= 18.0.0
  • Vertica database (any recent version)
  • Network access to Vertica server

Support

License

MIT License - see LICENSE file.

Acknowledgments

This project's architecture and tool design are based on mcp-vertica by @nolleh.


Current Version: 1.3.5

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured