loaditout.ai
SkillsPacksTrendingLeaderboardAPI DocsBlogSubmitRequestsCompareAgentsXPrivacyDisclaimer
{}loaditout.ai
Skills & MCPPacksBlog

http_mcp

MCP Tool

ryanInf/http_mcp

基于 FastMCP 的安全 HTTP 请求工具,支持原始报文发送、安全控制、HTTP 代理与文件上传。A secure MCP tool for sending raw HTTP/1.1 requests with built-in security controls and proxy support.

Install

$ npx loaditout add ryanInf/http_mcp

Platform-specific configuration:

.claude/settings.json
{
  "mcpServers": {
    "http_mcp": {
      "command": "npx",
      "args": [
        "-y",
        "http_mcp"
      ]
    }
  }
}

Add the config above to .claude/settings.json under the mcpServers key.

About

HTTP MCP - HTTP 请求工具

发送 HTTP/1.1 请求的 MCP 工具,带有安全控制。

基于 FastMCP 构建。

适用于Web渗透测试、调试。

README_EN

功能特性
  • 支持 HTTP/1.1 协议(暂不支持HTTP/2)
  • 支持原始 HTTP 请求报文解析
  • 安全控制:
  • 域名白名单/黑名单
  • 私有 IP 访问控制
  • 请求/响应大小限制
  • SSL 证书验证控制
  • HTTP 方法限制
  • HTTP 代理支持
  • HTML 标签自动去除(缩短上下文,默认开启)
  • 自定义 Host 头和 Content-Length
MCP 工具
http_send_request

发送原始 HTTP 请求报文。

参数:

| 参数 | 类型 | 默认值 | 说明 | |------|------|--------|------| | content | string | 必需 | 原始 HTTP 请求报文| | baseurl | string | 必需 | 完整 URL,如 https://example.com | | timeout | number | 30 | 超时时间(秒) | | strip_html | boolean | true | 去除响应中的 HTML 标签 | | allow_custom_host | boolean | false | 允许自定义 Host 头 | | allow_custom_content_length | boolean | false | 允许自定义 Content-Length |

原始请求报文格式:

POST /api/users HTTP/1.1
Host: example.com
Content-Type: application/json
User-Agent: Mozilla/5.0

{"name": "test", "value": 123}

使用示例:

# 1. 简单请求
http_send_request(
    content="GET / HTTP/1.1\r\nHost: example.com\r\n\r\n",
    baseurl="https://example.com"
)

# 2. 指定目标服务器
http_send_request(
    content="GET /api HTTP/1.1\r\nHost: example.com\r\n\r\n",
    baseurl="https://api.server.com"
)

# 3. 自定义 Host 头(用于测试 CDN 或虚拟主机)
http_send_request(
    content="GET / HTTP/1.1\r\nHost: custom-host.com\r\n\r\n",
    baseurl="https://example.com",
    allow_custom_host=True
)

# 4. 保留 HTML 标签
http_send_request(
    content="GET /page HTTP/1.1\r\nHost: example.com\r\n\r\n",
    baseurl="https://example.com",
    strip_html=False
)


**注意:** 当使用 `allow_custom_host=True` 时:
- `baseurl` 指定实际连接的服务器
- HTTP 请求头中的 `Host` 使用原始请求中的值
- 如果目标服务器不认识自定义的 Host 头,会返回错误

### http_build_request

从方法、URL、头部和请求体构建原始 HTTP 请求报文。

**参数:**
- `method` (必需): HTTP 方法
- `url` (必需): 完整 URL
- `headers`: 请求头对象
- `body`: 请求体

## 安全提示

⚠️ **默认配置风险说明**:
- `allow_private_ips: true`:默认允许访问内网IP地址,在不可信环境中使用存在SSRF攻击风险,生产环境建议设置为`false`
- `verify_ssl: false`:默认不验证SSL证书,存在中间人攻击风险,生产环境建议设置为`true`
- `follow_redirects: false`:默认不自动跟随重定向,

Tags

mcp-server

Reviews

Loading reviews...

Quality Signals

1
Stars
0
Installs
Last updated23 days ago
Security: AREADME

Safety

Risk Levelmedium
Data Access
read
Network Accessnone

Details

Sourcegithub-crawl
Last commit3/26/2026
View on GitHub→

Embed Badge

[![Loaditout](https://loaditout.ai/api/badge/ryanInf/http_mcp)](https://loaditout.ai/skills/ryanInf/http_mcp)