Sponsored by Deepsite.site

Screenshotmcp

Created By
UpNorthMedia5 months ago
A Model Context Protocol MCP server for capturing website screenshots with full page, element, and device size features.
Content

Installation

  1. Clone or download this project
  2. Move to the directory: cd /path/to/ScreenshotMCP
  3. rename .env.example to .env
  4. Install dependencies: npm install
  5. Start Server: npm start

Using with Claude Code

You can use Screenshot MCP directly within the Claude Code CLI or Claude Desktop to capture screenshots as part of your development workflow.

For Claude Code CLI: Add to your ~/.config/claude/mcp_servers.json:

{
  "screenshot-full-page-mcp": {
    "command": "node",
    "args": ["/path/to/screenshot-full-page-mcp/index.js"]
  }
}

or

claude mcp add screenshot-full-page-mcp node ./index.js

For Claude Desktop: Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "screenshot-full-page-mcp": {
      "command": "node",
      "args": ["/path/to/screenshot-full-page-mcp/index.js"]
    }
  }
}

Using with Cursor

You can use Screenshot MCP directly within the Cursor IDE to capture screenshots as part of your development workflow.

  1. Open Cursor.

  2. Go to Settings > MCP Servers.

  3. Add a new MCP server entry for Screenshot MCP:

    {
      "mcpServers": {
        "screenshot-full-page-mcp": {
          "command": "node",
          "args": ["/path/to/screenshot-full-page-mcp/index.js"]
        }
      }
    }
    
  4. Save your settings.

Usage

Once configured, you can use natural language commands with Claude Code:

Basic Screenshot

"Take a screenshot of https://example.com"

Mobile Screenshot

"Capture a mobile screenshot of https://myapp.com"

Custom Viewport

"Screenshot https://myapp.com at 1024x768 resolution"

Wait for Element

"Take a screenshot of https://example.com after the loading spinner disappears"

Element Screenshot

"Capture just the navigation bar from https://example.com"

Available Tools

capture_screenshot

Captures a full-page screenshot with advanced configuration options.

Parameters:

  • url (required): The webpage URL to screenshot
  • viewport: Viewport configuration
    • preset: Device preset (mobile, tablet, desktop)
    • width: Custom width in pixels (100-5000)
    • height: Custom height in pixels (100-5000)
    • deviceScaleFactor: Scale factor (0.1-3)
    • isMobile: Mobile device emulation
    • hasTouch: Touch support emulation
  • waitFor: Wait conditions
    • type: selector, function, timeout, or networkidle
    • value: CSS selector, function, or timeout value
    • timeout: Wait timeout in milliseconds
  • delay: Additional delay before screenshot
  • waitUntil: Navigation completion condition

capture_element

Captures a screenshot of a specific page element.

Parameters:

  • url (required): The webpage URL
  • selector (required): CSS selector for the target element
  • viewport: Viewport configuration (same as above)

list_device_presets

Lists all available device presets with their configurations.

Device Presets

PresetWidthHeightScaleMobileTouch
mobile375px667px2xYesYes
tablet768px1024px2xYesYes
desktop1920px1080px1xNoNo

Configuration

Environment variables can be set in the .env file:

# Browser Configuration
BROWSER_HEADLESS=true
BROWSER_TIMEOUT=30000
MAX_CONCURRENT_SCREENSHOTS=5

# Screenshot Defaults
DEFAULT_VIEWPORT_WIDTH=1920
DEFAULT_VIEWPORT_HEIGHT=1080
DEFAULT_WAIT_TIMEOUT=10000

# Security
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_WINDOW=60000

# Debug
DEBUG=false
LOG_LEVEL=info

Security Features

  • URL validation (HTTP/HTTPS only)
  • CSS selector sanitization
  • Rate limiting for concurrent requests
  • Sandboxed browser execution
  • Input validation and error handling

System Requirements

  • Node.js 18+
  • Chrome/Chromium browser (installed automatically with Puppeteer)
  • Minimum 2GB RAM
  • 500MB disk space

Troubleshooting

Common Issues

  1. Browser launch fails:

    • Ensure sufficient system resources
    • Check if Chrome/Chromium is properly installed
    • Try setting BROWSER_HEADLESS=false for debugging
  2. Screenshot timeout:

    • Increase BROWSER_TIMEOUT in .env
    • Check if the target website loads properly
    • Use appropriate waitUntil conditions
  3. Memory issues:

    • Reduce MAX_CONCURRENT_SCREENSHOTS
    • Restart the MCP server periodically
    • Monitor system memory usage

Debug Mode

Enable debug mode by setting DEBUG=true in .env file for detailed logging.

Server Config

{
  "mcpServers": {
    "screenshot-full-page-mcp": {
      "command": "node",
      "args": [
        "/path/to/screenshot-full-page-mcp/index.js"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
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"
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Serper MCP ServerA Serper MCP Server
Amap Maps高德地图官方 MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
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.
WindsurfThe new purpose-built IDE to harness magic
DeepChatYour AI Partner on Desktop
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.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Tavily Mcp
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
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.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.