Powerdrill MCP Server for AI Data Analysis
Analyze Powerdrill datasets with an MCP server to unlock AI-driven insights, streamline workflows, and accelerate data-driven decisions.
npx -y @powerdrillai/powerdrill-mcpOverview
Powerdrill MCP Server is a lightweight server that implements the Model Context Protocol (MCP) for Powerdrill datasets. It exposes dataset contents, schema, and semantic retrieval as contextual building blocks that language models and agent frameworks can consume. By translating dataset structures into a standardized MCP format, the server makes it straightforward to feed data-driven context into LLM prompts, retrieval-augmented pipelines, and automated analysis workflows.
This server is useful for teams that maintain analytical datasets in Powerdrill and want to unlock AI-driven insights without duplicating data or building bespoke connectors. It provides a stable API surface for discovery, content retrieval, and simple transformations so developers can integrate dataset context into notebooks, model orchestrators, or conversational assistants.
Features
- Implements the MCP (Model Context Protocol) for Powerdrill datasets
- Dataset discovery and metadata endpoints
- Context slicing and pagination for large tables
- Full-text and vector-backed semantic search (if enabled)
- Schema and column-level metadata exposure for safe prompting
- Authentication and simple project-level access controls
- Docker-ready and configurable via environment variables
- Example clients and integration recipes for Python/Node.js
Installation / Configuration
Prerequisites: Docker (recommended) or a recent Node/Python runtime depending on the distribution.
Clone the repository:
Run with Docker Compose (quick start):
Environment variables (sample .env):
# Server configuration
MCP_PORT=8080
MCP_HOST=0.0.0.0
# Data and auth
POWERDRILL_DATA_DIR=/data/powerdrill
MCP_API_KEY=replace-with-your-key
# Optional features
ENABLE_VECTORS=true
VECTOR_INDEX_PATH=/data/vector_index
Run locally (Node example):
# install dependencies
# start server (reads .env)
Configuration notes:
- POINT the POWERDRILL_DATA_DIR at your dataset export or mount. The server reads metadata and table files from this path.
- If semantic search is required, enable the vector index and provide a path and optional embedding service configuration.
- Use MCP_API_KEY (or other configured auth mechanism) to restrict access; the server rejects unauthenticated requests by default when an API key is set.
Available Resources
The server exposes a RESTful MCP-style API for interacting with datasets. Common endpoints include:
| Endpoint | Method | Purpose |
|---|---|---|
| /health | GET | Health check |
| /datasets | GET | List available Powerdrill datasets and metadata |
| /datasets/{id} | GET | Dataset metadata and schema |
| /datasets/{id}/tables/{table}/rows | GET | Paginated row retrieval (sliceable) |
| /search | POST | Full-text or semantic search across datasets |
| /mcp/context | POST | Produce MCP-formatted context bundles for a given request |
| /upload | POST | Upload additional files or annotations (if enabled) |
Example: fetch dataset list
Python example for requesting MCP context:
=
=
=
=
=
Use Cases
- Exploratory data context for LLMs: provide model prompts with relevant rows, column descriptions, and sample aggregates so a model can answer domain-specific questions without direct database access.
- Retrieval-augmented generation: combine the /search and /mcp/context endpoints to fetch semantically relevant records as grounding for summarization, report generation, or automated analysts.
- Automated report pipelines: schedule the server to produce MCP bundles for dashboards or daily briefs consumed by an LLM-based report generator.
- Data-aware assistants: embed dataset schema and examples into a virtual assistant so it can generate SQL, suggest joins, or validate assumptions using real dataset samples.
- Compliance and safe prompting: expose column-level metadata (types, sensitivities) so downstream prompts can omit or redact sensitive attributes programmatically.
Getting Help and Extensibility
- Source code and issues: https://github.com/powerdrillai/powerdrill-mcp
- Extend adapters to support custom dataset layouts by adding new reader modules (see ./adapters directory in the repo).
- To add or replace an embedding provider for semantic search, implement the provider interface and wire it in via configuration.
If you’re integrating Powerdrill MCP Server into a larger ML/AI stack, start by mapping which datasets should be available to which projects, enable vector search only for datasets that need semantic retrieval, and limit access via API keys or network rules to protect sensitive data.