
sidebar.wechat

sidebar.feishu
sidebar.chooseYourWayToJoin

sidebar.scanToAddConsultant
Want to query your database directly from Claude Desktop? In just 5 minutes, following the steps in this article, you can experience AI-driven data analysis.
This article will walk you through configuring the AskTable MCP Server to give Claude data querying capabilities.
Required:
Optional:
Time: 5-10 minutes
This is the fastest way to get started. No installation required, just use our provided demo data.
macOS:
open ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows:
notepad %APPDATA%\Claude\claude_desktop_config.json
If the file doesn't exist, create a new one.
Copy the following content into the config file:
{
"mcpServers": {
"asktable": {
"type": "sse",
"url": "https://mcp.asktable.com/sse/?api_key=ASKER_8H8DRJCH6LT8HCJPXOH4&datasource_id=ds_6iewvP4cpSyhO76P2Tv8MW",
"headers": {},
"timeout": 300,
"sse_read_timeout": 300
}
}
}
Configuration说明:
type: "sse":Use SSE protocol (recommended)url:MCP Server address, includes demo account API Key and datasource IDtimeout:Request timeout in secondssse_read_timeout:SSE connection timeout in secondsAfter saving the config file, completely quit and reopen Claude Desktop.
In Claude Desktop, input:
Hello, please help me query how many students there are in total?
If configured successfully, Claude will:
query tool to query dataExpected Output:
Based on the query results, there are 200 students in total.
Now you can try various queries:
Basic Queries:
Complex Queries:
Generate SQL:
If you want to connect your own database, you need to add a datasource in AskTable first.
Visit asktable.com and log in.
Get API Key:
Get Datasource ID:
ds_xxxxx)Replace api_key and datasource_id in the config file with your own:
{
"mcpServers": {
"asktable": {
"type": "sse",
"url": "https://mcp.asktable.com/sse/?api_key=YOUR_API_KEY&datasource_id=YOUR_DATASOURCE_ID",
"headers": {},
"timeout": 300,
"sse_read_timeout": 300
}
}
}
Restart Claude Desktop, then try querying your data.
If you prefer running the MCP Server locally, you can use Stdio mode.
Using uv (recommended):
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install AskTable MCP Server
uvx asktable-mcp-server@latest
Or using pip:
pip install asktable-mcp-server
{
"mcpServers": {
"asktable": {
"command": "uvx",
"args": ["asktable-mcp-server@latest"],
"env": {
"API_KEY": "YOUR_API_KEY",
"DATASOURCE_ID": "YOUR_DATASOURCE_ID"
}
}
}
}
Configuration说明:
command: Startup commandargs: Command argumentsenv: Environment variables (API Key and datasource ID)Restart Claude Desktop and test the querying functionality.
In Claude Desktop, you should be able to see:
Input a simple query:
How many tables are in the database?
If results are returned, the configuration is successful!
Input:
Generate SQL to query all users
If SQL statement is returned, both tools are working properly.
Problem: Config file path doesn't exist
Solution:
mkdir -p ~/Library/Application\ Support/Claude && touch ~/Library/Application\ Support/Claude/claude_desktop_config.jsonclaude_desktop_config.json in the %APPDATA%\Claude\ directoryProblem: Still can't see AskTable tools after restart
Solution:
~/Library/Logs/Claude/mcp*.log%APPDATA%\Claude\logs\mcp*.logProblem: Shows "api_key must be set" or "Invalid API key"
Solution:
Problem: Query keeps returning no result
Solution:
timeout and sse_read_timeout values (e.g., 600 seconds)Problem: Tools can't start when using Stdio mode
Solution:
asktable-mcp-server is installed correctlyuvx asktable-mcp-server@latestCongratulations! You've successfully configured AskTable MCP Server.
Continue Learning:
Practical Suggestions:
Get Help:
Related Reading:
Technical Exchange:
sidebar.noProgrammingNeeded
sidebar.startFreeTrial