Skip to content
FossShelf
Home / Categories / For Engineers

PyMemoryEditor

Cross-platform process memory reader, writer and scanner in Python.

Replaces —

227 starsMITreviewed 14 Nov 2026last commit 17 Nov 2026
Screenshot of PyMemoryEditor

Who it's for

Game modders automating value edits and pointer chains

PyMemoryEditor handles the full Cheat Engine loop in Python: scan for the current health value, take damage to reduce it, refine the candidate addresses, then read and write the final address. The reverse pointer scan finds the static pointer chain so the same script works across game restarts without re-scanning.

Skip if the game has anti-cheat software running. PyMemoryEditor uses the same OS-level APIs as Cheat Engine, and anti-cheat systems that detect memory reads will flag both the same way.

Security researchers inspecting live process state

Attach to a running process, enumerate memory regions, scan for known patterns, and inspect data structures live without stopping the process or attaching a full debugger. The AOB and regex pattern scans are well-suited for finding specific code sequences or data signatures.

Only use on processes you own or have explicit authorization to inspect. PyMemoryEditor uses standard OS APIs; the same legal and ethical limits that apply to debuggers apply here.

Developers building process observability tooling

Sample variables from a running process without instrumenting its source code. Use it to watch a counter increment in a black-box binary, log a buffer's contents periodically, or verify that a live value matches an expected state. The Python API integrates directly with logging and monitoring scripts.

Skip if the process is instrumented with OpenTelemetry or an APM agent. Live memory reads are slower and less reliable than instrumented metrics for production observability.

AI-assisted memory scanning over MCP

With the MCP extra installed, an AI assistant in Claude Desktop or any MCP-compatible client can run the scan-refine-read workflow autonomously. The user describes the value to find; the assistant scans, asks for a game state change to narrow results, and returns the address. Scan handles keep large result sets server-side.

Skip if the target process is not reachable from the same machine where the MCP server runs. Remote process inspection is not supported.

The problem

Working with process memory from Python has long meant choosing between Windows-only libraries, fragile ctypes wrappers that break across platforms, or investing in heavyweight commercial debuggers built for a different purpose. The result is that cross-platform memory inspection, common in game modding, security research, and runtime debugging, either requires C extension builds or is locked to a single operating system. The core operations (reading a value from a known address, running a first scan to find candidate addresses, narrowing them across iterations, following pointer chains) each require platform-specific API calls that differ between Windows, Linux, and macOS. Without a unified abstraction, developers end up writing and maintaining three separate code paths or accepting Windows-only tooling.

How it works

Value and pattern memory scanning

Scans a running process for all addresses holding a specific value, with eight comparison modes (exact, greater than, less than, changed, unchanged, and others). An AOB (Array of Bytes) scan and regex scan find code or data by byte signature. The classic Cheat Engine first-scan-then-refine loop runs in Python in a few lines.

Cross-platform API: Windows, Linux, macOS

One Python API works on Windows, Linux, and macOS, both 32-bit and 64-bit. The underlying ctypes calls differ per OS, but the application code stays identical. Write a memory scanner once and run it on any platform without conditionals.

Optional NumPy acceleration

Adding the speed extra installs NumPy and vectorizes the numeric scan comparison loop. Selective scans run 10-30x faster than the pure-Python path with identical results. The fast path is opt-in; install PyMemoryEditor without extras and performance is still usable for typical workloads.

Reverse pointer scan for ASLR-resistant offsets

A reverse pointer scan finds the static module name and offset chain that reliably points to a target address across process restarts. The chain beats Address Space Layout Randomization (ASLR); save the module-plus-offset path once and reuse it on every launch without re-scanning.

MCP server for AI-assisted workflows

An installable MCP server exposes 14 tools covering open, scan, refine, read, write, and pointer operations. An AI assistant can run the full scan loop independently, scanning, asking the user to trigger a game event, refining candidates, and returning the address. Scan results are kept server-side so a 40,000-hit first scan costs a few tokens, not the entire context window.

Bundled Cheat Engine-style GUI app

A visual scanner ships as an optional app extra. Install it with pip install "PyMemoryEditor[app]" and run pymemoryeditor to open the GUI, attach to a process, scan for values, and freeze them without writing a script. Useful for exploring memory interactively before scripting the repeatable parts.

