Enable AI agents to get structured data from unstructured web with AgentQL.
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.
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.Integrating AgentQL MCP Server into your LLM workflow is straightforward. Follow these steps to unlock its potential:
Install the AgentQL MCP Server globally:
npm install -g agentql-mcp
Configure your LLM application:
The configuration process varies depending on the LLM application you're using. Below are detailed instructions for popular platforms:
Open Claude Desktop Settings using ⌘
+ ,
.
Navigate to the Developer section in the sidebar.
Click Edit Config to open the claude_desktop_config.json
file.
Add the agentql
server configuration within the mcpServers
dictionary:
{ "mcpServers": { "agentql": { "command": "npx", "args": ["-y", "agentql-mcp"], "env": { "AGENTQL_API_KEY": "YOUR_API_KEY" } } } }
Restart the Claude application.
Refer to the official Claude documentation for more information on MCP configuration: Model Context Protocol Quickstart.
Open Cursor Settings.
Go to MCP > MCP Servers.
Click + Add new MCP Server.
Enter the following details:
agentql
(or your preferred name)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.
Open the Windsurf: MCP Configuration Panel.
Click Add custom server+.
Alternatively, you can directly edit the ~/.codeium/windsurf/mcp_config.json
file.
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.
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."
For developers looking to contribute or customize the AgentQL MCP Server, follow these steps:
Install dependencies:
npm install
Build the server:
npm run build
Enable auto-rebuild during development:
npm run watch
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 MCP servers that communicate over standard input/output (stdio) can be challenging. We recommend using the MCP Inspector for easier debugging.
Run the MCP Inspector:
npm run inspector
Access the debugging tools:
The Inspector will provide a URL to access debugging tools in your web browser.
🐍 🏠 Generate visualizations from fetched data using the VegaLite format and renderer.
🐍 ☁️ A mcp server that bridges Dune Analytics data to AI agents.
🐍 ☁️ An MCP server for real-time Fantasy Premier League data and analysis tools.
🎖️ 🐍 🏠 ☁️ Search dashboards, investigate incidents and query datasources in your Grafana instance