home / mcp / agentql mcp server
Provides extraction capabilities by exposing a configurable MCP server that pulls structured data from web pages using AgentQL prompts.
Configuration
View docs{
"mcpServers": {
"tinyfish-io-agentql-mcp": {
"command": "npx",
"args": [
"-y",
"agentql-mcp"
],
"env": {
"AGENTQL_API_KEY": "YOUR_API_KEY"
}
}
}
}You can run an MCP server that exposes AgentQL’s web data extraction capabilities. This server lets you give it a URL and a description of the data you want, and it returns structured results that you can integrate into your apps and workflows.
You use this MCP server by connecting an MCP client to the AgentQL data extractor. Provide the URL you want to inspect and a prompt describing the fields you need. The server will return the extracted data in a structured form, which you can consume in your tooling, automation, or dashboards. Ensure you supply an API key for authentication so the server can access AgentQL’s capabilities.
Prerequisites you need before installation:
Step-by-step commands to install and run the MCP server locally:
# Install the MCP server globally
npm install -g agentql-mcpConfigure the client to recognize the AgentQL MCP server. Use the following example to add the server to Claude Desktop, VS Code, Cursor, and Windsurf configurations where you manage MCP servers.
`json title="claude_desktop_config.json"
{
"mcpServers": {
"agentql": {
"command": "npx",
"args": ["-y", "agentql-mcp"],
"env": {
"AGENTQL_API_KEY": "YOUR_API_KEY"
}
}
}
}To configure in VS Code for a one-click installation, you can use a prebuilt MCP config that passes your API key at runtime.
{
"mcpServers": {
"agentql": {
"command": "npx",
"args": ["-y", "agentql-mcp"],
"env": {
"AGENTQL_API_KEY": "${input:apiKey}"
}
}
}
}Manual installation in VS Code user settings is also supported. Add this block to your 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}"
}
}
}
}
}Cursor integration lets you add a dedicated MCP server entry that points to the AgentQL MCP runtime. Use the following fields when adding a new MCP server in Cursor.
Name: "agentql"
Type: "command"
Command: `env AGENTQL_API_KEY=YOUR_API_KEY npx -y agentql-mcpWindsurf integration mirrors the MCP configuration pattern. Add the AgentQL server under the mcpServers dictionary in Windsurf’s config.
{
"mcpServers": {
"agentql": {
"command": "npx",
"args": ["-y", "agentql-mcp"],
"env": {
"AGENTQL_API_KEY": "YOUR_API_KEY"
}
}
}
}If you need to develop or test locally, install dependencies and build the MCP server. Then run a development version as shown in your project setup.
npm install
```
```
npm run build
```
```
npm run inspectorExtract structured data from a given URL using a prompt that describes the data and fields to extract.