mcp screenshot server

Local 2025-08-31 23:50:46 0

Enables capturing screenshots of web pages and local HTML files through a simple MCP tool interface using Puppeteer with configurable options for dimensions and output paths.


An MCP server implementation that provides screenshot functionality using Puppeteer. This server allows capturing screenshots of web pages and local HTML files through a simple MCP tool interface.

Features

  • Capture screenshots of any web page or local HTML file
  • Configurable viewport dimensions
  • Full page screenshot support
  • Custom output path option
  • Automatic screenshot directory management

Installation

npm install

Usage

The server provides a take_screenshot tool with the following options:

{
  url: string;         // URL to capture (can be http://, https://, or file:///)
  width?: number;      // Viewport width in pixels (1-3840)
  height?: number;     // Viewport height in pixels (1-2160)
  fullPage?: boolean;  // Capture full scrollable page
  outputPath?: string; // Custom output path (optional)
}

Development

# Build the project
npm run build

# Run the MCP inspector for testing
npm run inspector

License

MIT

[
  {
    "description": "Capture a screenshot of any web page or local GUI",
    "inputSchema": {
      "properties": {
        "fullPage": {
          "description": "Capture full scrollable page",
          "type": "boolean"
        },
        "height": {
          "description": "Viewport height in pixels",
          "maximum": 2160,
          "minimum": 1,
          "type": "number"
        },
        "outputPath": {
          "description": "Custom output path (optional)",
          "type": "string"
        },
        "url": {
          "description": "URL to capture (can be http://, https://, or file:///)",
          "type": "string"
        },
        "width": {
          "description": "Viewport width in pixels",
          "maximum": 3840,
          "minimum": 1,
          "type": "number"
        }
      },
      "required": [
        "url"
      ],
      "type": "object"
    },
    "name": "take_screenshot"
  }
]