Teradata MCP Server
The Teradata MCP Server provides a secure MCP interface for interacting with Teradata databases, combining SQL querying, data visualization, schema exploration, and data analysis with enterprise-grade OAuth 2.1 authentication.
SQL & Data Access
query: Execute SELECT SQL queries against the Teradata databasevisualize_query: Run SQL queries and display results as interactive ECharts (19 chart types: bar, line, pie, scatter, mixed, etc.)
Schema Exploration
list_db: List all available databaseslist_tables: List all tables within a specified databaseshow_tables_details: View column names and data types for tables in a database
Data Quality & Statistics
list_missing_values: Identify top columns with missing valueslist_negative_values: Count columns containing negative valueslist_distinct_values: Find the number of distinct categories per columnstandard_deviation: Calculate mean and standard deviation for a specified column
Security & Deployment
OAuth 2.1 authentication with Keycloak integration, JWT token validation, and scope-based authorization (
teradata:read,teradata:query, etc.)Flexible deployment via CLI, Docker (dev/prod/testing), or Claude Desktop integration
Supports SSE, Streamable HTTP, and Stdio transports
Automatic connection retry, health check endpoints, and RFC 9728-compliant protected resource metadata
Integrates with Keycloak for OAuth 2.1 authentication and authorization, enabling JWT token validation, scope-based access control, and enterprise-grade security for database operations.
Enables secure database interaction with Teradata, providing tools for executing SQL queries, managing schemas (listing databases, tables, and column details), analyzing data (missing values, distinct categories, statistics), and workload management with OAuth 2.1 authentication.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Teradata MCP Servershow me the top 10 customers by sales this month"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Teradata MCP Server
A Model Context Protocol (MCP) server for Teradata database with OAuth 2.1 authentication, multiple authentication mechanisms (TD2, LDAP, Kerberos), and interactive data visualization.
Features
Multiple Auth Mechanisms — TD2 (default), LDAP, Kerberos, JWT via Teradata
LOGMECHOAuth 2.1 with Keycloak integration, JWT validation, scope-based authorization
Protected Resource Metadata (RFC 9728 compliant)
Interactive Visualization — ECharts-based MCP App with 19 chart types
Connection Resilience — automatic retry with exponential backoff
Non-blocking I/O — all DB operations run via
asyncio.to_thread()Per-tool QueryBand — audit trail for Teradata workload management
Tools
Query Tools
query— Execute SQL queries, return plain tabular resultsvisualize_query— Execute SQL and render interactive ECharts charts via MCP App
Schema Tools
list_db— List all databaseslist_tables— List tables/views in a databaseshow_tables_details— Show column names and types for a table
Analysis Tools
list_missing_values— Columns with NULL value countslist_negative_values— Columns with negative value countslist_distinct_values— Distinct category counts per columnstandard_deviation— Mean and standard deviation for a column
MCP App — Interactive Visualization
The visualize_query tool renders results as interactive charts in the MCP client.
Category | Charts |
Bar | Basic, Grouped, Stacked, Horizontal, Sorted, Waterfall, Rounded, Polar |
Line | Basic, Smooth, Area, Stacked Area, Step |
Pie | Pie, Doughnut, Rose / Nightingale |
Scatter | Scatter, Bubble |
Mixed | Bar + Line |
Quick Start
Installation
git clone https://github.com/arturborycki/mcp-teradata.git
cd mcp-teradata
uv syncRun with TD2 (Standard Authentication)
uv run teradata-mcp "teradatasql://user:password@host/database"Or via environment variable:
export DATABASE_URI="teradatasql://user:password@host/database"
uv run teradata-mcpConfiguration
Claude Desktop
Add to your claude_desktop_config.json:
TD2 (Username/Password)
{
"mcpServers": {
"teradata": {
"command": "uv",
"args": [
"--directory", "/path/to/mcp-teradata",
"run", "teradata-mcp"
],
"env": {
"DATABASE_URI": "teradatasql://user:password@host/database"
}
}
}
}LDAP Authentication
{
"mcpServers": {
"teradata": {
"command": "uv",
"args": [
"--directory", "/path/to/mcp-teradata",
"run", "teradata-mcp"
],
"env": {
"DATABASE_URI": "teradatasql://@host/database",
"DB_LOGMECH": "LDAP",
"DB_LOGDATA": "authcid=ldap_user password=ldap_password"
}
}
}
}The authcid format depends on the LDAP directory:
Directory | Format |
Active Directory (Simple Bind) |
|
Active Directory (DIGEST-MD5) |
|
OpenLDAP / Sun DS |
|
Kerberos Authentication
{
"mcpServers": {
"teradata": {
"command": "uv",
"args": [
"--directory", "/path/to/mcp-teradata",
"run", "teradata-mcp"
],
"env": {
"DATABASE_URI": "teradatasql://@host/database",
"DB_LOGMECH": "KRB5"
}
}
}
}OAuth-Enabled Configuration
{
"mcpServers": {
"teradata": {
"command": "uv",
"args": [
"--directory", "/path/to/mcp-teradata",
"run", "teradata-mcp"
],
"env": {
"DATABASE_URI": "teradatasql://user:password@host/database",
"OAUTH_ENABLED": "true",
"KEYCLOAK_URL": "https://your-keycloak.example.com",
"KEYCLOAK_REALM": "teradata-realm",
"KEYCLOAK_CLIENT_ID": "teradata-mcp",
"KEYCLOAK_CLIENT_SECRET": "your-secret",
"OAUTH_RESOURCE_SERVER_URL": "https://your-mcp-server.example.com"
}
}
}
}Environment Variables
Database Connection
Variable | Description | Default |
| Teradata connection URL ( | — |
| Authentication mechanism: |
|
| LDAP/JWT credentials (e.g., | — |
| TLS mode: | — |
| Enable transport encryption |
|
Connection Resilience
Variable | Description | Default |
| Max reconnection attempts |
|
| Initial backoff delay (seconds) |
|
| Max backoff delay (seconds) |
|
MCP Transport
Variable | Description | Default |
| Transport: |
|
| Bind address for HTTP transports |
|
| Port for HTTP transports |
|
| Path for streamable-http |
|
OAuth 2.1
Variable | Description | Default |
| Enable OAuth authentication |
|
| Keycloak server URL | — |
| Keycloak realm name | — |
| OAuth client ID | — |
| OAuth client secret | — |
| Resource server URL | — |
| Required scopes (comma-separated) | — |
| Validate token audience |
|
| Validate token scopes |
|
| Require HTTPS for OAuth URLs |
|
| CORS allowed origins |
|
OAuth Scopes
Scope | Description |
| Read access to database resources |
| Write access to database resources |
| Execute SQL queries |
| Administrative access |
| Schema management operations |
Transport Compatibility
Transport | OAuth | Discovery Endpoints | Use Case |
stdio | N/A | N/A | Claude Desktop, CLI clients |
SSE | Full | Available | Web applications |
Streamable HTTP | Full | Available | API integrations |
Discovery endpoints (when OAuth enabled):
/.well-known/oauth-protected-resource— RFC 9728 metadata/.well-known/mcp-server-info— MCP capabilities/health— Health check
Docker Deployment
Development
docker compose up -dWith OAuth
docker compose -f docker-compose.oauth.yml up -dBuild
uv buildTroubleshooting
Database connection issues:
Verify
DATABASE_URIformat:teradatasql://user:pass@host/databaseCheck network connectivity to Teradata server
For LDAP: ensure
DB_LOGMECH=LDAPandDB_LOGDATAare set correctlyConnection issues are automatically retried (configurable via
DB_MAX_RETRIES)
LDAP authentication fails:
Verify the Teradata server has LDAP configured in TDGSS
Check
authcidformat matches your directory typeEscape special characters in passwords (
@→\@, spaces → use quotes)
Permission denied errors:
Verify user has required OAuth scopes
Check Keycloak role assignments
visualize_queryrequiresteradata:queryscope (not justteradata:read)
Debug logging:
export LOG_LEVEL=DEBUG
uv run teradata-mcpLicense
MIT License. See LICENSE for details.
Acknowledgments
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/arturborycki/mcp-teradata'
If you have feedback or need assistance with the MCP directory API, please join our Discord server