What is VAST DB MCP Server?
An MCP server that provides a secure, structured interface between AI agents/LLMs and a VAST Data database. It exposes database schema, table metadata, sample data, and read-only SQL query execution through MCP resources and tools.
How to use VAST DB MCP Server?
Clone the repository, copy .env.example to .env, fill in your VAST DB endpoint, access key, and secret key, install dependencies, and run the server via uvicorn (using scripts/run_server.py). All resources and tools require HTTP headers X-Vast-Access-Key and X-Vast-Secret-Key for authentication, and requests are rate‑limited by client IP.
Key features of VAST DB MCP Server
- Resources:
vast://schemas, vast://tables, vast://metadata/tables/{table_name}, vast://tables/{table_name}
- Tool:
vast_sql_query for read‑only SQL execution (configurable statement types)
- Header‑based authentication via
X-Vast-Access-Key and X-Vast-Secret-Key
- IP‑based rate limiting configurable via
MCP_DEFAULT_RATE_LIMIT environment variable
- Output formats: JSON or CSV/plain text, selectable per request
- Comprehensive error handling with status codes like 401, 404, 429, 500, 503
- Configurable SQL safety via
MCP_ALLOWED_SQL_TYPES (defaults to SELECT)
Use cases of VAST DB MCP Server
- AI agents exploring database schema and table metadata before generating queries
- Retrieving sample data from specific tables for quick analysis or context building
- Executing safe, read‑only SQL queries against a VAST DB from an LLM‑driven application
- Inspecting table column details (types, nullability, keys, defaults) for data understanding
评论