# Macro Automation Studio Docs > Macro Automation Studio documentation: emulator and cloud device setup, the Python SDK reference, MAS Agent, the MCP server, API keys, webhooks and guides. Every page is also available as Markdown at the same path with a .md suffix. The full text of every page is at https://automationmacro.com/docs/llms-full.txt. ## Start - [Python Android Emulator Automation: Getting Started](https://automationmacro.com/docs/getting-started.md): Set up Python Android emulator automation in Macro Automation Studio: connect a device, then run a marketplace bot, ask MAS Agent or write a first macro. - [Macro Automation Studio Download for Windows and Mac](https://automationmacro.com/docs/install.md): Download and install Macro Automation Studio on 64-bit Windows or an Apple Silicon Mac, sign in with email or Google, and see where updates and projects live. - [Image Recognition Macro Concepts: How MAS Works](https://automationmacro.com/docs/concepts.md): How an image recognition macro works in MAS: template images and OCR read the Android screen, humanized input goes over adb, and where macros run. ## MAS Agent - [AI Agent for Android Automation: From Prompt to Macro](https://automationmacro.com/docs/agent.md): Describe an Android automation task, let MAS Agent explore the app on an emulator or a cloud device, and get a validated Python macro you can edit in Studio. ## Devices - [Android Emulator Automation: Emulators, Cloud and Phone](https://automationmacro.com/docs/devices.md): Android emulator automation in Macro Automation Studio: the emulators it discovers, the adb port rules, adding a device by port, cloud devices and your phone. - [BlueStacks ADB Connect and Port Setup for MAS](https://automationmacro.com/docs/bluestacks-setup-guide.md): Enable ADB in BlueStacks 5, find the ADB port, connect Macro Automation Studio, and fix device-not-found and offline errors on Windows and Mac. - [LDPlayer ADB Connect and Port Setup for MAS](https://automationmacro.com/docs/ldplayer-setup-guide.md): Enable ADB debugging in LDPlayer 9, find the ADB port, connect the instance to Macro Automation Studio, and replace the recorder with screen-aware macros. - [MuMu Player ADB Port and Connect Setup for MAS](https://automationmacro.com/docs/mumu-setup-guide.md): Find the MuMu Player 12 ADB port, connect Macro Automation Studio to it, add every instance as a device, and run MAS macros instead of the recorder. - [MEmu Play ADB Connect and Port Setup for MAS](https://automationmacro.com/docs/memu-setup-guide.md): Connect MEmu Play to Macro Automation Studio over ADB on port 21503, add it as a device, fix offline errors, and run MAS macros instead of the recorder. - [BlueStacks ADB Not Working: Android Emulator ADB Fixes](https://automationmacro.com/docs/adb-troubleshooting.md): Fix adb not working, device not found and offline errors for BlueStacks, LDPlayer, MuMu, MEmu and Nox in Macro Automation Studio, with adb commands to check. - [Cloud Android Device: Create, Stream and Run Macros](https://automationmacro.com/docs/cloud-devices.md): Create a cloud Android device in Macro Automation Studio, view it over WebRTC, install APKs and run macros server-side with your PC off, and fix stuck devices. - [Multi-Instance Android Emulator Device Groups in MAS](https://automationmacro.com/docs/device-groups.md): Group multi-instance Android emulator windows and cloud devices in Macro Automation Studio, give each a macro, arguments and a proxy, and start all at once. - [Proxy per Emulator Instance: Give Each Device Its Own IP](https://automationmacro.com/docs/proxies.md): Attach one HTTP, HTTPS or SOCKS5 proxy per emulator instance or cloud device in Macro Automation Studio, test the exit IP and read it back in webhooks. ## Studio - [Python IDE for Android Automation: Studio Tour](https://automationmacro.com/docs/studio.md): Tour the Python IDE inside Macro Automation Studio: run an Android macro on an emulator or cloud device, read the console, and debug with breakpoints. - [Image Recognition Bot Templates and OCR: Asset Lab](https://automationmacro.com/docs/asset-lab.md): Build image recognition bot assets in Asset Lab: capture an emulator or cloud device screen, pick tap coordinates, test an OCR region live and crop templates. - [Macro Scheduler for BlueStacks and Other Emulators](https://automationmacro.com/docs/scheduler.md): Use the MAS scheduler to run a macro on a BlueStacks or other emulator port, once or daily, weekly or monthly, and fix schedules that did not run. - [Macro Argument Form and Runtime Dashboard: UI Builder](https://automationmacro.com/docs/ui-builder.md): Design a macro argument form (.uibproj) and runtime dashboard (.uibrt) in the MAS UI Builder, export ui.xml and script_args.py, and drive widgets from Python. - [Macro Settings Profiles: Arguments Shared Across Devices](https://automationmacro.com/docs/settings-profiles.md): Save macro argument values as a settings profile in MAS Studio, point many emulator or cloud devices at it, and update every device with one edit. - [Android Bot Marketplace: Install and Publish Bots](https://automationmacro.com/docs/marketplace.md): Browse the Android bot Marketplace in MAS: install and update ready-made bots, run them on your emulator, and publish your own Python macro for free. - [Run a Macro from the Marketplace: Your First Run](https://automationmacro.com/docs/run-macro-from-marketplace.md): Run a macro from the MAS Marketplace: install a bot, add your BlueStacks or cloud device to a device group, set its options, and start a clean first run. - [Git Macro Projects and Code Sync for Cloud Runs](https://automationmacro.com/docs/git-and-code-sync.md): Every MAS macro project is a git repository: use the Git view, find the working tree on disk, and see how code sync uploads your edits before a cloud run. ## Python SDK - [Android Automation in Python: mas SDK Overview](https://automationmacro.com/docs/sdk.md): Android automation in Python with the mas package: how a MAS script launches, drives an emulator or cloud device, and where every function lives. - [Python ADB Tap, Swipe, Type and Key Press in MAS](https://automationmacro.com/docs/sdk/interaction.md): Python ADB tap, swipe, type and key press on an Android emulator with the MAS SDK, using the real defaults, humanized timing and two worked examples. - [Python ADB Screenshot, Template Matching and OCR](https://automationmacro.com/docs/sdk/vision.md): Python ADB screenshot, OpenCV template matching and Tesseract OCR on an Android emulator with the MAS SDK, with the retry helpers and real defaults. - [Android Accessibility Tree in Python: Elements API](https://automationmacro.com/docs/sdk/elements.md): Find and read Android UI elements by resource id or text from Python with the MAS SDK accessibility tree API, and fall back to vision when a game has no tree. - [Open App Package over ADB in Python, Android Device Info](https://automationmacro.com/docs/sdk/apps-and-device.md): Open an app by package name over ADB, check app state, read Android device info, log to the MAS run console and send webhook events from a Python macro. - [Persist Macro State: Save Data Between Runs](https://automationmacro.com/docs/sdk/storage.md): Persist macro state and save data between runs with the MAS SDK storage functions, keyed by machine, emulator port and task name, with device group patterns. - [Runtime Dashboard in Python: Progress Bars and Tables](https://automationmacro.com/docs/sdk/ui.md): Drive a runtime dashboard from a Python macro with mas.ui in MAS: labels, progress bars, charts, logs, tables with buttons, input fields and event handlers. - [Python Macro Exceptions and Errors in the mas SDK](https://automationmacro.com/docs/sdk/errors.md): Python macro exceptions in the mas package with JSON-RPC codes, which calls raise and which return None, and how a long-running macro recovers or exits. - [MAS SDK Reference: Python Android Automation API](https://automationmacro.com/docs/api-reference.md): The mas SDK reference: every function, class, type and exception in the Python package with exact signatures and defaults for emulator and cloud device macros. ## Guides - [How to Make a Bot for Any Android Game in MAS](https://automationmacro.com/docs/make-a-bot-for-any-game.md): How to make a bot for any Android game in Macro Automation Studio: install one from the Marketplace, ask MAS Agent, or script it in Python on BlueStacks. - [BlueStacks Macro Image Recognition and LDPlayer Loops](https://automationmacro.com/docs/guides/image-recognition-macros.md): Build a BlueStacks macro with image recognition: capture a template in Asset Lab, match it on BlueStacks or LDPlayer, and loop until a state appears. - [ADB Python Tutorial: Control an Android Emulator](https://automationmacro.com/docs/guides/control-an-emulator-from-python.md): An adb Python tutorial for Macro Automation Studio: tap, swipe, type, press keys and take screenshots on BlueStacks, with adb managed by the app for you. - [Tesseract OCR for an Android Game Bot: Read Counters](https://automationmacro.com/docs/guides/ocr-text-reading.md): Give an Android game bot Tesseract OCR with read_text in MAS: pick a region in Asset Lab, tune psm and colour conversion, and parse counters and timers. - [LDPlayer Macro Loop, Stop Conditions and Scheduling](https://automationmacro.com/docs/guides/loops-and-scheduling.md): Loop a macro on LDPlayer or BlueStacks with stop conditions, keep progress between runs, exit with a status code, and schedule it daily in the MAS Scheduler. - [Multi-Instance Android Emulator Farming with Device Groups](https://automationmacro.com/docs/guides/multi-instance.md): Multi-instance Android emulator farming in MAS: add each BlueStacks or LDPlayer instance by port, group them, and give every device its own profile and proxy. ## Integrate - [How to Set Up the MCP Server: Claude Code, Cursor, Codex](https://automationmacro.com/docs/mcp.md): How to set up the MAS MCP server in Claude Code, Cursor or Codex: connect Android, send your API key as a header, and run a macro from chat. - [Android MCP Server Tools Reference: Hosted and Local](https://automationmacro.com/docs/mcp/tools.md): All MAS Android MCP server tools by name, with parameters, the surface each exists on and the scope it needs, for Claude Code, Cursor, Codex or any MCP client. - [API Key for Android Automation: Create, Scope and Rotate](https://automationmacro.com/docs/api-keys.md): Create an API key for Android automation in MAS, send it as X-API-KEY or swap it for an MCP token, and handle expiry, scopes, rate limits and revocation. - [Android Automation REST API: Runs, Cloud Devices, Profiles](https://automationmacro.com/docs/rest-api.md): Call the MAS Android automation REST API with an API key for run history, cloud device runs, code sync, device lists, settings profiles, proxies and webhooks. - [Macro Webhooks: Run Events, Signatures and Custom Events](https://automationmacro.com/docs/webhooks.md): Get a signed macro webhook POST from MAS when a run starts, completes, fails or stops, verify the X-MAS-Signature in Python or Node, and emit custom events. ## Account - [Macro Automation Studio Pricing: Plans, Devices, Credits](https://automationmacro.com/docs/billing.md): How Macro Automation Studio pricing and billing work: the device ladder, the cloud device add-on, AI credits, cycle changes, cancelling and failed payments. - [Macro Automation Studio Not Working? Errors and Fixes](https://automationmacro.com/docs/troubleshooting.md): Fixes for when Macro Automation Studio is not working: sign-in, missing devices, image not found, OCR misreads, script errors, stuck cloud devices and credits.