Screenshot Server MCP server

Captures web page screenshots using TypeScript and Puppeteer, enabling automated visual content processing for web testing, archiving, and data collection.
Back to servers
Provider
Seth Bang
Release date
Dec 31, 2024
Language
TypeScript
Stats
9 stars

The MCP Screenshot Server provides screenshot functionality using Puppeteer, allowing you to capture screenshots of web pages and local HTML files through a simple MCP tool interface. It's designed to be easy to use while offering customizable options for your screenshot needs.

Installation

To install the MCP Screenshot Server, simply run the following command:

npm install

Usage

The server provides a take_screenshot tool that you can use to capture screenshots with various configuration options.

Screenshot Options

The take_screenshot tool accepts the following parameters:

{
  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)
}

Basic Usage

To capture a screenshot of a website with default settings:

// Example of taking a screenshot with minimal options
{
  url: "https://example.com"
}

Advanced Configuration

You can customize the screenshot dimensions and other options:

// Example with full configuration
{
  url: "https://example.com",
  width: 1920,
  height: 1080,
  fullPage: true,
  outputPath: "/path/to/save/screenshot.png"
}

Capturing Local HTML Files

To capture a screenshot of a local HTML file, use the file:// protocol:

{
  url: "file:///path/to/local/file.html",
  width: 1280,
  height: 800
}

Output Management

If you don't specify an outputPath, the server will automatically manage a screenshot directory for you, organizing the captured images with appropriate filenames.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later