Implementing AgentQL Model Context Protocol (MCP) server

AgentQl allows you to scratch any website by defining the exact shape of the information you want. It gives you consistent structured results, even from pages with dynamic content or frequently changing layouts.
In this tutorial, we will implement the AgentQl MCP server within the Claude desktop and use Claude’s built-in visualization to explore the data. Specifically, we will scratch the Amazon search results page for AI books and extract details like price, ratings, and review counts.
Step 1: Set up the dependency
Node JS
We need NPX to run node.js AgentQl Server.
- Download the latest version of node.js from nodejs.org
- Run the installer.
- Leave all settings as default settings and complete installation
Claude Desktop
Download Claude to use
AgentQl API
Create the AgentQl API key on dev.agentql.com/api-keys and store it securely – you will need it in this tutorial.
Step 2: Install the software package
After installing Node.js, open the terminal and run the following command:
npm install -g agentql-mcp
Step 3: Configure the MCP server
Next, configure Claude to connect to your MCP server. Open claude_desktop_config.json Use any text editor that is located in the Claude installation directory. If the file does not exist, you can create it manually. Once opened, enter the following code:
{
"mcpServers": {
"agentql": {
"command": "npx",
"args": ["-y", "agentql-mcp"],
"env": {
"AGENTQL_API_KEY": ""
}
}
}
}
replace
Step 4: Run the server
After the MCP configuration is complete, your server should appear in Claude. AgentQL Server includes a powerful tool – extract_web_data-, which provides URL and natural language descriptions of the data structure to be extracted.
You can use any URL you want to scratch. In this tutorial, I used an AI book on an AMAZON search result page and asked Claude to visualize the extracted data. Claude provides an interactive terminal where it generates code to process and visualize data – which you can edit as you want. After the code is over, Claude provides a bar chart with interactive options to explore price, ratings, review counts, and even price vs. rating scatter plots, as well as key summary statistics.
AgentQl can be used to scratch websites, which we can connect with other servers such as Intion or github to automatically send structured data for documentation, tracking or further automation.
This makes AgentQl a powerful tool for turning unstructured web content into actionable insights – all in a simple natural language workflow.
Here is a brief overview of what we built in Marktechpost:

I am a civil engineering graduate in Islamic Islam in Jamia Milia New Delhi (2022) and I am very interested in data science, especially neural networks and their applications in various fields.