Datatape
MCPClient Guides

Cursor

Add Datatape MCP tools to Cursor for AI-powered database queries in your editor.

Cursor Integration

Cursor supports MCP servers natively, letting you query your databases through Datatape without leaving your editor.

Setup

  1. Open Cursor and go to Settings (gear icon or Cmd+, / Ctrl+,)

  2. Navigate to MCP Servers

  3. Click Add Server

  4. Configure the connection:

    • Name: datatape (or any label you prefer)
    • Type: sse or streamable-http
    • URL: https://<org-id>.mcp.datatape.ai/mcp
  5. Click Save

Cursor Mcp Settings

With API Key Authentication

If you are using agent API key authentication, add the key as a header. In Cursor's MCP configuration file (.cursor/mcp.json in your project or global config):

{
  "mcpServers": {
    "datatape": {
      "url": "https://<org-id>.mcp.datatape.ai/mcp",
      "headers": {
        "Authorization": "Bearer dt_live_your_agent_api_key_here"
      }
    }
  }
}

With OAuth

If your Datatape organization has OAuth enabled, Cursor will handle the authentication flow automatically when it first connects. You will be prompted to sign in through your browser.

Using Tools in Cursor

Once connected, Cursor's AI assistant can call your Datatape tools. Use the chat panel or inline AI to ask data questions:

You: "What are the top 10 customers by lifetime value?"

Cursor: Calls get_top_customers and returns the results inline.

Cursor reads the tool descriptions and parameter schemas to match your question to the right tool.

Agent Mode

In Cursor's Agent mode, the AI can chain multiple tool calls together. For example:

  1. Call list_tables to discover available data
  2. Call get_customer_revenue with specific filters
  3. Summarize the results in a code comment or documentation

Cursor may ask for confirmation before calling MCP tools. You can adjust this behavior in Cursor's settings under MCP permissions.

Project-Level Configuration

You can add Datatape to a specific project by creating a .cursor/mcp.json file in the project root:

{
  "mcpServers": {
    "datatape": {
      "url": "https://<org-id>.mcp.datatape.ai/mcp",
      "headers": {
        "Authorization": "Bearer dt_live_your_agent_api_key_here"
      }
    }
  }
}

This makes the MCP server available to anyone working on the project (assuming they have valid credentials).

Cursor Tool Call

Troubleshooting

IssueSolution
Connection shows as disconnectedClick the refresh icon next to the entry in MCP settings
Tools do not appearVerify the agent is active and the URL ends with /mcp
Authentication errorCheck that the API key is valid or that OAuth is enabled
Slow responsesCheck the tool's timeout_seconds setting; increase if needed

On this page