AgentQL MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
This is a Model Context Protocol (MCP) server that integrates AgentQL's data extraction capabilities.
Features
Tools
- extract-web-data - extract structured data from a given 'url', using 'prompt' as a description of actual data and its fields to extract.
Installation
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.
Install the package
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 file
- Add agentql server inside mcpServers dictionary in the config file
- Restart the app
Read more about MCP configuration in Claude here.
Configure VS Code
For one-click installation, click one of the install buttons below:
Manual Installation
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).
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.
Configure Cursor
- Open **Cursor Settings**
- Go to **MCP > MCP Servers**
- Click **+ Add new MCP Server**
- Enter the following:
- Name: "agentql" (or your preferred name)
- Type: "command"
- Command: env AGENTQL_API_KEY=YOUR_API_KEY npx -y agentql-mcp
Read more about MCP configuration in Cursor here.
Configure Windsurf
- Open **Windsurf: MCP Configuration Panel**
- Click **Add custom server+**
- Alternatively you can open ~/.codeium/windsurf/mcp_config.json directly
- Add agentql server inside mcpServers dictionary in the config file
Read more about MCP configuration in Windsurf here.
Validate MCP integration
Give your agent a task that will require extracting data from the web. For example:
> [!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.
Development
Install dependencies:
Build the server: