screenshot-mcp

screenshot-mcp

Enables AI assistants to take screenshots of localhost development servers for visual verification of UI changes, reducing manual debugging cycles.

Category
Visit Server

README

Screenshot MCP Server

Give your AI coding assistant eyes to see your UI changes in real-time.

This MCP server bridges the gap between AI code generation and visual verification. Instead of describing what your UI looks like, your AI can actually see it by taking screenshots of your localhost development server.

The Problem

When working with AI assistants on frontend code:

  • You describe layout issues, AI guesses solutions
  • AI makes changes, you manually check if they worked
  • Endless back-and-forth describing visual problems
  • AI can't understand spatial relationships from code alone

The Solution

  • AI sees your UI directly - Takes screenshots of localhost servers
  • Visual verification - AI confirms changes worked as intended
  • Spatial awareness - AI understands layout, alignment, and positioning
  • Faster iterations - Immediate visual feedback reduces debugging cycles

Example (Claude Code)

Here's a basic example of me using Claude Code where I needed to center a button (LLM's don't do well at grasping spatial awareness from text only)!

2EBEB0E7-FF73-41BC-99FB-83C3BB0E846D

As you can see from the text, the model makes the changes then screenshots the page after the change to verify that it had the intended effect. This can drastically reduce manual effort when coding with LLM's.

Features

  • Localhost-only: Secure screenshot capture limited to localhost URLs
  • Flexible viewport: Configurable width, height, and full-page capture
  • MCP integration: Works with MCP clients like Claude Code and Claude Desktop
  • Playwright-powered: Reliable browser automation with Chromium

Installation

git clone https://github.com/BradyDouthit/screenshot-mcp.git
cd screenshot-mcp
npm install
npm run build

Usage

This MCP server is completely generic and works with any MCP-compatible client including:

  • Claude Code - Anthropic's official CLI tool
  • Gemini CLI - Google's command line interface
  • Claude Desktop - Anthropic's desktop application
  • Any other MCP client - The server follows standard MCP protocol

With Claude Code

Add the MCP server to Claude Code:

claude mcp add screenshot-mcp -- /path/to/screenshot-mcp/dist/index.js

Note: The index.js file must be executable. If not, run chmod +x /path/to/screenshot-mcp/dist/index.js

Alternatively, you can add it to your settings.json file:

{
 // ..other parts of your settings
  "mcpServers": {
    "screenshot-mcp": {
      "type": "stdio",
        "command": "/path/to/screenshot-mcp/dist/index.js",
        "args": [],
        "env": {}
    }
  }
}

Manual Testing

# Test with MCP inspector
npx @modelcontextprotocol/inspector node dist/index.js

# Test basic functionality
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node dist/index.js

Screenshot Tool

The server provides a screenshot tool with the following parameters:

Basic Parameters

  • url (required): Localhost URL to capture (e.g., http://localhost:3000)
  • width (optional): Viewport width in pixels (default: 1280)
  • height (optional): Viewport height in pixels (default: 720)
  • fullPage (optional): Capture full page scroll (default: false)

Interactive Actions

  • actions (optional): Array of actions to perform before taking the screenshot

Supported Actions

Click Action

{
  "type": "click",
  "selector": "#submit-button",
  "timeout": 5000
}

Type Action

{
  "type": "type",
  "selector": "input[name='email']",
  "value": "test@example.com",
  "timeout": 5000
}

Wait Action

{
  "type": "wait",
  "timeout": 3000
}

Scroll Action

{
  "type": "scroll",
  "selector": ".scroll-container",
  "timeout": 2000
}

Or scroll by amount:

{
  "type": "scroll",
  "value": "500",
  "timeout": 2000
}

Hover Action

{
  "type": "hover",
  "selector": ".menu-item",
  "timeout": 2000
}

Selector Types

  • CSS Selectors: #id, .class, [attribute], tag
  • Text Selectors: text=Click Me (exact text match)

Example with Actions

{
  "url": "http://localhost:3000",
  "width": 1920,
  "height": 1080,
  "actions": [
    {
      "type": "click",
      "selector": "#menu-toggle"
    },
    {
      "type": "wait",
      "timeout": 500
    },
    {
      "type": "type",
      "selector": "input[name='search']",
      "value": "test query"
    },
    {
      "type": "click",
      "selector": "text=Search"
    }
  ]
}

Security

  • Only localhost URLs are allowed for security
  • No external network access
  • Browser runs in sandboxed mode

Requirements

  • Node.js 18+
  • Chromium (auto-installed via Playwright)

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured