Skip to main content
Glama
fcdmoraes

Teradata MCP Server

by fcdmoraes

Teradata MCP Server

An MCP (Model Context Protocol) server for Teradata. Enables Claude (via Cowork or Claude Desktop) to run SQL queries, explore metadata, and interact directly with Teradata databases.


Features

  • Execute arbitrary SQL queries with configurable row limits

  • List tables and views within a database

  • Preview sample rows from any table

  • Test connectivity and retrieve the database version

  • Environment-based configuration via .env

  • Supports stdio transport (Claude Desktop / Cowork) and streamable-http


Related MCP server: Informix MCP Server

Tools

Tool

Description

ping

Tests the connection and returns the Teradata version

read_query

Executes a SQL statement and returns results as JSON

list_tables

Lists tables and views in a given database

table_preview

Returns a sample of the first rows from a table

Details

ping() Confirms the connection is active. Useful for validating configuration before running queries.

read_query(sql, row_limit?) Executes any SQL statement. row_limit is optional — defaults to DEFAULT_ROW_LIMIT (1000). Never exceeds MAX_ROW_LIMIT (50000). Returns truncated: true when results were cut off.

list_tables(database) Queries DBC.TablesV and returns the name, type (Table / View), and creation date of each object in the given database.

table_preview(database, table, row_limit?) Executes SELECT TOP N * FROM database.table. Default row_limit is 10.


Installation

Prerequisites

  • Python 3.11+

  • uv (package manager)

  • Access to a Teradata server

Steps

# 1. Clone the repository
git clone <repository-url>
cd teradata-mcp-server

# 2. Install dependencies
uv sync

# 3. Set up environment variables
cp .env.example .env
# Edit .env with your Teradata credentials

# 4. Test the connection
uv run teradata-mcp-server

Configuration

Environment variables (.env)

Variable

Required

Default

Description

DATABASE_URI

Connection URI: teradata://user:password@host:1025/database

LOGMECH

TD2

Authentication mechanism (TD2 or LDAP)

MCP_TRANSPORT

stdio

MCP transport (stdio or streamable-http)

MCP_HOST

localhost

Host for HTTP transport

MCP_PORT

8001

Port for HTTP transport

TD_POOL_SIZE

5

Connection pool size

TD_MAX_OVERFLOW

10

Extra connections allowed above pool size

TD_POOL_TIMEOUT

30

Timeout to acquire a connection (seconds)

DEFAULT_ROW_LIMIT

1000

Default row limit for read_query

MAX_ROW_LIMIT

50000

Hard ceiling — callers cannot exceed this

LOGGING_LEVEL

WARNING

Log level (DEBUG, INFO, WARNING, ERROR)


Cowork Configuration

In Claude Cowork (or Claude Desktop), go to Settings → Claude Cowork → Edit Config and add the block below inside mcpServers:

{
  "mcpServers": {
    "teradata": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/teradata-mcp-server",
        "run",
        "teradata-mcp-server"
      ],
      "env": {
        "DATABASE_URI": "teradata://user:password@host:1025/database"
      }
    }
  }
}

Replace /path/to/teradata-mcp-server with the absolute path to the project on your machine and fill in your credentials in DATABASE_URI.

If you prefer to keep credentials in .env rather than exposing them in the config JSON, omit the "env" field — the server reads .env automatically on startup.


Project Structure

teradata-mcp-server/
├── .env.example                  # Environment variables template
├── pyproject.toml                # Dependencies and entry point (uv/hatchling)
├── README.md
└── src/
    ├── core/
    │   ├── __init__.py
    │   ├── config.py             # Settings (pydantic-settings, reads .env)
    │   └── connection.py         # SQLAlchemy singleton engine (get_engine)
    ├── tools/
    │   ├── __init__.py
    │   └── base.py               # Tools: ping, read_query, list_tables, table_preview
    └── server/
        ├── __init__.py
        └── teradata_mcp_server.py  # Entry point: FastMCP instance + mcp.run()

Available Tools

4 tools
list_tablesA

Lista as tabelas e views de um banco de dados Teradata.

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYesNome do database (schema) a consultar.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It states the action (list) but does not disclose if it is read-only, performance implications, or permission requirements. Adequate but not thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no unnecessary information. It is appropriately concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity, the presence of an output schema, and high schema coverage, the description provides sufficient context for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, with the single parameter 'database' already described clearly. The description does not add further semantic value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists tables and views of a Teradata database, using a specific verb and resource. It differentiates from sibling tools like ping, read_query, and table_preview.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives. The context of sibling tools provides implicit differentiation, but the description lacks explicit usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

