How to Use Maestro MCP with Cursor IDE for Mobile Testing

JoeBot and Leland demo Maestro MCP in Cursor IDE, using an AI agent to add a swipe-to-delete feature to a Hacker News iOS app. The agent writes Swift code, generates test commands, catches its own mistakes with wrong selectors, and validates the feature end-to-end on a real simulator without human help.
Okay, I'll admit it, I didn't believe AI could actually test an app on its own. And then I watched a coding agent build a feature, break it, catch its own mistake, and then fix it. Here's the actual real demo with Leland from Maestro. Check it out.
Okay, so what I have open here is Cursor on the left and then the iOS simulator on the right. I think what will be most helpful is to walk through just an example of a typical mobile development workflow when using agents and how Maestro can facilitate the agent actually validating its own work to hand off more of that entire iteration loop to the agent. The app we're going to be working with is Hacker News and it shows all of the posts in the application. One of the key features in the app is you can bookmark these posts, so you can long press. Bookmark it, and then it'll end up showing up in this bookmark, bookmarks tab here. So the feature I want to add now is I realized, and this is open source, this is just how it came, but I realized you can't actually delete a bookmark from the bookmark tab. So if you long press this, nothing happens. If you swipe, nothing happens. So let's try to add that feature. But before I do that, what I'll do is I'm going to install the Maestro MCP, and this is what allows Cursor to communicate with the device. So I'm just going to go to docs.mystr.dev, down to mystr MCP server, and then go down to Cursor IDE. You can see that you can install the MCP very similarly on Cloud Code or Codex or Gemini or GitHub Copilot, but in this case we're using GitHub IDE. So we'll open that up and there's a nice little button here to install it easily, and I'll click install. And that's it. So very easy to install this, close this out. And you can see the tools that the Maestro MCP provides. So list devices, take screenshot, run, which would be to run the actual Maestro YAML code to execute commands on the device, inspect screen. So some different tooling here, but at the end of the day, what this allows the Cursor agent now to do is interact and inspect the iOS simulator over here. So that's installed. And let me open up an agent chat here. And yeah, so what we wanted to do was add the ability to swipe to delete a bookmarked post from the bookmarks tab. And then I'll add validate with Maestro. So, we'll kick that off. So the first part of this is going to be pretty familiar, I think, to anyone using coding agents. It's going to try to implement this. It's going to explore the repository, look at the Swift code, implement this functionality there. But the nice thing now that we have the, uh, Measure Studio MCP is that it'll actually be able to on its own validate that the changes it's made actually function correctly live when running the application. So we'll see how this works here. Okay, so it's installed now, the new version, and now it's starting to use the Maestro MCP to actually validate that this new installed version behaves as we intend. The nice thing about the Maestro MCP is it ships with a light front end that you can open up directly in the embedded Cursor browser here, so you can see exactly what's happening from the Maestro MCP's perspective. So you can actually just now iterate completely within the cursor IDE, and you can see that it's launching the new application. This is all Maestro syntax, so you can see it's written in YAML, but the Maestro MCP is actually generating and executing this code autonomously. So this is what I mean by the agent checking itself. It's now deciding how to actually interact with the application using Maestro. And you can see that again, like this is all human readable. So even though that the agent is generating these commands, you as a developer can easily understand what's happening here. So you can see actually that it made a mistake here. It long pressed to create the bookmark, but then it tried to go to the bookmark tab. And I think what it did is it ended up tapping on the bookmark icon at the top. Let's see if it's able to figure this out. Yeah. And then it picked a better selector here. So again, this kind of showcases. The agent has the intelligence to, to do a really good job at correcting itself automatically. And you can see it's swiping here and it tested that. Yes. Like now we can actually swipe to delete the bookmark on the bookmarks tab. So wait for it to finish here. Oh, and yeah, this is revealing a little bit of a weird kind of behavior here. When it— after it deleted the bookmark, it switched back to this main tab, so it it's looking for actually the empty state on the bookmarks tab. But since for some reason the app navigated back to that main tab, that's going to fail. So let's see if it's able to figure this out. Okay, so it navigated back to the bookmarks tab, and now it's able to validate the correct assertion here. So yeah, so now it's going to rerun this and validate it end to end after it's understood more of how the application really behaves and the correct selectors to use. Sweet. There you go. And it did that without me doing anything. All I did was ask it to build the feature and test it with Maestro, and it was able to fully build the feature and validate the functionality end to end. So yeah, that, that kind of covers the main workflow that you would use Maestro MCP with when just developing a feature. Using CursorAgent or Cloud Code or Codex or whatever you use for your AI coding.
All right, if you want to hear more about my show and how to see how the full agent built the whole feature start to finish, the full episode's linked in the description down below. I also broke the whole thing down in a post on TestGuild, links there too. So do me a favor, hit the subscribe and don't miss the next one. As always, test everything and keep the good. Cheers.










