MCP File Preview MCP Server

MCP server for previewing local HTML files and capturing screenshots

Local serverstdioTypeScript

What is the MCP File Preview MCP server?

MCP server for previewing local HTML files and capturing screenshots. Exposed over MCP by the mcp file preview mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

A Model Context Protocol (MCP) server that provides HTML file preview and analysis capabilities. This server enables capturing full-page screenshots of local HTML files and analyzing their structure.

  • File Preview — Capture full-page screenshots of HTML files with proper CSS styling
  • Content Analysis — Analyze HTML structure (headings, paragraphs, images, links)
  • Local File Support — Handle local file paths and resources
  • Screenshot Management — Save screenshots to a dedicated directory

Its toolset

Everything the assistant can do here goes through one of these:

  • preview_file — Captures a screenshot and returns HTML content: typescript <use_mcp_tool> <server_name>file-preview</server_name> <tool_name>preview_file</tool_name>
  • analyze_content — Analyzes HTML structure: typescript <use_mcp_tool> <server_name>file-preview</server_name> <tool_name>analyze_content</tool_name> {

Adding it to your client

@modelcontextprotocol/inspector on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

When to reach for it

Plenty of browser automation servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. MCP File Preview's toolset — preview_file, analyze_content — is a fair guide to whether it matches your workflow. It is maintained by seanivore; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the mcp file preview mcp server does with a few real requests.

Available tools

ToolWhat it does
preview_fileCaptures a screenshot and returns HTML content: typescript <use_mcp_tool> <server_name>file-preview</server_name> <tool_name>preview_file</tool_name> <arguments> { "filePath": "/path/to/file.html", "width": 1024, // opti
analyze_contentAnalyzes HTML structure: typescript <use_mcp_tool> <server_name>file-preview</server_name> <tool_name>analyze_content</tool_name> <arguments> { "filePath": "/path/to/file.html" } </arguments> </use_mcp_tool>

How to install the MCP File Preview MCP server

{
  "mcpServers": {
    "file-preview": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/inspector"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • Use MCP File Preview to preview file.
  • Use MCP File Preview to analyze content.

Frequently asked questions

It connects MCP File Preview to MCP-compatible AI assistants such as Claude and Cursor, exposing 2 tools (preview_file, analyze_content) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP File Preview directly.