Provides a Docker setup for testing with Vertica Community Edition, allowing development and integration testing in a containerized environment.
Includes a comprehensive test suite with pytest for validating server functionality, with separate unit and integration tests.
Built as a Python package that can be installed and configured to connect AI assistants with Vertica database capabilities.
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
Install as Package
Quick Start
- Set up environment variables:
- Start the MCP server:
- Use with AI assistants that support MCP (like Claude Desktop or VS Code extensions)
Configuration
Connection String Formats
URL Format (recommended):
Simple Format:
When using simple format, set these environment variables:
VERTICA_USER
: Database usernameVERTICA_PASSWORD
: Database password
Environment Variables
Variable | Description | Default |
---|---|---|
DB_CONNECTION_STRING | Database connection string | Required |
VERTICA_USER | Database username (for simple format) | dbadmin |
VERTICA_PASSWORD | Database password (for simple format) | Empty |
QUERY_LIMIT_SIZE | Maximum rows returned per query | 100 |
MAX_ROWS_EXPORT | Maximum rows for export operations | 10000 |
DEBUG | Enable debug logging | false |
TABLE_WHITE_LIST | Comma-separated list of allowed tables | All tables |
COLUMN_WHITE_LIST | Comma-separated list of allowed columns | All columns |
Docker Development
A Docker setup is provided for testing with Vertica Community Edition:
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
Code Quality
Project Structure
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- 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
This server cannot be installed
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.
Related MCP Servers
- AsecurityAlicenseAqualityA 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 -1185PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server implementation that enables AI assistants to execute SQL queries and interact with SQLite databases through a structured interface.Last updated -7TypeScriptMIT License
- -securityFlicense-qualityA 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 -161TypeScript
- -securityAlicense-qualityA 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 -PythonMIT License