Skip to main content
Glama
MCP-RQuest
by xxxbrian

mcp-请求

PyPI 版本 Python 版本 GitHub 星标 执照

模型上下文协议 (MCP) 服务器,为 Claude 和其他 LLM 提供高级 HTTP 请求功能。该服务器基于rquest构建,能够通过精确的 TLS/JA3/JA4 指纹实现逼真的浏览器模拟,使模型能够更自然地与网站交互,并绕过常见的反机器人措施。它还支持将 PDF 和 HTML 文档转换为 Markdown 格式,以便 LLM 更轻松地处理。

特征

  • 完整的 HTTP 方法:支持 GET、POST、PUT、DELETE、PATCH、HEAD、OPTIONS 和 TRACE

  • 浏览器指纹识别:准确的 TLS、JA3/JA4 和 HTTP/2 浏览器指纹

  • 内容处理:

    • 使用令牌计数自动处理大量响应

    • HTML 到 Markdown 的转换,以实现更好的 LLM 处理

    • 使用 Marker 库将 PDF 转换为 Markdown

    • 在系统临时目录中安全存储响应

  • 身份验证支持:基本、承载和自定义身份验证方法

  • 请求定制:

    • 标头、cookie、重定向

    • 表单数据、JSON 有效负载、multipart/form-data

    • 查询参数

  • SSL 安全:使用 BoringSSL 和真实的浏览器指纹进行安全连接

Related MCP server: URL Fetch MCP

可用工具

  • HTTP请求工具:

    • http_get - 使用可选参数执行 GET 请求

    • http_post通过 POST 请求提交数据

    • http_put - 使用 PUT 请求更新资源

    • http_delete - 使用 DELETE 请求删除资源

    • http_patch - 部分更新资源

    • http_head - 仅从资源中检索标头

    • http_options - 检索资源的选项

    • http_trace - 诊断请求跟踪

  • 响应处理工具:

    • get_stored_response - 检索存储的大型响应,可选按行范围

    • get_stored_response_with_markdown - 将 HTML 或 PDF 响应转换为 Markdown 格式,以便更好地进行 LLM 处理

    • get_model_state - 获取 PDF 模型加载过程的当前状态

    • restart_model_loading - 如果失败或卡住,则重新启动 PDF 模型加载过程

PDF 支持

mcp-rquest 现在支持 PDF 到 Markdown 的转换,允许您下载 PDF 文件并将其转换为 LLM 易于处理的 Markdown 格式:

  1. 自动 PDF 检测:根据内容类型自动检测 PDF 文件

  2. 无缝转换:相同的get_stored_response_with_markdown工具适用于 HTML 和 PDF 文件

  3. 高质量转换:使用Marker库进行精确的 PDF 到 Markdown 转换

  4. 优化性能:在包安装期间预先下载模型,以避免请求处理期间出现延迟

安装

使用 uv(推荐)

使用uv时无需特殊安装。我们将使用uvx直接运行mcp-rquest 。

使用 pip

或者,您可以通过 pip 安装mcp-rquest :

pip install mcp-rquest

安装后,您可以使用以下命令将其作为脚本运行:

python -m mcp_rquest

配置

为 Claude.app 配置

添加到您的 Claude 设置:

使用uvx :

{
  "mcpServers": {
    "http-rquest": {
      "command": "uvx",
      "args": ["mcp-rquest"]
    }
  }
}

使用pip :

{
  "mcpServers": {
    "http-rquest": {
      "command": "python",
      "args": ["-m", "mcp_rquest"]
    }
  }
}

使用pipx :

{
  "mcpServers": {
    "http-rquest": {
      "command": "pipx",
      "args": ["run", "mcp-rquest"]
    }
  }
}

浏览器模拟

mcp-rquest 利用 rquest 强大的浏览器模拟功能,提供逼真的浏览器指纹,帮助用户绕过机器人检测,访问通常只有标准浏览器才能访问的内容。支持的浏览器指纹包括:

  • Chrome(多个版本)

  • 火狐

  • Safari(包括 iOS 和 iPad 版本)

  • 边缘

  • OkHttp

这确保通过 mcp-rquest 发送的请求显示为合法的浏览器流量而不是机器人请求。

发展

设置开发环境

  1. 克隆存储库

  2. 使用 uv 创建虚拟环境:

    uv venv
  3. 激活虚拟环境:

    # Unix/macOS
    source .venv/bin/activate
    # Windows
    .venv\Scripts\activate
  4. 安装开发依赖项:

    uv pip install -e ".[dev]"

致谢

  • 该项目建立在rquest之上,它为高级 HTTP 客户端提供了浏览器指纹识别功能。

  • rquest 基于reqwest的一个分支。

Available Tools

12 tools
get_model_stateB

Get the current state of the PDF models(used by get_stored_response_with_markdown) loading process

Inputs: no named parameters.

get_stored_responseC

Retrieve a stored HTTP response by its ID

Inputs: response_id (required), end_line, start_line.

get_stored_response_with_markdownA

Retrieve a stored HTTP response by its ID and convert it to Markdown format. Supports HTML and PDF content types. (Converting large PDF to Markdown may cause timeout, just wait and try again.)

Inputs: response_id (required).

http_deleteC

Make an HTTP DELETE request to the specified URL

Inputs: url (required), auth, proxy, query, +7 more.

http_getC

Make an HTTP GET request to the specified URL

Inputs: url (required), auth, proxy, query, +7 more.

http_headC

Make an HTTP HEAD request to retrieve only headers from the specified URL

Inputs: url (required), auth, proxy, query, +7 more.

http_optionsC

Make an HTTP OPTIONS request to retrieve options for the specified URL

Inputs: url (required), auth, proxy, query, +7 more.

http_patchA

Make an HTTP PATCH request to the specified URL

Inputs: url (required), auth, body, form, +11 more.

http_postC

Make an HTTP POST request to the specified URL

Inputs: url (required), auth, body, form, +11 more.

http_putC

Make an HTTP PUT request to the specified URL

Inputs: url (required), auth, body, form, +11 more.

http_traceA

Make an HTTP TRACE request for diagnostic tracing of the specified URL

Inputs: url (required), auth, proxy, query, +7 more.

restart_model_loadingA

Restart the PDF models(used by get_stored_response_with_markdown) loading process if it failed or got stuck

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 12 tools

    Disambiguation4/5

    The HTTP method tools are clearly distinct, and the two stored response tools are differentiated by markdown conversion. However, get_stored_response and get_stored_response_with_markdown could be confused by an agent without careful reading, but descriptions mitigate ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern, with http_ prefix for HTTP methods and clear action words like get, restart, and retrieve. The naming is highly predictable and uniform.

    Tool Count5/5

    12 tools is well-scoped for an HTTP client with model management and stored response retrieval. Each tool has a clear purpose, and the count is neither sparse nor overwhelming.

    Completeness4/5

    The HTTP methods cover all standard request types, and stored response handling is present. Minor gaps include no tool to clear or list stored responses, and model state tools are limited to get and restart, but core functionality is complete.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that provides browser automation capabilities using BrowserCat's cloud browser service. This server enables LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment without needing to install browsers locally.
      7
      6
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server that enables Claude or other LLMs to fetch content from URLs, supporting HTML, JSON, text, and images with configurable request parameters.
      3
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that provides enhanced browser automation capabilities using Puppeteer-Extra with Stealth Plugin, enabling LLMs to interact with web pages in a way that better emulates human behavior and avoids detection as automation.
      3
      MIT