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 🙏

© 2026 – Pkg Stats / Ryan Hefner

codex-mcp-screenshot

v0.1.1

Published

Codex MCP server and CLI for capturing macOS app screenshots

Readme

codex-mcp-screenshot

A macOS-only Model Context Protocol (MCP) server and CLI that captures the front-most window of a named application. It supports inline previews in compatible terminals, optional clipboard copy, and an on-demand image payload for Codex clients.

Features

  • 🎯 Target the active window by app name (e.g., Safari, Xcode)
  • 🪟 Three-level fallback: window-id → window frame crop → full-screen
  • 🖼 Inline preview for iTerm2 / Kitty / WezTerm; others receive the saved path
  • 📋 Optional PNG copy to the system clipboard
  • 🧰 Ships as both an MCP server (codex-mcp-screenshot) and CLI (codex-screenshot)
  • 📦 Published on npm for easy npx usage

Requirements & Permissions

  • macOS with the screencapture binary (built-in)
  • First run will prompt for:
    • Screen Recording permission (System Settings → Privacy & Security)
    • Accessibility permission (for AppleScript window info)
  • Run commands from a terminal/IDE that has these permissions granted

Install / Update

npm install -g codex-mcp-screenshot   # optional global install
# or invoke ad-hoc with npx (see below)

Use as a Codex MCP server

Update ~/.config/codex/config.toml:

[mcp_servers.screenshot]
command = "npx"
args = ["-y", "codex-mcp-screenshot@latest"]

Then in your Codex session call the tool:

screenshot_app {"app":"Safari","copyToClipboard":true}

The response includes:

  • content: text summary (path, clipboard status) and, when requested, an image attachment
  • metadata: path, display preference, and whether the PNG was copied

Returning the image payload

To avoid overflowing the model context, the server does not send base64 image data unless you opt in:

screenshot_app {"app":"Safari","includeImage":true}

Use this only when you really need the image streamed back to Codex.

Use as a standalone CLI

npx codex-mcp-screenshot --app "Safari" --display inline --copy
# shorthand once installed globally
codex-screenshot --app "Xcode" --display path

CLI flags:

  • --app <name> (required): App name as shown in Activity Monitor / Dock
  • --display <auto|inline|path|base64> (default auto)
  • --copy: copy PNG data to the clipboard
  • --out-dir <path>: custom destination folder

Internals

  • src/shared/macos.js — window discovery + screenshot capture via AppleScript and screencapture
  • src/shared/display.js — inline rendering helpers for supported terminals
  • src/server.js — MCP entrypoint (also exposed as codex-mcp-screenshot bin)
  • src/cli.js — CLI wrapper around the same capture pipeline

License

MIT