pingA

Testa a conexão com o servidor Teradata.

Executa um SELECT simples e retorna a versão do banco, confirmando que a conexão está ativa e configurada corretamente.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It explains the tool runs a simple SELECT and returns the version, which accurately reflects its behavior. It does not mention potential side effects (likely none) or rate limits, but for a ping tool, this is sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, directly stating the purpose and behavior without extraneous information. It is well-structured and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity of the tool and the presence of an output schema (which covers return details), the description adequately covers the connection test purpose. It is complete for its role.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, so no additional documentation is needed. The baseline score of 4 applies because there are no parameters to describe.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool tests the Teradata server connection by executing a simple SELECT and returning the database version. This distinguishes it from siblings like read_query or list_tables, which focus on data access or schema listing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage to confirm connection is active and correctly configured, which is appropriate. It does not explicitly state when not to use it, but the simple nature and sibling context make clear that for data operations, other tools are better.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_queryB

Executa uma consulta SQL no Teradata e retorna os resultados.

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYesInstrução SQL a executar (SELECT recomendado).
row_limitNoNúmero máximo de linhas. 0 usa o padrão configurado (DEFAULT_ROW_LIMIT). Não pode exceder MAX_ROW_LIMIT.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits such as side effects, authentication needs, or whether only SELECT queries are safe. The phrase 'consulta SQL' and schema hint 'SELECT recomendado' imply read-only usage, but this is not explicitly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that is front-loaded with the verb 'Executa' and directly conveys the tool's action and result. Every word is necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description does not need to explain return values. However, it lacks any caveats about query safety, row limits, or best practices, which would improve completeness for a moderately complex tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (sql and row_limit) adequately. The description adds no additional meaning beyond what the schema provides, meeting the baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool executes SQL queries in Teradata and returns results. The name 'read_query' aligns with this purpose, and the sibling tools (list_tables, ping, table_preview) are distinct, so the tool's function is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description offers no guidance on when to use this tool versus alternatives, nor does it specify any prerequisites or exclusions. It merely describes the action without contextual usage advice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

table_previewB

Retorna uma amostra das primeiras linhas de uma tabela.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYesNome da tabela.
databaseYesNome do database onde a tabela está.
row_limitNoNúmero de linhas a retornar (padrão 10, máximo MAX_ROW_LIMIT).

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It indicates a read operation ('retorna') but lacks details on permissions, error handling, or return format beyond 'first rows'. Minimal behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded with verb, no unnecessary words. Every part earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (3 params, no nested objects, has output schema), the description is adequate but could benefit from mentioning output shape or row order. It does not explain the 'sample' aspect (e.g., random vs first).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so description adds no additional meaning beyond the schema's parameter descriptions. Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it returns a sample of first rows of a table, using a specific verb ('retorna') and resource. It distinguishes from sibling tools like list_tables and read_query, though not explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives like read_query for full data retrieval. No mention of when-not-to-use or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a distinct purpose: listing tables, testing connectivity, executing arbitrary queries, and previewing table data. No overlap or ambiguity.

Naming Consistency4/5

All names use snake_case, but patterns vary: 'ping' is a bare verb, while others combine verb_noun (list_tables, read_query) or noun_verb (table_preview). Minor inconsistency, but still clear.

Tool Count2/5

Only 4 tools for a database server is too few. Essential operations like write, DDL, and transaction control are missing, making the set feel incomplete for the domain.

Completeness3/5

Covers read-only operations (list, query, preview, test), but lacks write operations, schema manipulation, and more advanced query support. Notable gaps for a full database server.

Maintenance

ActivityStale
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    Enables interaction with Informix databases through a Model Context Protocol server, supporting database exploration, table inspection, and custom SQL query execution.
    1
    1
  • A
    license
    B
    quality
    D
    maintenance
    Enables AI applications to securely connect to and interact with Tibero databases, supporting SQL queries, schema inspection, and data retrieval through the Model Context Protocol.
    2
    4
    MIT
  • F
    license
    B
    quality
    F
    maintenance
    Enables secure interaction with Teradata databases through SQL queries, schema exploration, and business intelligence analysis with enterprise-grade OAuth 2.1 authentication and workload management capabilities.
    8
    9

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/fcdmoraes/teradata-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server