- Connects to a PostgreSQL database containing LEGO dataset
- Executes complex queries across multiple tables
- Returns structured data for analysis and reporting
If you want to use this setup to query your Supabase DB: You may need to enable IPv4 support in your database settings. Other than that, Supabase works just like any other PostgreSQL database with superglue MCP. Get your Supabase connection string by clicking Connect on your Supabase dashboard.
Prerequisites
- Ensure that you have added superglue MCP to your
mcp.json
mcp.json
Make sure to replace the API key placeholder with your own API key after copying.
Building a Custom Database Query Workflow
You can find detailed descriptions of all available tools provided by superglue MCP here. In this tutorial, we will build a custom database integration workflow using natural language through your Cursor chat interface. Here’s how to create a workflow that analyzes LEGO data:Example Prompts:
What Happened Under the Hood:
- superglue MCP used
superglue_create_integration
to create a database integration with the provided connection string - superglue MCP used
superglue_build_and_run
to build and execute a workflow based on your natural language request - The workflow was created, executed, and returned results
- Optionally, the workflow can be saved using
superglue_save_workflow
for future reuse
Example: Creating a Persistent Database Query Workflow
The database used in this example is readonly. If you want to create your own writable database for testing, you can set up a local PostgreSQL instance:
superglue_build_and_run
, you can save it for future use:
- The workflow will be saved with a descriptive ID
- You can execute it anytime using
superglue_execute_workflow
with different theme names - Generate integration code using
superglue_get_workflow_integration_code
Next Steps
- Reuse Workflows: Execute your database workflows anytime using
superglue_execute_workflow
with the workflow ID, or programmatically using the generated integration code - Complex Analytics: Build workflows for advanced analytics, data mining, or reporting across multiple database tables
- Multi-Database: Create workflows that join data across different databases or combine database queries with API calls
- Real-time Queries: Set up workflows for live database monitoring and alerting