Features

  • Value and pattern memory scanning
  • Cross-platform API: Windows, Linux, macOS
  • Optional NumPy acceleration
  • Reverse pointer scan for ASLR-resistant offsets
  • MCP server for AI-assisted workflows
  • Bundled Cheat Engine-style GUI app

How to install

Install PyMemoryEditor from PyPI with optional extras for the GUI app, faster scans, or the MCP server.

pip install PyMemoryEditor
pip install "PyMemoryEditor[app]"
pip install "PyMemoryEditor[speed]"
pip install "PyMemoryEditor[mcp]"

Recommended for this setup

Strengths

  • No native build step: Pure Python built on ctypes means pip install is the entire setup. No C compiler, no native extension wheel, no platform-specific build toolchain. This matters most on Linux and macOS, where most Windows-centric memory tools require Wine or simply do not run.
  • MIT license: no usage restrictions: MIT licensed for personal and commercial use. There are no restrictions on incorporating PyMemoryEditor into commercial tools, internal tooling, or redistributed scripts. Unlike some specialized debugger SDKs, there is no enterprise licensing tier or per-seat fee.
  • Active development with low open issue count: Last pushed on 2026-11-13, with 2 open issues, covering Windows, Linux, and macOS simultaneously. The GitHub Actions CI runs the test suite across all three platforms on every push, so platform regressions surface before release.
  • Three deployment modes in one package: The same codebase serves three separate workflows: programmatic scripting via the Python API, visual interaction via the GUI app, and AI-driven automation via the MCP server. Switching between them is a matter of which pip extras are installed.

Trade-offs

  • OS permissions required to read other processes: On Linux, reading another process's memory requires ptrace permissions or running as root. On macOS, the target process must be signed to allow inspection, or the script must run as root. On Windows, the script needs sufficient privileges for the process handle. These are OS-enforced limits, not library limits, but they add friction for some deployment scenarios.
  • Pure-Python path is slow on large address spaces: The pure-Python scan path is correct but slow on processes with large address spaces. For game titles or processes that hold gigabytes of heap, the pure-Python path can take several seconds per scan pass. The speed extra (NumPy) brings it to usable performance, but adds a dependency that may not fit minimal environments.

Tech stack

Languages
Python, Makefile, HTML
Frameworks
—
Databases
—
Tooling
—

FAQ

Does PyMemoryEditor work on Linux and macOS, or only Windows?

PyMemoryEditor supports Windows, Linux, and macOS, both 32-bit and 64-bit. The API is identical across all three. On Linux, the script needs ptrace permissions (run as root or adjust ptrace_scope); on macOS, the target process must allow inspection or the script must run as root.

How do I install PyMemoryEditor and its optional extras?

Install the base library with pip install PyMemoryEditor. For the bundled GUI app, use the app extra: pip install "PyMemoryEditor[app]". For faster scans with NumPy, add the speed extra: pip install "PyMemoryEditor[speed]". For the MCP server for AI assistants, add the mcp extra: pip install "PyMemoryEditor[mcp]". Extras can be combined: pip install "PyMemoryEditor[app,speed,mcp]".

What is the difference between a value scan and an AOB scan?

A value scan searches all process memory for addresses holding a specific typed value, such as an integer equal to 100. An AOB (Array of Bytes) scan searches for a specific byte sequence, often a code signature or a known data structure marker. Value scans are the starting point for game modding; AOB scans are more common in security research and reverse engineering.

Can an AI assistant use PyMemoryEditor directly?

Yes. Installing the mcp extra adds a Model Context Protocol server that exposes 14 tools for opening a process, scanning, refining, reading, writing, and following pointer chains. The server keeps scan results server-side behind handles, so large result sets do not overflow the AI's context window. Claude Desktop and any MCP-compatible client can connect to it.

Is it legal to use PyMemoryEditor on other processes?

PyMemoryEditor uses standard OS-level APIs to interact with processes, the same APIs that debuggers, profilers, and Cheat Engine use. Using it on processes you own or have explicit authorization to inspect is legal. Using it on processes you do not own, or without authorization, raises the same legal and ethical concerns as any unauthorized memory inspection. The README explicitly states this under its responsible-use note.

Similar tools

More in Engineers