by tinyfish-io
Extract structured data from any web page by invoking AgentQL's extraction tool through a Model Context Protocol server, enabling AI assistants to retrieve and format web information on demand.
AgentQL MCP provides a Model Context Protocol server that wraps AgentQL's extract-web-data
tool. It lets AI agents call a single command to fetch and structure data from URLs based on a user‑provided prompt describing the desired fields.
npm install -g agentql-mcp
.npx
command and the API key environment variable.extract-web-data
tool from the agent, passing a URL and a prompt that defines the data schema.extract-web-data
: extracts structured data from a URL using a natural‑language description.npm run watch
) for development.Q: Which environment variable holds the API key?
A: AGENTQL_API_KEY
.
Q: Can I run the server without installing globally?
A: Yes, use npx -y agentql-mcp
in the MCP server config.
Q: What format does the tool return? A: JSON with fields matching the prompt description; agents can format it further (e.g., markdown tables).
Q: How do I debug communication issues?
A: Run npm run inspector
to launch the MCP Inspector UI.
Q: Do I need to rebuild after code changes?
A: Use npm run watch
for automatic rebuild during development.
This is a Model Context Protocol (MCP) server that integrates AgentQL's data extraction capabilities.
extract-web-data
- extract structured data from a given 'url', using 'prompt' as a description of actual data and its fields to extract.To use AgentQL MCP Server to extract data from web pages, you need to install it via npm, get an API key from our Dev Portal, and configure it in your favorite app that supports MCP.
npm install -g agentql-mcp
⌘
+,
(don't confuse with Claude Account Settings)claude_desktop_config.json
fileagentql
server inside mcpServers
dictionary in the config file{
"mcpServers": {
"agentql": {
"command": "npx",
"args": ["-y", "agentql-mcp"],
"env": {
"AGENTQL_API_KEY": "YOUR_API_KEY"
}
}
}
}
Read more about MCP configuration in Claude here.
For one-click installation, click one of the install buttons below:
Click the install buttons at the top of this section for the quickest installation method. For manual installation, follow these steps:
Add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P
and typing Preferences: Open User Settings (JSON)
.
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "apiKey",
"description": "AgentQL API Key",
"password": true
}
],
"servers": {
"agentql": {
"command": "npx",
"args": ["-y", "agentql-mcp"],
"env": {
"AGENTQL_API_KEY": "${input:apiKey}"
}
}
}
}
}
Optionally, you can add it to a file called .vscode/mcp.json
in your workspace. This will allow you to share the configuration with others.
{
"inputs": [
{
"type": "promptString",
"id": "apiKey",
"description": "AgentQL API Key",
"password": true
}
],
"servers": {
"agentql": {
"command": "npx",
"args": ["-y", "agentql-mcp"],
"env": {
"AGENTQL_API_KEY": "${input:apiKey}"
}
}
}
}
env AGENTQL_API_KEY=YOUR_API_KEY npx -y agentql-mcp
Read more about MCP configuration in Cursor here.
~/.codeium/windsurf/mcp_config.json
directlyagentql
server inside mcpServers
dictionary in the config file{
"mcpServers": {
"agentql": {
"command": "npx",
"args": ["-y", "agentql-mcp"],
"env": {
"AGENTQL_API_KEY": "YOUR_API_KEY"
}
}
}
}
Read more about MCP configuration in Windsurf here.
Give your agent a task that will require extracting data from the web. 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] In case your agent complains that it can't open urls or load content from the web instead of using AgentQL, try adding "use tools" or "use agentql tool" hint.
Install dependencies:
npm install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
If you want to try out development version, you can use the following config instead of the default one:
{
"mcpServers": {
"agentql": {
"command": "/path/to/agentql-mcp/dist/index.js",
"env": {
"AGENTQL_API_KEY": "YOUR_API_KEY"
}
}
}
}
[!NOTE] Don't forget to remove the default AgentQL MCP server config to not confuse Claude with two similar servers.
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "agentql": { "command": "npx", "args": [ "-y", "agentql-mcp" ], "env": { "AGENTQL_API_KEY": "<YOUR_API_KEY>" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
A Model Context Protocol server that provides web content fetching capabilities.
by microsoft
Provides fast, lightweight browser automation using Playwright's accessibility tree, enabling LLMs to interact with web pages through structured snapshots instead of screenshots.
by firecrawl
Provides powerful web scraping capabilities for LLM clients such as Cursor, Claude, and others, enabling content extraction, crawling, search, and batch processing through a Model Context Protocol server.
by zcaceres
Fetches web content and returns it in HTML, JSON, plain‑text, or Markdown formats, optionally applying custom request headers.
by cyberchitta
Fetches HTML or markdown from bot‑protected websites, delivering plain‑text content that AI assistants can process.
by xxxbrian
Provides realistic browser-like HTTP request capabilities with accurate TLS/JA3/JA4 fingerprints, enabling LLMs to bypass anti-bot measures and retrieve web content, plus conversion of PDF and HTML to Markdown for easier LLM processing.
by djannot
Scrape webpages and convert them to well‑formatted markdown, automatically handling cookies, captchas, paywalls and other interactive elements using AI‑driven vision analysis.
by Dumpling-AI
Provides comprehensive MCP services that integrate Dumpling AI’s data APIs, web scraping, document conversion, AI agents, knowledge‑base management, and secure JavaScript/Python execution.
by webscraping-ai
Provides Model Context Protocol tools for extracting, rendering, and querying web page content via WebScraping.AI services.