Sponsored by Deepsite.site

HAR MCP Server

Created By
tjamet7 months ago
A MCP server for parsing and analyzing HAR (HTTP Archive) files
Content

HAR MCP Server

A Model Context Protocol (MCP) server for parsing and analyzing HAR (HTTP Archive) files. This server allows AI assistants to inspect network traffic captured in HAR format, with built-in support for redacting sensitive authentication headers.

Features

  • Load HAR files from local filesystem or HTTP URLs
  • List all URLs and HTTP methods accessed in the HAR file
  • Query request IDs for specific URL and method combinations
  • Retrieve full request details with automatic redaction of authentication headers
  • Flexible HAR parsing that handles real-world HAR files with:
    • Float/decimal values for time fields (automatically rounded to integers)
    • Plain text or base64-encoded response content
    • Additional fields not present in the basic HAR spec
  • Support for standard HAR format as produced by browser developer tools

Installation

You can install this MCP server using your standard MCP configuration.

Add the following JSON block to your mcp configuration.

Using docker

{
  "mcp": {
    "servers": {
      "har": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "ghcr.io/tjamet/har-mcp"
        ]
      }
    }
  }
}

Using go run

Alternatively you can run thr server directly with go run.

{
  "mcpServers": {
    "github": {
      "command": "go",
      "args": [
        "run",
        "github.com/tjamet/har-mcp/cmd/har-mcp@main"
      ]
    }
  }
}

Build from source

If you don't have Docker, you can use go build to build the binary in the cmd/har-mcp directory, and use the github-mcp-server command. To specify the output location of the build, use the -o flag. You should configure your server to use the built executable as its command. For example:

{
  "mcp": {
    "servers": {
      "github": {
        "command": "/path/to/har-mcp-server"
      }
    }
  }
}

Usage

The HAR MCP server runs as a stdio-based MCP server, communicating via JSON-RPC over standard input/output.

Running the Server

./har-mcp

Available Tools

1. load_har

Load a HAR file from a file path or HTTP URL.

Parameters:

  • source (string, required): File path or HTTP URL to the HAR file

Example:

{
  "source": "/path/to/capture.har"
}

2. list_urls_methods

List all accessed URLs and their HTTP methods from the loaded HAR file.

Parameters: None

Returns: Array of URL/method combinations with their associated request IDs.

3. get_request_ids

Get all request IDs for a specific URL and HTTP method.

Parameters:

  • url (string, required): The URL to filter by
  • method (string, required): The HTTP method to filter by (GET, POST, etc.)

Example:

{
  "url": "https://api.example.com/users",
  "method": "GET"
}

4. get_request_details

Get full request details by request ID. Authentication headers will be automatically redacted.

Parameters:

  • request_id (string, required): The request ID to retrieve details for

Example:

{
  "request_id": "request_0"
}

Redacted Headers:

  • Authorization
  • X-API-Key
  • X-Auth-Token
  • Cookie
  • Set-Cookie
  • Proxy-Authorization

Integration with Claude Desktop

Add the following to your Claude Desktop configuration:

{
  "mcpServers": {
    "har-mcp": {
      "command": "/path/to/har-mcp"
    }
  }
}

Development

Running Tests

go test ./...

Project Structure

.
├── cmd/
│   └── har-mcp/       # Main application
│       └── main.go
├── pkg/
│   └── har/           # HAR parsing library
│       ├── parser.go
│       └── parser_test.go
├── go.mod
├── go.sum
└── README.md

Dependencies

License

[Add your license here]

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Playwright McpPlaywright MCP server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Serper MCP ServerA Serper MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
CursorThe AI Code Editor
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
ChatWiseThe second fastest AI chatbot™
Amap Maps高德地图官方 MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
DeepChatYour AI Partner on Desktop
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Tavily Mcp