Skip to main content
Glama

Vertica MCP Server

Vertica MCP Server

A Model Context Protocol (MCP) server that provides comprehensive Vertica Database integration capabilities for AI assistants and agents.

Features

  • Query Execution: Execute SQL queries with safety controls (SELECT, DESCRIBE, EXPLAIN only)
  • Schema Inspection: Browse database tables, views, and Vertica-specific projections
  • Database Documentation: Generate comprehensive database documentation
  • Query Analysis: Analyze query performance with execution plans
  • Data Export: Export query results in JSON and CSV formats
  • Vertica-Specific: Support for projections, cluster status, and columnar storage features

Installation

Prerequisites

  • Python 3.11 or higher
  • Access to a Vertica database
  • uv package manager

Install from Source

git clone <repository-url> cd vertica-mcp-server uv sync

Install as Package

uv add vertica-mcp-server

Quick Start

  1. Set up environment variables:
    export DB_CONNECTION_STRING="vertica://username:password@hostname:5433/database"
  2. Start the MCP server:
    vertica-mcp-server
  3. Use with AI assistants that support MCP (like Claude Desktop or VS Code extensions)

Configuration

Connection String Formats

URL Format (recommended):

vertica://username:password@hostname:port/database

Simple Format:

hostname:port/database

When using simple format, set these environment variables:

  • VERTICA_USER: Database username
  • VERTICA_PASSWORD: Database password

Environment Variables

VariableDescriptionDefault
DB_CONNECTION_STRINGDatabase connection stringRequired
VERTICA_USERDatabase username (for simple format)dbadmin
VERTICA_PASSWORDDatabase password (for simple format)Empty
QUERY_LIMIT_SIZEMaximum rows returned per query100
MAX_ROWS_EXPORTMaximum rows for export operations10000
DEBUGEnable debug loggingfalse
TABLE_WHITE_LISTComma-separated list of allowed tablesAll tables
COLUMN_WHITE_LISTComma-separated list of allowed columnsAll columns

Docker Development

A Docker setup is provided for testing with Vertica Community Edition:

cd docker-example docker-compose up -d

See docker-example/README.md for detailed instructions.

Available Tools

The MCP server provides these tools for AI assistants:

  • execute_query: Execute SQL queries (SELECT, DESCRIBE, EXPLAIN only)
  • describe_table: Get detailed table column information
  • list_tables: List all tables with metadata
  • list_views: List all database views
  • list_projections: List Vertica projections (unique to Vertica)
  • explain_query: Get query execution plans
  • generate_sample_queries: Generate example queries for tables
  • export_query_results: Export query results as JSON or CSV

Vertica-Specific Features

This server includes Vertica-specific functionality:

  • Projections: List and inspect Vertica projections
  • Columnar Storage: Handle Vertica's columnar data types
  • Query Optimization: Vertica-specific query execution plans
  • Data Types: Support for Vertica data types (UUID, ARRAY, etc.)

Safety Features

  • Query Restriction: Only SELECT, DESCRIBE, and EXPLAIN statements allowed
  • Row Limiting: Automatic LIMIT clause added to prevent large result sets
  • SQL Injection Protection: Basic protection against malicious queries
  • Whitelisting: Optional table and column whitelisting

Development

Running Tests

# Run all tests uv run pytest # Run unit tests only uv run pytest -m unit # Run integration tests only (requires running Vertica instance) uv run pytest -m integration # Run tests with coverage uv run pytest --cov=src/vertica_mcp_server

Code Quality

# Format code uv run black src/ tests/ # Sort imports uv run isort src/ tests/ # Type checking uv run mypy src/ # Lint code uv run flake8 src/ tests/

Project Structure

vertica-mcp-server/ src/vertica_mcp_server/ __init__.py server.py # Main server implementation py.typed tests/ # Test suite docker-example/ # Docker setup for testing docs/ # Documentation pyproject.toml # Project configuration

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite
  6. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Changelog

0.1.0

  • Initial release
  • Core MCP server functionality
  • Vertica database integration
  • Query execution and schema inspection
  • Docker development environment
  • Comprehensive test suite
-
security - not tested
F
license - not found
-
quality - not tested

A Model Context Protocol server that enables AI assistants to interact with Vertica databases through SQL queries, schema inspection, database documentation, and data export capabilities.

  1. Features
    1. Installation
      1. Prerequisites
      2. Install from Source
      3. Install as Package
    2. Quick Start
      1. Configuration
        1. Connection String Formats
        2. Environment Variables
      2. Docker Development
        1. Available Tools
          1. Vertica-Specific Features
            1. Safety Features
              1. Development
                1. Running Tests
                2. Code Quality
                3. Project Structure
              2. Contributing
                1. License
                  1. Changelog
                    1. 0.1.0

                  Related MCP Servers

                  • A
                    security
                    A
                    license
                    A
                    quality
                    A Model Context Protocol server that enables secure interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.
                    Last updated -
                    1
                    185
                    Python
                    MIT License
                    • Linux
                    • Apple
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server implementation that enables AI assistants to execute SQL queries and interact with SQLite databases through a structured interface.
                    Last updated -
                    7
                    TypeScript
                    MIT License
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.
                    Last updated -
                    16
                    1
                    TypeScript
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model-Context-Protocol server that provides SQL query execution and database management capabilities for Vertica databases, featuring connection pooling, schema management, and security controls.
                    Last updated -
                    Python
                    MIT License
                    • Linux

                  View all related MCP servers

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/smith-nathanh/vertica-mcp-server'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server