How mailrate-gmail/dify-sqlbot works
This repository packages a Dify + SQLBot demo environment. The main user flow is to submit a natural-language question in a Dify workflow, invoke the SQLBot MCP adapter, and return a formatted answer; SQLBot can query a configured PostgreSQL source, optionally reached through the local bridge. The repository also provides business-data import assets and deployment configuration. Relationships for unsampled deployment and integration files are based on README statements; the adapter’s request handling and formatting are supported by the excerpted source.
Main entry points: sqlbot_dify_mcp.py MCP adapter · import_business_data.sh Business data importer · integrated-sqlbot-demo.yml Dify demo workflow · docker-compose.sqlbot.yaml SQLBot service
Components 10
Applications
- Dify demo workflow
dify-apps/integrated-sqlbot-demo.yml - Dify services
- SQLBot service
docker-compose.sqlbot.yaml
MCP integration
- MCP adapter
sqlbot-dify-mcp/sqlbot_dify_mcp.py - Answer formatter
sqlbot-dify-mcp/sqlbot_dify_mcp.py
Data and access
- Business PostgreSQL
- Local DB proxy
docker-compose.sqlbot.yaml - Business data importer
scripts/import_business_data.sh - Business schema and data
seed/business_schema_and_data.sql
Other components
- Workflow user
Connections 9
- Workflow user → Dify demo workflow: submits question
README.md - Dify demo workflow → Dify services: runs in
README.md - Dify services → MCP adapter: invokes MCP
README.md - MCP adapter → SQLBot service: calls API
sqlbot-dify-mcp/sqlbot_dify_mcp.py - MCP adapter → Answer formatter: formats answer
sqlbot-dify-mcp/sqlbot_dify_mcp.py - SQLBot service → Local DB proxy: connects through
README.md - Local DB proxy → Business PostgreSQL: forwards traffic
README.md - Business data importer → Business schema and data: imports SQL
README.md - Business data importer → Business PostgreSQL: loads data into
README.md