MCP Server Integration
AgentQL Model Context Protocol (MCP) server integrates AgentQL's data extraction capabilities with AI-powered automation, enabling seamless retrieval of structured data from web pages. It enhances AI agents by providing real-time, context-aware access to the web, supporting use cases like market monitoring, research, and automation workflows.
Installation
To use AgentQL MCP Server to extract data from web pages, you need to install it via npm, get an API key, and configure it in your favorite app that supports MCP.
npm install -g agentql-mcp
Set up AgentQL with MCP
Configure Claude
- Open Claude Desktop Settings via
⌘
+,
(don't confuse with Claude Account Settings) - Go to Developer sidebar section
- Click Edit Config and open
claude_desktop_config.json
. - Add
agentql
server insidemcpServers
dictionary. - Restart the application.
{
"mcpServers": {
"agentql": {
"command": "npx",
"args": ["-y", "agentql-mcp"],
"env": {
"AGENTQL_API_KEY": "YOUR_API_KEY"
}
}
}
}
Read more about MCP configuration in Claude here.
Configure Cursor
- Open Cursor Settings.
- Navigate to MCP > MCP Servers.
- Click + Add new MCP Server.
- Enter the following:
- Name:
agentql
- Type:
command
- Command:
env AGENTQL_API_KEY=YOUR_API_KEY npx -y agentql-mcp
- Name:
Read more about MCP configuration in Cursor here.
Configure Windsurf
- Open Windsurf: MCP Configuration Panel.
- Click Add custom server+.
- Alternatively, open
~/.codeium/windsurf/mcp_config.json
directly. - Add
agentql
server insidemcpServers
dictionary.
{
"mcpServers": {
"agentql": {
"command": "npx",
"args": ["-y", "agentql-mcp"],
"env": {
"AGENTQL_API_KEY": "YOUR_API_KEY"
}
}
}
}
Read more about MCP configuration in Windsurf here.
Configure Goose
- Open Goose Desktop's Advanced Settings via the ... menu in the upper right corner of the interface.
- Select Add custom extension.
- Fill out the form:
- ID: agentql
- Name: AgentQL
- Description: Extract data from web pages
- Command:
npx -y agentql-mcp
- Under Environment Variables, add your AgentQL key using as "AGENTQL_API_KEY" as the variable name, and your key as its value.
- Add the custom extention and you're ready to go!
Read more about using custom extensions with Goose here.
Usage
Once configured, your AI agent can extract web data using AgentQL MCP tools. Use this prompt to test it out:
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: MCP is a new technology! If your agent complains about loading content from the web instead of using AgentQL, try adding "use tools" or "use agentql tool" in your prompt.
Here are some other examples:
- Get the social links from agentql.com
- Return the top international news articles from ground.news into a CSV
And, in our opinion AgentQL’s “killer usecase”—using Claude as a cookbook:
Get this recipe for me: https://www.justonecookbook.com/pressure-cooker-japanese-curry/
Development
AgentQL MCP server is opensource and open to contribution on GitHub.