AgentQL-MCP数据提取器

@tinyfish-io/agentql-mcp
0 Stars 523 次浏览 tinyfish-io 更新于 2026-08-23

一种提供 AgentQL 数据提取功能的服务器,使人工智能代理能够从非结构化网络中获取结构化数据。

该服务暂未提供标准配置,请参考 README 手动接入

可用工具 (1 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

extract-web-data 2 个参数 需填 2 项

Extracts structured data as JSON from a web page given a URL using a Natural Language description of the data.

必填参数:url、prompt

服务介绍

AgentQL MCP 服务器

这是一个集成了AgentQL数据提取能力的模型上下文协议(MCP)服务器。

功能

工具

  • extract-web-data - 使用'prompt'作为实际数据及其字段的描述,从给定的'url'中提取结构化数据。

安装

要使用AgentQL MCP服务器从网页中提取数据,您需要通过npm安装它,从我们的开发者门户获取API密钥,并在支持MCP的应用程序中进行配置。

安装包

npm install -g agentql-mcp

配置Claude

  • 通过 +, 打开Claude桌面设置(不要与Claude账户设置混淆)
  • 转到开发者侧边栏部分
  • 点击编辑配置并打开claude_desktop_config.json文件
  • 在配置文件内的mcpServers字典中添加agentql服务器
  • 重启应用
{
  "mcpServers": {
    "agentql": {
      "command": "npx",
      "args": ["-y", "agentql-mcp"],
      "env": {
        "AGENTQL_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

更多关于Claude中MCP配置的信息,请参阅这里

配置Cursor

  • 打开Cursor 设置
  • 转到 MCP > MCP Servers
  • 点击 + 添加新的MCP服务器
  • 输入以下信息:
    • 名称: "agentql" (或你喜欢的名字)
    • 类型: "command"
    • 命令: env AGENTQL_API_KEY=YOUR_API_KEY npx -y agentql-mcp

更多关于Cursor中MCP配置的信息,请参阅这里

配置Windsurf

  • 打开Windsurf: MCP配置面板
  • 点击添加自定义服务器+
  • 或者你可以直接打开~/.codeium/windsurf/mcp_config.json
  • 在配置文件内的mcpServers字典中添加agentql服务器
{
  "mcpServers": {
    "agentql": {
      "command": "npx",
      "args": ["-y", "agentql-mcp"],
      "env": {
        "AGENTQL_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

更多关于Windsurf中MCP配置的信息,请参阅这里

验证MCP集成

给您的代理一个需要从网络上提取数据的任务。例如:

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]
如果您的代理抱怨无法打开url或加载网络内容而不是使用AgentQL,尝试添加“use tools”或“use agentql tool”的提示。

开发

安装依赖项:

npm install

构建服务器:

npm run build

对于带有自动重建的开发:

npm run watch

如果你想尝试开发版本,可以使用以下配置代替默认配置:

{
  "mcpServers": {
    "agentql": {
      "command": "/path/to/agentql-mcp/dist/index.js",
      "env": {
        "AGENTQL_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

[!NOTE]
不要忘记删除默认的AgentQL MCP服务器配置,以免Claude因两个相似的服务器而感到困惑。

调试

由于MCP服务器通过stdio通信,调试可能会很困难。我们建议使用MCP Inspector,它作为一个包脚本提供:

npm run inspector

Inspector将提供一个URL,在浏览器中访问调试工具。

相关 MCP 服务