npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mcp-ios-simulator-screenshot

v1.1.0

Published

MCP server to capture iOS Simulator screenshots

Readme

MCP iOS Simulator Screenshot

A server that captures screenshots from iOS Simulator using the Model Context Protocol (MCP).

Overview

This project implements an MCP protocol server that captures the current screen of the iOS Simulator and saves it to a specified directory.

Setup

Cline and Roo Code

For Cline and Roo Code, the basic format is:

{
  "mcpServers": {
    "mcp-ios-simulator-screenshot": {
      "command": "npx",
      "args": ["-y", "mcp-ios-simulator-screenshot"]
    }
  }
}

If you clone the repository, you can use the following configuration:

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

Cursor, Claude Desktop

For Cursor and Claude Desktop, you need to specify the --output-dir and the output directory:

{
  "mcpServers": {
    "mcp-ios-simulator-screenshot": {
      "command": "npx",
      "args": [
        "mcp-ios-simulator-screenshot",
        "--output-dir",
        "/path/to/your/output/directory"
      ]
    }
  }
}

MCP Tool Parameters

get_screenshot

Captures a screenshot from iOS Simulator and saves it to the specified directory.

| Parameter | Type | Description | Default Value | | --------------------- | ------- | ----------------------------------------------------- | ------------- | | output_filename | string | Output filename | timestamp.png | | output_directory_name | string | Subdirectory name for screenshots | .screenshots | | resize | boolean | Whether to resize the image to approximately VGA size | true | | max_width | integer | Maximum width for resizing (pixels) | 640 | | device_id | string | Specify a simulator device | booted device |

Output Format

On success:

{
  "success": true,
  "message": "iOS Simulator screenshot saved successfully",
  "filePath": ".screenshots/simulator_2025-04-10T16-51-16-755Z.png",
  "metadata": {
    "width": 1170,
    "height": 2532,
    "format": "png",
    "size": 382946,
    "timestamp": "2025-04-10T16:51:16.755Z"
  },
  "serverConfig": {
    "commandLineArgs": {
      "outputDir": "/Users/username/Desktop" // Only included when --output-dir is specified
    }
  }
}

Note: The serverConfig.commandLineArgs.outputDir field is only included in the response when the --output-dir parameter is specified when starting the server.

{
  "success": false,
  "message": "Error capturing iOS Simulator screenshot: [error message]",
  "error": {
    "code": "ENOENT",
    "command": "xcrun simctl io booted screenshot --type=png -",
    "stderr": "No matching devices found."
  }
}

Troubleshooting

  • If you cannot capture screenshots:

    • Check if iOS Simulator is running
    • Check if Xcode Command Line Tools are installed
    • Check if the xcrun simctl io booted screenshot command can be executed directly
  • If permission errors occur:

    • Check if you have write permissions for the output directory

Requirements

  • Node.js 16.0.0 or higher
  • macOS (iOS Simulator required)
  • Xcode Command Line Tools

Technology Stack

  • TypeScript
  • Node.js
  • MCP SDK (@modelcontextprotocol/sdk)

License

MIT

Other Languages