Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.github
docs
test
logs
logs
.env
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ WORKDIR /app
# Build arguments for optional modules
ARG ENABLE_FS_MODULE=false
ARG ENABLE_EVS_MODULE=false
ARG ENABLE_TDVS_MODULE=false
ARG ENABLE_TDML_MODULE=false

# Copy essential files for dependency installation
COPY pyproject.toml uv.lock* README.md /app/
Expand All @@ -16,8 +18,8 @@ RUN apt-get update && \
pip install uv mcpo && \
# Build uv sync command with conditional extras \
UV_EXTRAS="" && \
if [ "$ENABLE_FS_MODULE" = "true" ]; then UV_EXTRAS="$UV_EXTRAS --extra fs"; fi && \
if [ "$ENABLE_EVS_MODULE" = "true" ]; then UV_EXTRAS="$UV_EXTRAS --extra evs"; fi && \
if [ "$ENABLE_FS_MODULE" = "true" ] || [ "$ENABLE_TDML_MODULE" = "true" ]; then UV_EXTRAS="$UV_EXTRAS --extra fs"; fi && \
if [ "$ENABLE_EVS_MODULE" = "true" ] || [ "$ENABLE_TDVS_MODULE" = "true" ]; then UV_EXTRAS="$UV_EXTRAS --extra tdvs"; fi && \
uv sync $UV_EXTRAS

