diff --git a/docs/README.md b/docs/README.md index a046df6..93da87a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -14,6 +14,7 @@ New to Teradata MCP Server? Choose your 5-minute quickstart to rapidly evaluate | [VS Code + Copilot](server_guide/QUICK_START_VSCODE.md) | CLI (uv/pipx) | HTTP | Data Engineering, Agentic app development | | [Open WebUI](server_guide/QUICK_START_OPEN_WEBUI.md) | Docker | REST | Local AI, evaluate new LLMs | | [Code examples](../examples/README.md) | Python | HTTP | Build your own client. Example library using ADK, Bedrock, Langchain... | +| [Flowise](../docs/client_guide/Flowise_with_teradata_mcp_Guide.md) | Docker | HTTP | Build AI Agents Visually | **Other Options:** - **[Getting Started Guide](server_guide/GETTING_STARTED.md)** - Detailed path selection and role-based recommendations @@ -43,6 +44,7 @@ Connect different AI clients to your Teradata MCP Server: - **[Open WebUI](client_guide/Open_WebUI.md)** - Web-based interface - **[REST API](client_guide/Rest_API.md)** - HTTP/API integration - **[MCP Inspector](client_guide/MCP_Inspector.md)** - Debugging and testing tool +- **[Flowise](client_guide/Flowise_with_teradata_mcp_Guide.md)** - Build AI Agents Visually ### 🔧 Developer Guide Extend and contribute to the Teradata MCP Server: diff --git a/docs/client_guide/Flowise_with_teradata_mcp_Guide.md b/docs/client_guide/Flowise_with_teradata_mcp_Guide.md new file mode 100644 index 0000000..95623a8 --- /dev/null +++ b/docs/client_guide/Flowise_with_teradata_mcp_Guide.md @@ -0,0 +1,169 @@ +# Teradata MCP server in Flowise + +> **📍 Navigation:** [Documentation Home](../README.md) | [Server Guide](../README.md#-server-guide) | [Getting started](../server_guide/GETTING_STARTED.md) | [Architecture](../server_guide/ARCHITECTURE.md) | [Installation](../server_guide/INSTALLATION.md) | [Configuration](../server_guide/CONFIGURATION.md) | [Security](../server_guide/SECURITY.md) | [Customization](../server_guide/CUSTOMIZING.md) | [Client Guide](CLIENT_GUIDE.md) + +1. **Make sure you have Teradata database access.** (the most convenient way: Go to https://clearscape.teradata.com create account and login, start the environment and click on Run Demo) +2. **Build Teradata mcp server container image** from https://github.com/Teradata/teradata-mcp-server, run below lines in cmd terminal. +``` +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 \ + -t teradata-mcp-server:latest . + +``` +3. **Build Flowise Container Image** from https://github.com/FlowiseAI/Flowise, run below lines in cmd terminal. + +``` +git clone git clone https://github.com/FlowiseAI/Flowise.git +cd Flowise +docker build --no-cache -t flowise:latest . +``` + +4. **Create Common .env file** for teradata-mcp-server and flowise container, +``` +mkdir ~/td_ai_stack +cd ~/td_ai_stack +vi .env +``` +``` +# ----------- MCP server and Database Env variables ------------# +DATABASE_URI=teradata://username:password@host:1025/databasename +LOGMECH=TD2 #TD2 or LDAP +TD_POOL_SIZE=5 +TD_MAX_OVERFLOW=10 +TDPOOL_TIMEOUT=30 + +MCP_TRANSPORT=streamable-http #stdio, sse, streamable-http +MCP_HOST=0.0.0.0 +MCP_PORT=8001 +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 +VS_NAME=vs_example #Your target Vector Store Name + +# ------------ Flowise env varieable -------------------# +PORT=3000 +CORS_ORIGINS=* +IFRAME_ORIGINS=* +DATA_DIR=~/td_ai_stack/.flowise # host dir to persist data of flowise +``` +5. **Create docker-compose.yaml file** to up teradata-mcp-server and flowise containers +``` +cd ~/td_ai_stack +vi docker-compose.yaml + +``` +``` +services: + flowise: + image: flowise:latest + restart: always + environment: + - PORT=${PORT} + # LOGGING + - DEBUG=${DEBUG} + # SETTINGS + - CORS_ORIGINS=${CORS_ORIGINS} + - IFRAME_ORIGINS=${IFRAME_ORIGINS} + # Default Teradata Configuration env to refer into flowise + - TD_MCP_SERVER=http://teradata-mcp-server:8001/mcp + ports: + - '${PORT}:${PORT}' + container_name: flowise + healthcheck: + test: ['CMD', 'curl', '-f', 'http://localhost:${PORT}/api/v1/ping'] + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + volumes: + - ${DATA_DIR}/.flowise:/root/.flowise + teradata-mcp-server: + image: teradata-mcp-server:latest + restart: always + environment: + - DATABASE_URI=${DATABASE_URI} + - LOGMECH=${LOGMECH} + - MCP_TRANSPORT=${MCP_TRANSPORT} + - MCP_PATH=${MCP_PATH} + - MCP_HOST=${MCP_HOST} + - MCP_PORT=${MCP_PORT} + - PROFILE=${PROFILE} + container_name: teradata-mcp-server + ports: + - "${MCP_PORT}:${MCP_PORT}" + tty: true +networks: + default: + name: td-ai-stack + external: false +``` + +6. **Up teradata MCP server and flowise container** +``` +cd ~/td_ai_stack +mkdir ~/td_ai_stack/.flowise +docker image ls # make sure teradata-mcp-server and flowise container images are available +docker compose up -d --remove-orphans +``` + +7. **Validate docker container status** +``` +dokcer ps +# teradata-mcp-server container logs +docker logs teradata-mcp-server -f +# Flowise Container logs +docker logs flowise -f +``` + +8. **Login to flowise** +http://IP:3000 or http://127.0.0.1:3000 + +first time login - Complete organization setup (set any username and password) + +![alt text](../media/flowise/flowise-org-setup.png) + +9. **How to configure Teradata MCP server into Flowise Agentflow** + + - 9.1. Go Into Agentflows menu and Add new + ![alt text](../media/flowise/Agentflow-add.png) + - 9.2. Drag and Drop Agent and connect it with Start Node + ![alt text](../media/flowise/Drag-Agent.png) + ![alt text](../media/flowise/conntect-Agent-with-StartNode.png) + - 9.3. Set up LLM credentials and LLM for Agent + + - Double click on Agent-0 , it will show Model to select model from various provider + - select provider like Azure ChatOpenAI and set Azure ChatOpenAI Parameters, + - for connect Credentails select -Create New-, fill details and Add + ![alt text](../media/flowise/Select-LLM-Provider.png) + ![alt text](../media/flowise/Configure-LLM-Model.png) + ![alt text](../media/flowise/configure-LLM-creds.png) + - 9.4. Add Teradata MCP server as custom MCP server for Tools + - Click on Add Tools + - Select Custom MCP server + - Setup - Custom MCP Server Parameters + + ``` + { + "url": "http://teradata-mcp-server:8001/mcp", + + } + ``` + + - Refresh Button of Available Actions + - Click on Drop down to select tools for Agent + ![alt text](../media/flowise/Select-custom-mcp.png)![alt text](../media/flowise/Configure-custom-mcp.png) + ![alt text](../media/flowise/MCP-tools-Drop-down.png)![alt text](../media/flowise/Select-tools-from-mcp.png) + +10. **Save Agentflow with anyName** +![alt text](../media/flowise/Save-AgentFlow.png) + +11. **Execute AgentFlow** +![alt text](../media/flowise/Execute-Agent-Flow.png) + +![alt text](../media/flowise/tool-execution.png) \ No newline at end of file diff --git a/docs/media/flowise/Agentflow-add.png b/docs/media/flowise/Agentflow-add.png new file mode 100644 index 0000000..b801a51 Binary files /dev/null and b/docs/media/flowise/Agentflow-add.png differ diff --git a/docs/media/flowise/Configure-LLM-Model.png b/docs/media/flowise/Configure-LLM-Model.png new file mode 100644 index 0000000..0d48fc7 Binary files /dev/null and b/docs/media/flowise/Configure-LLM-Model.png differ diff --git a/docs/media/flowise/Configure-custom-mcp.png b/docs/media/flowise/Configure-custom-mcp.png new file mode 100644 index 0000000..12cd0eb Binary files /dev/null and b/docs/media/flowise/Configure-custom-mcp.png differ diff --git a/docs/media/flowise/Drag-Agent.png b/docs/media/flowise/Drag-Agent.png new file mode 100644 index 0000000..da8b095 Binary files /dev/null and b/docs/media/flowise/Drag-Agent.png differ diff --git a/docs/media/flowise/Execute-Agent-Flow.png b/docs/media/flowise/Execute-Agent-Flow.png new file mode 100644 index 0000000..ffa646e Binary files /dev/null and b/docs/media/flowise/Execute-Agent-Flow.png differ diff --git a/docs/media/flowise/MCP-tools-Drop-down.png b/docs/media/flowise/MCP-tools-Drop-down.png new file mode 100644 index 0000000..202b481 Binary files /dev/null and b/docs/media/flowise/MCP-tools-Drop-down.png differ diff --git a/docs/media/flowise/Save-AgentFlow.png b/docs/media/flowise/Save-AgentFlow.png new file mode 100644 index 0000000..b4c9683 Binary files /dev/null and b/docs/media/flowise/Save-AgentFlow.png differ diff --git a/docs/media/flowise/Select-LLM-Provider.png b/docs/media/flowise/Select-LLM-Provider.png new file mode 100644 index 0000000..d7bdc7e Binary files /dev/null and b/docs/media/flowise/Select-LLM-Provider.png differ diff --git a/docs/media/flowise/Select-custom-mcp.png b/docs/media/flowise/Select-custom-mcp.png new file mode 100644 index 0000000..5e70530 Binary files /dev/null and b/docs/media/flowise/Select-custom-mcp.png differ diff --git a/docs/media/flowise/Select-tools-from-mcp.png b/docs/media/flowise/Select-tools-from-mcp.png new file mode 100644 index 0000000..ae6ac80 Binary files /dev/null and b/docs/media/flowise/Select-tools-from-mcp.png differ diff --git a/docs/media/flowise/configure-LLM-creds.png b/docs/media/flowise/configure-LLM-creds.png new file mode 100644 index 0000000..5d3cf4c Binary files /dev/null and b/docs/media/flowise/configure-LLM-creds.png differ diff --git a/docs/media/flowise/conntect-Agent-with-StartNode.png b/docs/media/flowise/conntect-Agent-with-StartNode.png new file mode 100644 index 0000000..d41c46c Binary files /dev/null and b/docs/media/flowise/conntect-Agent-with-StartNode.png differ diff --git a/docs/media/flowise/flowise-org-setup.png b/docs/media/flowise/flowise-org-setup.png new file mode 100644 index 0000000..adc7b00 Binary files /dev/null and b/docs/media/flowise/flowise-org-setup.png differ diff --git a/docs/media/flowise/tool-execution.png b/docs/media/flowise/tool-execution.png new file mode 100644 index 0000000..9070104 Binary files /dev/null and b/docs/media/flowise/tool-execution.png differ