skillfed

mss

An ultra fast cross-platform multiple screenshots module in pure python using ctypes.

mss v10.2.0 3.2M downloads/30d#2,714 on PyPI1,279
Permissive license MIT License Copyright (c) 2013-2026, Mickaël 'Tiger-222' Schoentgen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files… (full text in the JSON record) Active released

What it is and what it does

MSS is a pure-Python screenshot capture library that grabs images from one or multiple monitors and saves them as PNG files or returns pixel data for programmatic use. It uses ctypes to call platform-native APIs (BitBlt on Windows, CGGetActiveDisplayList on macOS, XGetImage on Linux) without requiring compiled dependencies, making it lightweight and fast across operating systems.

The library is designed for scenarios where speed and simplicity matter: embedding screenshot functionality into games, computer vision pipelines, AI applications, or automation tools. It integrates cleanly with PIL for format conversion and with NumPy and OpenCV for image processing, and it's thread-safe for concurrent use.

Use it for:

  • Capture screenshots in automated testing or monitoring scripts that need to verify UI state or record visual logs
  • Grab display frames for computer vision or AI model input without external dependencies
  • Build screen recording or streaming applications that need fast, cross-platform pixel access
  • Embed screenshot functionality in games or interactive software requiring platform-optimized capture
  • Monitor multiple displays in a single operation for multi-screen environments or headless setups

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Captures screenshots from one or all monitors on Windows, macOS, and Linux, saving them as PNG files or returning raw pixel data for further processing.

Yes. MSS is production-stable, actively maintained, has zero security vulnerabilities, no runtime dependencies, and installs with minimal friction. It's the right choice if you need fast, simple cross-platform screenshot capture without heavyweight dependencies. Only skip it if you need advanced image manipulation (use PIL/Pillow alongside it) or if your use case requires features beyond basic capture.

Install

mss on PyPI

pip

pip install mss

uv

uv add mss

poetry

poetry add mss

Installing mss

Before you install

Low friction: pure Python with no runtime dependencies, distributed as a wheel, and actively maintained with recent releases. Supports Python 3.9+ across CPython and PyPy.

License in practice

MIT License permits unrestricted use, modification, and distribution in both open-source and proprietary projects, with only attribution and license inclusion required.

Quickstart

pip install mss

from mss import MSS

with MSS() as sct:
    sct.shot()

Requires Python 3.9 or later. On systems with external monitors and DPI scaling, import mss before other packages like mouseinfo or pyautogui to avoid conflicts with SetProcessDpiAware().

Verify before relying

  • Performance characteristics compared to other screenshot libraries on specific hardware configurations
  • Behavior with multi-GPU setups or virtual displays
  • Interaction with DPI-aware applications beyond the documented mouseinfo/pyautogui caveat

Package facts

License MIT License Copyright (c) 2013-2026, Mickaël 'Tiger-222' Schoentgen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 113 days since the last release
Last repo commit
First released
Downloads 3,170,879/month — #2,714 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mss-10.2.0-py3-none-any.whl

Keywords: BitBlt, CGGetActiveDisplayList, CGImageGetBitsPerPixel, EnumDisplayMonitors, XGetImage, XGetWindowAttributes, XRRGetScreenResourcesCurrent, ctypes, monitor, screen, screencapture, screengrab, screenshot

Development Status :: 5 - Production/StableEnvironment :: MacOS XIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: End Users/DesktopIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Multimedia :: Graphics :: Capture :: Screen CaptureTopic :: Software Development :: Libraries

Tags

screenshot capture pythonmulti-monitor screen grabcross-platform screenshot toolscreen capture ctypesgrab display pixels python
screen-capturecross-platformcomputer-vision

More Libraries packages