Integrations and development
Let AI clients call AskTable through MCP
Provide AskTable's question answering and management capabilities to AI clients through MCP.
The AskTable MCP Server provides question answering and management capabilities as tools under the Model Context Protocol, so MCP clients such as Claude and MCP Inspector can call them directly. MCP does not bypass AskTable permissions: every call runs with the identity and permissions of the API key used.
Prepare
- An API key created in “Agent integrations”. Use a personal key to act as yourself; trusted business systems use a system integration key (
askerfor questions,adminfor project infrastructure). For the differences, see REST API. - A client that supports Streamable HTTP (for production) or stdio (for local debugging).
Configure
Find the MCP address
| Deployment | Address |
|---|---|
| AskTable Cloud | https://mcp.asktable.com/ |
| Private deployment, all-in-one image | https://<your AskTable site>/mcp/ |
Private deployment, separate asktable-mcp container | http://<mcp-host>:8690/ |
In AskTable, “avatar at the bottom → Docs → MCP service” opens the address for the current deployment.
Enter the address and key in the client
{
"mcpServers": {
"asktable": {
"type": "http",
"url": "https://mcp.asktable.com/",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Field names depend on your client; Authorization is required. In production, inject the key with the client's secret management, and do not leave it in plain text in configuration files that are synced or backed up.
Ask a question
Have the client call data_agent_list to find an agent, then ask with chat_ask (data_agent_id and question are required), and follow up in the same conversation with chat_followup. The data scope comes from the agent and the key's identity: personal keys use your data role and cannot switch it with parameters; system integration keys can specify a role and variables when creating the conversation.
Tools
The MCP Server is named asktable and has 43 tools:
| Group | Tools |
|---|---|
| Questions | chat_ask, chat_followup |
| Conversations | conversation_list, conversation_get, conversation_delete |
| Agents | data_agent_list, data_agent_get, data_agent_create, data_agent_update, data_agent_delete |
| Data sources | datasource_list, datasource_get, datasource_create, datasource_update, datasource_delete, datasource_upload_file, datasource_test_connection |
| Metadata | datasource_meta_get, datasource_meta_export, meta_sync, meta_import |
| Fields and tables | field_set_visibility, field_set_description, field_set_ai_value_index, table_set_description |
| Training sets | training_pair_list, training_pair_create, training_pair_update, training_pair_delete |
| Project | project_get, project_update |
| Roles | role_list, role_get, role_create, role_update, role_delete |
| Policies | policy_list, policy_get, policy_create, policy_update, policy_delete |
| Project preferences | project_preference_get, project_preference_update |
Some tools are currently unavailable
The 12 role (role_*), policy (policy_*), and project preference (project_preference_*) tools call endpoints that do not exist on the current server; clients can list them, but calls fail. Manage roles and policies in the web app or with the CLI (asktable role ..., asktable policy ...). This issue awaits a product fix.
- List tools accept
pageandsize(up to 200); without them, the backend's default pagination applies. - Delete tools (
*_delete) requireconfirm: true. meta_syncreturns{"status":"triggered"}immediately by default; passwait,poll_interval_ms, andmax_attemptsto wait for the result.- Progress notifications are sent only when the client provides a
progressToken.
Local debugging
Start with stdio in the MCP source directory; the key is read from environment variables:
export ASKTABLE_API_URL='https://<your AskTable site>/api'
export ASKTABLE_API_KEY='YOUR_API_KEY'
bun src/main.ts --stdioASKTABLE_API_URL defaults to https://api.asktable.com; inside the all-in-one image it is http://127.0.0.1:8688.
Each call writes one line of JSON audit log to stderr, keeping only the first 16 characters of the key's sha256.
Common issues
| Client error | Cause | Action |
|---|---|---|
InvalidRequest | The server returned 401 or 404: invalid key, missing Bearer prefix, wrong address, or an unavailable tool | Check the key and address; see above for unavailable tools |
InvalidParams | The server returned 422: wrong parameter type or missing required field | Fix per the tool's parameter description |
InternalError | Other upstream errors | Check httpStatus in the error and find the time in AskTable server logs |
| Parameter error on a delete tool | confirm: true was not passed | Pass it explicitly |
chat_ask fails to create a conversation | No data_agent_id, or the agent is unavailable | Call data_agent_list first |
A system admin key is rejected on personal resources | System keys cannot read or write personal configuration | Use a personal identity with permission |
| Cannot reach the separate container | The port is not published, or the backend at ASKTABLE_API_URL is unreachable | Check the container configuration |
/mcp/ returns 404 in the all-in-one image | The MCP process in the container did not start | Check the mcp-server process in the container |