Ag

AgentQL

Enable AI agents to get structured data from unstructured web with AgentQL.

#Artificial Intelligence# Web Scraping# Data Extraction
PublisherAgentQL
Submitted date4/11/2025

Unleashing LLMs: AgentQL's MCP Server for Seamless Data Extraction

Harness the power of Large Language Models (LLMs) with the AgentQL Model Context Protocol (MCP) server, designed to bridge the gap between LLMs and real-world data. This server leverages AgentQL's robust data extraction capabilities, empowering your LLM applications with structured information directly from the web.

Key Features

  • extract-web-data Tool: Precisely extract structured data from any URL. Simply provide the URL and a clear prompt describing the desired data fields, and AgentQL will handle the rest.

Installation and Configuration

Integrating AgentQL MCP Server into your LLM workflow is straightforward. Follow these steps to unlock its potential:

Prerequisites

  • AgentQL API Key: Obtain your unique API key from the AgentQL Developer Portal. This key grants access to AgentQL's data extraction services.
  • Node.js and npm: Ensure Node.js and npm (Node Package Manager) are installed on your system.

Installation Steps

  1. Install the AgentQL MCP Server globally:

    npm install -g agentql-mcp
  2. Configure your LLM application:

    The configuration process varies depending on the LLM application you're using. Below are detailed instructions for popular platforms:

    Claude

    1. Open Claude Desktop Settings using + ,.

    2. Navigate to the Developer section in the sidebar.

    3. Click Edit Config to open the claude_desktop_config.json file.

    4. Add the agentql server configuration within the mcpServers dictionary:

      { "mcpServers": { "agentql": { "command": "npx", "args": ["-y", "agentql-mcp"], "env": { "AGENTQL_API_KEY": "YOUR_API_KEY" } } } }
    5. Restart the Claude application.

    Refer to the official Claude documentation for more information on MCP configuration: Model Context Protocol Quickstart.

    Cursor

    1. Open Cursor Settings.

    2. Go to MCP > MCP Servers.

    3. Click + Add new MCP Server.

    4. Enter the following details:

      • Name: agentql (or your preferred name)
      • Type: command
      • Command: env AGENTQL_API_KEY=YOUR_API_KEY npx -y agentql-mcp

    Consult the Cursor documentation for further details on MCP configuration: Cursor Model Context Protocol.

    Windsurf

    1. Open the Windsurf: MCP Configuration Panel.

    2. Click Add custom server+.

    3. Alternatively, you can directly edit the ~/.codeium/windsurf/mcp_config.json file.

    4. Add the agentql server configuration within the mcpServers dictionary:

      { "mcpServers": { "agentql": { "command": "npx", "args": ["-y", "agentql-mcp"], "env": { "AGENTQL_API_KEY": "YOUR_API_KEY" } } } }

    Refer to the Windsurf documentation for more information on MCP configuration: Windsurf MCP.

Verification

To ensure the AgentQL MCP integration is working correctly, provide your agent with a task that requires web data extraction. For example:

Extract the list of videos from the page https://www.youtube.com/results?search_query=agentql, every video should have a title, an author name, a number of views and a url to the video. Make sure to exclude ads items. Format this as a markdown table.

Tip: If the agent struggles to access URLs or web content, explicitly instruct it to "use tools" or "use the agentql tool."

Development (Advanced)

For developers looking to contribute or customize the AgentQL MCP Server, follow these steps:

  1. Install dependencies:

    npm install
  2. Build the server:

    npm run build
  3. Enable auto-rebuild during development:

    npm run watch
  4. Use the development version:

    To test the development version, update your LLM application's MCP configuration with the following:

    { "mcpServers": { "agentql": { "command": "/path/to/agentql-mcp/dist/index.js", "env": { "AGENTQL_API_KEY": "YOUR_API_KEY" } } } }

    Important: Remember to remove any existing AgentQL MCP server configurations to avoid conflicts.

Debugging

Debugging MCP servers that communicate over standard input/output (stdio) can be challenging. We recommend using the MCP Inspector for easier debugging.

  1. Run the MCP Inspector:

    npm run inspector
  2. Access the debugging tools:

    The Inspector will provide a URL to access debugging tools in your web browser.

Visit More

View All