mcpField
P
PyMemoryEditor

PyMemoryEditor

Local
pymemoryeditor.readthedocs.ioDeveloper Tools226Updated 2w ago

About PyMemoryEditor

PyMemoryEditor is a pure-Python library built on ctypes for reading, writing and scanning the memory of running processes on Windows, Linux and macOS. It includes a Cheat Engine-style GUI app and an MCP server so AI assistants can run memory scans.

Key features

  1. 01Unified API across Windows, Linux and macOS
  2. 02Read, write and scan process memory
  3. 03Value scans with range and refinement
  4. 04Byte signature (AOB) and regex pattern scans
  5. 05Multi-level pointer chains and pointer scans
  6. 06Optional NumPy acceleration for scans

Use cases

  1. 01Changing in-game values for modding or debugging
  2. 02Inspecting a live program's state without a debugger
  3. 03Letting an AI assistant locate addresses through MCP

MCP support

The project provides an MCP server, pymemoryeditor-mcp, with 14 tools. Scan results are kept server-side behind a handle to reduce the content sent to the AI assistant.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"jeanextreme002-pymemoryeditor": {
"command": "uvx",
"args": [
"pymemoryeditor"
]
}
}
}
Run commanduvx pymemoryeditor

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypipymemoryeditor3.4.0

Tools

14

Saved tool list · updated 2w ago

This tool takes no parameters.

Details

From the project README

PyMemoryEditor

A pure-Python library (built on ctypes) that lets you inspect, modify and search the memory of any running process in a few lines of Python — Cheat Engine workflows on Windows, Linux and macOS!


PyMemoryEditor logo

Read, write and scan the memory of any process — straight from Python.
One unified API. Three operating systems. No C compiler. No native build step.

Python Package Coverage Pypi License Python Version Downloads

Runs on Windows · Linux · macOS — 32-bit and 64-bit.

PyMemoryEditor app attached to a running process

Tweak a value in a running game · inspect a live program's state · harvest data straight from RAM.


Install

pip install PyMemoryEditor

To also install the bundled GUI app (a Cheat Engine-style scanner), use the app extra:

pip install "PyMemoryEditor[app]"
pymemoryeditor

For faster scans on large processes, add the speed extra. It pulls in NumPy and automatically vectorizes the numeric scan comparison loop — ~10–30× faster on selective scans:

pip install "PyMemoryEditor[speed]"

To let an AI assistant drive the library over the Model Context Protocol, use the mcp extra (see below):

pip install "PyMemoryEditor[mcp]"

📖 Full guide at Read the Docs.


See it in action

from PyMemoryEditor import OpenProcess

with OpenProcess(name="game.exe") as process:

    # Scan the whole process for every address holding the value 100.
    for address in process.search_by_value(int, value=100):
        print(f"Found at 0x{address:X}")

    # Read the current value, then write a new one back.
    current = process.read_int(address)
    process.write_int(address, current + 500)

That's it — read, write or scan another process in three lines, the same way on every platform.


Let an AI assistant do it (MCP)

PyMemoryEditor ships a Model Context Protocol server, so an AI assistant can run the whole loop itself:

"Find the health value in my game. It's 100 right now."

It scans, asks you to take damage, refines the matches, and hands you the address.

pip install "PyMemoryEditor[mcp]"
claude mcp add pymemoryeditor -- pymemoryeditor-mcp

Or in any client that reads mcpServers JSON (Claude Desktop, editors, …):

{
  "mcpServers": {
    "pymemoryeditor": {
      "command": "pymemoryeditor-mcp",
      "args": []
    }
  }
}

Fourteen tools cover the full workflow, with scan results kept server-side behind a handle, so a 40 000-hit first scan costs a few tokens instead of your whole context.

Read the MCP guide to learn more.


📖 Documentation

Full documentation lives at pymemoryeditor.readthedocs.io — installation, the Cheat Engine workflow, every method and parameter, the GUI app guide, platform notes and troubleshooting.

A quick map of where to go:

Quick StartOpen a process, read, write and run your first scan.
Searching memoryValue scans, ranges, refining results, the Cheat Engine loop.
Pattern scanFind code/data with byte signatures (AOB) and regex.
PointersMulti-level pointer chains and the live RemotePointer.
Pointer scanFind static pointers that survive ASLR.
The GUI appThe bundled Cheat Engine-style scanner.
The MCP serverLet an AI assistant drive the scan/refine loop.
API referenceEvery public class, method and parameter.
Platform notesPermissions and quirks on Windows, Linux and macOS.
TroubleshootingCommon errors and how to fix them.

What can I build with this?

  • 🎮 Game modding & speedrunning tools — the classic Cheat Engine use case.
  • 🔬 Debugging & introspection — inspect live state without attaching a debugger.
  • 📊 Observability tooling — sample variables in a running process for telemetry.
  • 🔐 Security & reverse-engineering research — on systems you own or are authorized to test.
  • 🎓 Learning — the bundled app is a great teaching tool for how memory scanning works.

Note

Responsible use. PyMemoryEditor talks to other processes through OS-level APIs. Only point it at processes you own or have explicit permission to inspect.


🤝 Contributing

Pull requests, bug reports and feature ideas are very welcome. Read CONTRIBUTING.md for the development setup, test layout and the small set of platform-specific quirks to be aware of.

If PyMemoryEditor helped your project, please ⭐ the repo — it's the easiest way to support the work and to help others discover the library.


License

Released under the MIT License — free for personal and commercial use.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.