Teradata MCP Server Data Analytics Tools
Streamline multi-task data analytics on Teradata with MCP server tools and smart prompts to accelerate insights and operational efficiency.
npx -y @Teradata/teradata-mcp-serverOverview
Teradata MCP Server is an implementation of the Model Context Protocol (MCP) that centralizes and exposes a set of data-analysis “tools” for automated or model-driven workflows against Teradata systems. It provides a small HTTP/MCP server that lets language models, agents, and developer scripts orchestrate common analytics tasks—like schema introspection, SQL generation and execution, result retrieval, and simple transformations—without embedding database credentials or business logic inside the model itself.
For developers, the server simplifies multi-step analytics by offering stable tool endpoints and a prompt-friendly interface. That reduces friction when you want to combine LLM-guided SQL generation, validation (EXPLAIN plans), execution and post-processing into repeatable flows for exploration, reporting, or automation.
Features
- Exposes MCP-compatible tool endpoints for analytics workflows
- Connects to Teradata with configurable credentials and secure access patterns
- SQL generation and execution pipeline (generate → explain → run → fetch results)
- Schema and metadata introspection (list databases, tables, columns)
- Prompt/assistant-friendly interfaces for multi-step tasks
- Simple HTTP API and optional Docker deployment for easy integration
- Audit and query logging for reproducibility and governance
Installation / Configuration
Clone the repository and run with Python or Docker. Below are example steps for both methods.
Using Git + Python (development)
# run the server (example)
Using Docker
# build (if you need to build locally)
# run with environment variables
Docker Compose example
version: "3.8"
services:
mcp:
image: teradata/mcp-server:latest
ports:
- "3000:3000"
environment:
TERADATA_HOST: td.example.com
TERADATA_USER: analytics_user
TERADATA_PASSWORD: supersecret
MCP_PORT: "3000"
Example minimal configuration (config.yaml)
teradata:
host: td.example.com
user: analytics_user
password: supersecret
mcp:
port: 3000
enable_ui: true
logging:
level: INFO
Security tips
- Use secrets manager or environment injection for credentials; avoid committing passwords.
- Run the server inside a trusted network or enable TLS/HTTP authentication for public deployments.
- Enable audit logging for query provenance.
Available Tools / Resources
The server exposes a small set of tools (via MCP endpoints). Typical tools and endpoints include:
| Tool name | Purpose | Example endpoint |
|---|---|---|
| sql_executor | Generate and execute SQL, return results | POST /api/v1/run-tool (tool=sql_executor) |
| schema_inspector | List databases, tables, columns | GET /api/v1/tools/schema |
| explain_plan | Return EXPLAIN output for a SQL statement | POST /api/v1/tools/explain |
| prompt_library | Reusable prompts/templates for SQL/tasks | GET /api/v1/tools/prompts |
| audit_log | Fetch recent query/audit events | GET /api/v1/tools/audit |
Sample API call (run SQL via the SQL executor)
Use Cases
- Exploratory analytics (ad-hoc)
- Scenario: A data analyst asks for top regions by recent sales.
- Flow: Call schema_inspector to find table names → Ask LLM to generate SQL using table/column metadata → Call explain_plan to validate performance → Use sql_executor to run and fetch results.
- Benefit: Rapid iteration with safe validation before execution.
- Report automation (reproducible pipelines)
- Scenario: Produce a weekly CSV summarizing key KPIs.
- Flow: Store a prompt template in prompt_library, trigger MCP server via scheduler (cron/airflow), run sql_executor, and output CSV.
- Benefit: Encapsulates query logic and execution in a stable service, simplifying orchestration.
- Query tuning and governance
- Scenario: Improve long-running queries or examine resource usage.
- Flow: Use explain_plan to get EXPLAIN output, then apply a review prompt to have the LLM suggest index/materialized view options. Log decisions via audit_log.
- Benefit: Helps standardize review and capture rationale.
- App/agent integration
- Scenario: Integrate analytics capability into customer-facing chatbot or internal agent.
- Flow: Agent sends user intent to MCP server; server uses internal tools to fetch schema, generate safe SQL, run the query and return