GNU General Public License v3.0
47
最近更新:1年前

Burp的MCP服务器

Burp Suite MCP 服务器扩展

概述

通过模型上下文协议(MCP)将Burp Suite与AI客户端集成。

有关协议详情请访问:modelcontextprotocol.io

功能特性

  • 通过MCP连接Burp Suite与AI客户端
  • 支持Claude Desktop自动安装配置
  • 内置Stdio MCP代理服务器

使用说明

  1. 在Burp Suite中安装本扩展
  2. 在扩展设置中配置Burp MCP服务器
  3. 配置MCP客户端连接Burp SSE MCP服务器或stdio代理
  4. 通过客户端与Burp进行交互!

安装指南

编译扩展

  1. 克隆仓库:获取MCP服务器扩展源码

    复制代码
    git clone https://github.com/PortSwigger/mcp-server.git
  2. 进入项目目录

    复制代码
    cd burp-mcp
  3. 构建JAR文件:使用Gradle编译

    复制代码
    ./gradlew embedProxyJar

    生成的JAR文件位于build/libs/burp-mcp-all.jar

加载到Burp Suite

  1. 启动Burp Suite
  2. 进入Extensions标签页
  3. 添加扩展:
    • 点击Add
    • 设置Extension TypeJava
    • 选择上一步生成的JAR文件
    • 点击Next加载扩展

配置说明

扩展配置

通过Burp Suite UI的MCP标签页进行配置:

  • 启用MCP服务器:勾选Enabled复选框
  • 启用配置编辑:勾选Enable tools that can edit your config
  • 高级选项:可配置MCP服务器的端口和主机(默认监听http://127.0.0.1:9876

Claude桌面客户端配置

  1. Claude Desktop当前仅支持STDIO MCP Servers
    Claude将启动指向Burp实例的代理服务器(默认端口localhost:9876

  2. 配置Claude连接Burp MCP服务器

    • 方案1:运行扩展安装程序(自动配置Claude Desktop)
    • 方案2:手动编辑配置文件
      修改~/Library/Application Support/Claude/claude_desktop_config.json
      json 复制代码
      {
        "mcpServers": {
          "burp": {
            "command": "<Burp内置Java执行路径>",
            "args": [
                "-jar",
                "/path/to/mcp/proxy/jar/mcp-proxy-all.jar",
                "--sse-url",
                "<扩展中配置的Burp MCP服务器URL>"
            ]
          }
        }
      }
  3. 重启Claude Desktop(需确保Burp已运行并加载扩展)

手动安装方案

直接使用SSE MCP服务器

在客户端配置中直接提供服务器URL(根据扩展配置可能需要包含/sse路径):

复制代码
http://127.0.0.1:9876

复制代码
http://127.0.0.1:9876/sse

使用Stdio MCP代理服务器

代理服务器源码:MCP Proxy Server

配置客户端使用代理服务器的命令参数:

复制代码
/path/to/packaged/burp/java -jar /path/to/proxy/jar/mcp-proxy-all.jar --sse-url http://127.0.0.1:9876

创建/修改工具

工具定义位于src/main/kotlin/net/portswigger/mcp/tools/Tools.kt。新建可序列化的数据类定义工具参数,工具名称自动从参数类派生。

扩展Paginated接口可添加自动分页支持。