PyMemoryEditor

io.github.JeanExtreme002v3.0.2更新于 Oct 2, 2026

Read, write and scan process memory, Cheat Engine style, on Windows, Linux and macOS.

概览

AI 生成的概览

让助手以 Cheat Engine 方式在 Windows、Linux 和 macOS 上读取、写入和扫描运行中进程的内存。

功能
PyMemoryEditor 提供一个本地 MCP 服务器,驱动一个纯 Python 的进程内存库。十四个工具覆盖完整的 Cheat Engine 工作流:数值扫描、范围扫描、结果筛选、字节签名(AOB)与正则模式扫描、多级指针链,以及用于查找可跨 ASLR 存活的静态地址的指针扫描。扫描结果以句柄形式保存在服务器端,因此一次大规模首次扫描只消耗少量 token。支持读取和写入目标进程中的数值。
适用场景
适用于游戏修改与速通工具、无需附加调试器即可检查运行中程序的状态、为可观测性采样变量,或在你自己拥有或获授权测试的系统上进行内存扫描研究。
运行要求
作为本地进程在用户机器上运行(仅桌面端,无网页可执行版本)。安装 PyPI 包 pymemoryeditor 的 mcp 附加组件,并运行 pymemoryeditor-mcp 命令,例如通过 uvx。未声明任何身份验证、环境变量或请求头。访问其他进程可能需要操作系统级权限。
安装前请注意
该服务器会读取和写入其他进程的内存,可能导致其崩溃或损坏;只能指向你自己拥有或获得明确许可检查的进程。写入操作会改变运行中程序的状态。未声明任何凭据、支付或向第三方传输数据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 PyMemoryEditor,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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

bash
pip install PyMemoryEditor

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

bash
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:

bash
pip install "PyMemoryEditor[speed]"

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

bash
pip install "PyMemoryEditor[mcp]"

📖 Full guide at Read the Docs.


See it in action

python
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.

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

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

json
{  "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.

来源:README.md,提交 1e1999d

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v3.0.2最新Oct 2, 2026