# Copy source code before building
Expand All @@ -26,16 +28,17 @@ COPY ./src /app/src
# Build and install the package
RUN uv build && \
pip install . && \
if [ "$ENABLE_FS_MODULE" = "true" ]; then pip install .[fs];fi && \
if [ "$ENABLE_EVS_MODULE" = "true" ]; then pip install .[evs];fi && \
if [ "$ENABLE_FS_MODULE" = "true" ] || [ "$ENABLE_TDML_MODULE" = "true" ]; then pip install .[fs];fi && \
if [ "$ENABLE_EVS_MODULE" = "true" ] || [ "$ENABLE_TDVS_MODULE" = "true" ]; then pip install .[tdvs];fi && \
apt-get purge -y build-essential gcc && \
rm -rf /var/lib/apt/lists/*

# Copy everything else
COPY . /app
# Remove optional module directories if not enabled
RUN if [ "$ENABLE_FS_MODULE" != "true" ]; then rm -rf /app/src/teradata_mcp_server/tools/fs; fi && \
if [ "$ENABLE_EVS_MODULE" != "true" ]; then rm -rf /app/src/teradata_mcp_server/tools/evs; fi
if [ "$ENABLE_EVS_MODULE" != "true" ]; then rm -rf /app/src/teradata_mcp_server/tools/evs; fi && \
if [ "$ENABLE_TDVS_MODULE" != "true" ]; then rm -rf /app/src/teradata_mcp_server/tools/tdvs; fi
# └──────────── End build stage ────────────┘

# ┌───────────── Runtime stage ─────────────┐
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<a href="https://pypi.org/project/teradata-mcp-server/">
<img alt="downloads" src="https://img.shields.io/pypi/dm/teradata-mcp-server?label=downloads&color=2ea44f">
</a>
<a href="./examples/app-flowise/flowise_teradata_agents/README.md">
<img alt="docs" src="https://img.shields.io/badge/Teradata--Agents-Setup-green">
</a>
</p>

<p align="center">
Expand All @@ -29,6 +32,7 @@
✨ <a href="https://github.com/Teradata/teradata-mcp-server?tab=readme-ov-file#quick-start-with-claude-desktop-no-installation">Quickstart with Claude Desktop </a> or <a href="https://github.com/Teradata/teradata-mcp-server/blob/main/docs/README.md#-quick-start"> your favorite tool</a> in <5 minute ✨
</p>


## Overview
The Teradata MCP server provides sets of tools and prompts, grouped as modules for interacting with Teradata databases. Enabling AI agents and users to query, analyze, and manage their data efficiently.

Expand All @@ -54,6 +58,10 @@ We are providing groupings of tools and associated helpful prompts to support al
- **DBA** tools, prompts and resources to facilitate your platform administration tasks:
- [DBA Tools](https://github.com/Teradata/teradata-mcp-server/blob/main/src/teradata_mcp_server/tools/dba/README.md)
- [Security Tools](https://github.com/Teradata/teradata-mcp-server/blob/main/src/teradata_mcp_server/tools/sec/README.md)
- **Data Scientist** tools, prompts, and resources to build powerful [AI agents and workflows](./examples/app-flowise/flowise_teradata_agents/README.md) for data-driven applications.
- [Teradata Vector Store Tools](./src/teradata_mcp_server/tools/tdvs/README.md)
- [Teradataml Functions Tools](./src/teradata_mcp_server/tools/constants.py)
- [Plot Tools](./src/teradata_mcp_server/tools/plot/README.md)

## Quick start with Claude Desktop (no installation)
> Prefer to use other tools? Check out our Quick Starts for [VS Code/Copilot](https://github.com/Teradata/teradata-mcp-server/blob/main/docs/server_guide/QUICK_START_VSCODE.md), [Open WebUI](https://github.com/Teradata/teradata-mcp-server/blob/main/docs/server_guide/QUICK_START_OPEN_WEBUI.md), or dive into [simple code examples](https://github.com/Teradata/teradata-mcp-server/blob/main/examples/README.md#client-applications)!
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ services:
args:
- ENABLE_FS_MODULE=${ENABLE_FS_MODULE:-false}
- ENABLE_EVS_MODULE=${ENABLE_EVS_MODULE:-false}
- ENABLE_TDVS_MODULE=${ENABLE_TDVS_MODULE:-false}
- ENABLE_TDML_MODULE=${ENABLE_TDML_MODULE:-false}
image: teradata-mcp-server:latest
environment:
- DATABASE_URI=${DATABASE_URI}
Expand All @@ -23,6 +25,8 @@ services:
args:
- ENABLE_FS_MODULE=${ENABLE_FS_MODULE:-false}
- ENABLE_EVS_MODULE=${ENABLE_EVS_MODULE:-false}
- ENABLE_TDVS_MODULE=${ENABLE_TDVS_MODULE:-false}
- ENABLE_TDML_MODULE=${ENABLE_TDML_MODULE:-false}
image: teradata-mcp-server:latest
entrypoint: sh -c 'export MCP_TRANSPORT=streamable-http && mcpo --port 8002 --api-key "$MCPO_API_KEY" -- uv run teradata-mcp-server'
environment:
Expand Down
21 changes: 17 additions & 4 deletions docs/client_guide/Flowise_with_teradata_mcp_Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ git clone https://github.com/Teradata/teradata-mcp-server.git
cd teradata-mcp-server
# build container from Source code
docker build --build-arg ENABLE_FS_MODULE=true \
--build-arg ENABLE_EVS_MODULE=true \
--build-arg ENABLE_TDML_MODULE=true \
--build-arg ENABLE_TDVS_MODULE=true \
-t teradata-mcp-server:latest .

```
Expand All @@ -34,6 +35,8 @@ LOGMECH=TD2 #TD2 or LDAP
TD_POOL_SIZE=5
TD_MAX_OVERFLOW=10
TDPOOL_TIMEOUT=30
PROFILE=dataScientist
DATABASE_HOST=IP_OF_DB_NODE

MCP_TRANSPORT=streamable-http #stdio, sse, streamable-http
MCP_HOST=0.0.0.0
Expand All @@ -42,8 +45,8 @@ MCP_PATH=/mcp/

# ----- Enterprise Vector Store ----------
TD_BASE_URL=https://host/api/accounts/40c83ff23b2e #Your UES_URI, strip off the trailing /open-analytics
TD_PAT=gwxhQG2UZcDqQlp9LKWjEBfXB7 #Your PAT
TD_PEM=./demo_key.pem #Your PEM
#TD_PAT=gwxhQG2UZcDqQlp9LKWjEBfXB7 #Your PAT if you have Teradata Lake system.
TD_PEM=/root/td_ai_stack/demo_key.pem #Your PEM with full path where you kept on host
VS_NAME=vs_example #Your target Vector Store Name

# ------------ Flowise env varieable -------------------#
Expand Down Expand Up @@ -73,7 +76,9 @@ services:
# Default Teradata Configuration env to refer into flowise
- TD_MCP_SERVER=http://teradata-mcp-server:8001/mcp
ports:
- '${PORT}:${PORT}'
- "${PORT}:${PORT}"
extra_hosts:
- "dbccop1:${DATABASE_HOST}"
container_name: flowise
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:${PORT}/api/v1/ping']
Expand All @@ -94,9 +99,17 @@ services:
- MCP_HOST=${MCP_HOST}
- MCP_PORT=${MCP_PORT}
- PROFILE=${PROFILE}
- TD_BASE_URL=${TD_BASE_URL}
- TD_PAT=${TD_PAT}
- TD_PEM=${TD_PEM}
- VS_NAME=${VS_NAME}
container_name: teradata-mcp-server
extra_hosts:
- "dbccop1:${DATABASE_HOST}"
ports:
- "${MCP_PORT}:${MCP_PORT}"
volumes:
- ${TD_PEM}:${TD_PEM}
tty: true
networks:
default:
Expand Down
2 changes: 1 addition & 1 deletion docs/developer_guide/DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ uv sync # create venv and install project deps

> Tip: add extras for full dev (feature store, EVS) if you use them:
```bash
uv sync --extra fs --extra evs
uv sync --extra fs --extra tdvs
```

### 3) Run the server from source
Expand Down
4 changes: 2 additions & 2 deletions docs/server_guide/INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ docker compose up
export DATABASE_URI="teradata://username:password@host:1025/database"

# Build with optional modules (Feature Store, Vector Store)
ENABLE_FS_MODULE=true ENABLE_EVS_MODULE=true docker compose build
ENABLE_FS_MODULE=true ENABLE_TDVS_MODULE=true docker compose build
docker compose up

# Run with specific profile
PROFILE=dba docker compose up

# Combine options
ENABLE_FS_MODULE=true PROFILE=dataScientist docker compose build
ENABLE_FS_MODULE=true ENABLE_TDVS_MODULE=true PROFILE=dataScientist docker compose build
PROFILE=dataScientist docker compose up

# Run in background (production)
Expand Down
2 changes: 1 addition & 1 deletion env
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TD_MAX_OVERFLOW=10
TDPOOL_TIMEOUT=30

MCP_TRANSPORT=streamable-http #stdio, sse, streamable-http
MCP_HOST=127.0.0.1
MCP_HOST=0.0.0.0
MCP_PORT=8001
MCP_PATH=/mcp/

Expand Down
2 changes: 2 additions & 0 deletions examples/app-flowise/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Flowise Example with Teradata MCP

[![Teradata Agents](https://img.shields.io/badge/Teradata--Agents-Setup-green?style=for-the-badge&logo=teradata)](./flowise_teradata_agents/README.md)

Use this example to locally test Flowise and the Teradata MCP server with recommended defaults.
Refer to the [Flowise client guide](./docs/client_guide/Flowise_with_teradata_mcp_Guide.md) for walkthrough and screenshots.

Expand Down
24 changes: 14 additions & 10 deletions examples/app-flowise/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
flowise:
image: flowiseai/flowise:latest
image: flowise:latest
restart: always
environment:
- PORT=${PORT}
Expand All @@ -12,7 +12,9 @@ services:
# Default Teradata Configuration env to refer into flowise
- TD_MCP_SERVER=http://teradata-mcp-server:8001/mcp
ports:
- '${PORT}:${PORT}'
- "${PORT}:${PORT}"
extra_hosts:
- "dbccop1:${DATABASE_HOST}"
container_name: flowise
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:${PORT}/api/v1/ping']
Expand All @@ -21,14 +23,8 @@ services:
retries: 5
start_period: 30s
volumes:
- ${DATA_DIR:-./.flowise}:/root/.flowise
- ${DATA_DIR}/.flowise:/root/.flowise
teradata-mcp-server:
build:
context: ../..
dockerfile: Dockerfile
args:
ENABLE_FS_MODULE: "true"
ENABLE_EVS_MODULE: "true"
image: teradata-mcp-server:latest
restart: always
environment:
Expand All @@ -39,11 +35,19 @@ services:
- MCP_HOST=${MCP_HOST}
- MCP_PORT=${MCP_PORT}
- PROFILE=${PROFILE}
- TD_BASE_URL=${TD_BASE_URL}
- TD_PAT=${TD_PAT}
- TD_PEM=${TD_PEM}
- VS_NAME=${VS_NAME}
container_name: teradata-mcp-server
extra_hosts:
- "dbccop1:${DATABASE_HOST}"
ports:
- "${MCP_PORT}:${MCP_PORT}"
volumes:
- ${TD_PEM}:${TD_PEM}
tty: true
networks:
default:
name: td-ai-stack
external: false
external: false
4 changes: 3 additions & 1 deletion examples/app-flowise/env
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ LOGMECH=TD2 #TD2 or LDAP
TD_POOL_SIZE=5
TD_MAX_OVERFLOW=10
TDPOOL_TIMEOUT=30
PROFILE=dataScientist
DATABASE_HOST=IP_OF_DB_NODE

MCP_TRANSPORT=streamable-http #stdio, sse, streamable-http
MCP_HOST=0.0.0.0
Expand All @@ -14,7 +16,7 @@ MCP_PATH=/mcp/
# Inherit from current environment, or un-comment and change as needed
#TD_VS_BASE_URL=https://host/api/accounts/40c83ff23b2e #Your UES_URI, strip off the trailing /open-analytics
#TD_PAT=gwxhQG2UZcDqQlp9LKWjEBfXB7 #Your PAT token
#TD_PEM=./demo_key.pem #Your PEM file path
TD_PEM=./demo_key.pem #Your PEM with full path where you kept on host
#VS_NAME=vs_example #Your target Vector Store Name

# ------------ Flowise varibles -------------------#
Expand Down
Loading