Skip to main content

Dify Integration with AskTable MCP

By integrating the AskTable MCP extension, you can directly query and analyze data using natural language within Dify, gaining insights. With just a simple configuration, your AI assistant can be equipped with powerful data analysis capabilities.

Step 1: Open Dify

  1. Go to Dify Official Website
  2. Click "Get Started"

Step 2: Add MCP Service

  1. Enter "Tools".

  2. Select the "MCP" tab.

  3. Click "Add MCP Plugin".

    Add MCP Plugin

Step 3: Configure Service Endpoint URL

  1. First, in AskTable, get an authentication token (API-Key) and obtain a data source ID.

  2. Copy the following URL and fill it into "Service Endpoint URL", creating a connection to AskTable's MCP (SSE) service. For other special requirements, please refer to the documentation.

    https://mcp.asktable.com/sse/?api_key=YOUR_API_KEY&datasource_id=YOUR_DATASOURCE_ID
  • Replace YOUR_API_KEY with the API Key you obtained from AskTable

  • Replace YOUR_DATASOURCE_ID with your data source ID

    Configure Service Endpoint URL
  1. "Add and Authorize"

    After authorization, two AskTable usage tools will appear. 🎉 Successfully added AskTable MCP!

AskTable MCP Tool

Step 4: Enable AskTable Service (Create a Workflow Application)

  1. Create a new application
  • Click "Studio".

  • Select "Workflow".

  • Click "Create Blank App".

    Create a Workflow
  1. Enter the app name, click "Create".

    Enter App Name
  2. Configure the workflow:

  • Select the "Start" node.

    Configure Start Node
  • Add input field: Enter variable name as question, click "Save".

    Add Input Field
  1. Add AskTable tool:
  • Select the "Tool" node.

  • Choose the added AskTable MCP service (e.g., "Query Data Tool").

    Add Tool Node
  • Type / to select the question variable.

    Insert Variable
  1. Add "End" Node:

    Add End Node
  • Add output variable, variable name is json.

    Add Output Variable

🎉 Configuration Completed

Congratulations! You have successfully completed the integration configuration of AskTable MCP service with Dify! Click run, and enter the question you want to query to start using it.

Run Test

Example Question

Query the cumulative net profit of each company in 2023 and display the top 10 companies.

Query Result Display

Here are the query results obtained using the AskTable MCP service:

Display Query Results

For further assistance, please contact us.