Agent-Native Computer Use: When Agents Reshape the Environment for Their Own Use

TL;DR

Agents can use computers in a more native way if we allow them to reverse engineer the software they use. Given a program's compiled binaries and a reverse-engineering toolkit, a language agent can inspect the program to understand how it works, rewire it for its own use, and build an MCP server on top of it. This allows the agent to complete tasks without reading the screen. Our experiments with FreeCAD, where only the compiled binary is provided, show that this approach lets the agent complete a task 55× faster using 35× fewer tokens. In a real-time Fruit Ninja task, the agent can achieve expert-level scores, while vision-based computer-use agents struggle to make meaningful moves.

44 s vs 40 mintime on the task
0.64M vs 22.2Mtokens used
13/13 vs 7/13checks passed
Demo 1. The agent cuts vents into a lid in FreeCAD. The left side uses vision-based computer use, where the model works from screenshots. The right side uses the MCP server that the model built, and draws the model inside FreeCAD after each tool call.
305 vs 68average final score over 3 rounds
225 vs 6average points in play
202 vs 9points in play in the round shown
Demo 2. The agent plays a 60-second round of Fruit Ninja, shown at 2× speed. The left side uses vision-based computer use, where the model works from screenshots. The right side uses the MCP server that the model built from the game's binary.

Computer use lets a language agent operate any program the way a person does, through screenshots and the mouse, but every step costs a new screenshot and a new model reply. But the screen may not be the most efficient interface for an agent. Earlier studies found that agents could perform better when they are given tools to call, such as an MCP server, in addition to screenshots (Song et al., 2024; Jia et al., 2025). In these studies, people design the tools and hand them to the agent, and the software itself stays unchanged throughout.

We show that an agent can build these tools itself if it is allowed to reverse engineer the program. We give it only the compiled binaries and REA, a reverse-engineering toolkit that inspects binaries and instruments running processes, with no source code, documentation or internet access. The agent inspects the program to understand how it works, finds a way into the running process, and builds an MCP server on top of it. It then does its tasks through this server alone, without the screen, mouse or keyboard. This is a more native way for an agent to use a program: it reads the program's state and calls its functions directly, where computer use goes through an interface that was drawn for human eyes. We call this agent-native computer use.

The MCP servers that the agents built and the builders that produced them are available at github.com/MIT-MI/Agent-Native-Computer-Use-Code.

How an agent builds an MCP server from binaries

One agent session gets the binaries and REA in an offline sandbox and is asked to build an MCP server. It never sees the benchmark tasks, so it has to decide by itself which operations the server should offer. The build has four steps (Figure 1):

  1. Analyze. The agent inspects the package and finds what the binaries expose, for example functions that code inside the process could call.
  2. Test. The agent runs the program and tries its guesses on the running process. For FreeCAD, it injects code with Frida and calls the program's functions to see what they do.
  3. Build. The agent writes the MCP server. For FreeCAD, this includes the script that the server injects into the program.
  4. Check. The agent runs the server against the program. A bug in the code sends it back to step 3, and a new question about the program sends it back to step 2.
Click a step to see what the agent did in it.
Input FreeCAD 0.20.2 installed and running on a desktop no source no docs no network no tasks Build loop fix the code new question: test again 1 Analyze binary, exports, linked libraries 2 Test run the program, try each guess 3 Build MCP server + injected script 4 Check real calls through the built server Tools the agent uses in each step REA: inspect binaries, probe the live program try, review, finish Shell and files: run commands, write test scripts and the server code Output mcp/ server + script mcp/deps/ Frida intermediate/ notes 85 working tools Input FreeCAD 0.20.2, installed and running on a desktop no source, no docs, no network, no tasks Build loop, with the tools used in each step 1 Analyze REA + shell binary, exports, linked libraries 2 Test REA + shell run the program, try each guess 3 Build files MCP server + injected script 4 Check shell + try real calls through the built server fix test again Output mcp/ server + script, mcp/deps/, intermediate/ 85 working tools
Figure 1. The four steps of the build. The details come from one FreeCAD build.

Each tool does one whole operation. In the FreeCAD server, cutting a vent into the lid is a single call, freecad_part_boolean(operation=cut, base=Vented1, tool=Vent2, name=Vented2, document=sensor_lid). It reads the way a CAD user would describe the step, subtracting Vent2 from the lid and naming the result Vented2, even though the tool was not made for this task. The agent built the server before it saw any task, and the same tool can cut, fuse or intersect any two objects. With computer use, the same model spent 40 minutes in FreeCAD's menus and dialogs and did not cut any vent. Appendix A shows how the agent spent its time and what it did during one build.

A build changes both the harness and the environment

Work on computer use usually changes only the harness. The agent gets better ways to look at the screen and to click, and the program stays as it is. A build in our setting changes both sides (Figure 2). The harness gets an MCP server. The running FreeCAD gets a script, injected with Frida, that receives each tool call and calls the matching FreeCAD functions. The agent wrote both halves, and a tool call works only when both are in place. Appendix B describes the tools of both servers.

Harness, changed the agent gets a new MCP server Environment, changed the running program gets an injected script Task agent tools/call result MCP server server.py, Python finds the running FreeCAD process attaches with Frida forwards each call as {op, args} freecad-python3 attach, Frida inject script {op, args} result agent.py (injected) PyGILState_Ensure PyRun_SimpleString PyGILState_Release Unix socket server Qt main thread Embedded Python FreeCAD, FreeCADGui, Part, Sketcher, Mesh, Import calls /app/work .FCStd .step .iges .brep .stl FreeCAD writes
Figure 2. A build changes both the harness and the environment. The bronze parts are what the agent worked out by testing: the injected script and the calls it makes to FreeCAD's functions.

Results on FreeCAD

For our main experiments, we evaluate the agent on five FreeCAD tasks (Table 1) using the MCP server it built. Each task starts from a partially completed project file and is graded by checks on the output files the agent saves. The starting files pass only 10%–33% of these checks, leaving most of the work to the agent. Using its server, the agent completed all five tasks with substantially less time and fewer tokens than the computer-use baseline. The server is built before the agent sees any evaluation task and cannot be modified during evaluation.

TaskWhat the agent must doChecksDeadline
board-plateResize a mounting plate and move its two holes, keeping the linked cuts. Save, then export STEP and STL.920 min
cable-slotThe same edit plus a slot cut through the plate.1020 min
service-standoffsThe same edit plus four standoffs fused on in a chain.1020 min
lid-ventResize a lid, move four screw holes and cut five vents in sequence.1340 min
enclosureRelease a two-part enclosure. Shell, posts, port cutouts, lid holes, vents and a rotated label plate add up to 26 linked features.2190 min
Table 1. The five FreeCAD tasks. The checks test the files that the model saves.
Main result

The MCP server compared with computer use

We use DeepSeek V4.1 Flash for both the builds and the tasks, and run each task three times per setup. With its MCP server, the model passed every check on every task, whereas with computer use it passed 40% on average: it reached 74% on the shortest task, and on cable-slot and service-standoffs it passed nothing beyond what the starting file already passes (Figure 3). The MCP runs were also far cheaper. Together, the five tasks took 4.5 minutes and 3.1M tokens with the server, against 180.6 minutes and 127.1M tokens with computer use, which is about 40× less of each (Figure 4). On lid-vent, the task shown in Demo 1, the MCP run finished 55× faster using 35× fewer tokens, in 44 seconds and 0.64M tokens against 40 minutes and 22.2M. These numbers leave out the build, which is a one-time cost per program: the three builds took 37, 30 and 85 minutes. The gray bars in Figures 3 to 5 belong to the ablation below.

Share of checks passed on each task, averaged over three runs. Computer use: board-plate 74%, cable-slot 20%, service-standoffs 20%, lid-vent 41%, enclosure 43%. MCP server built with REA: 100% on every task. MCP server built without REA and the starting file: 33%, 20%, 20%, 15% and 10%.
Figure 3. The share of checks passed on each of the five tasks, averaged over three runs. The dashed line shows how many checks the starting file already passes before the agent does anything.
Average time per task in minutes. Computer use: 20.0, 20.0, 20.0, 30.5 and 90.1. MCP server built with REA: 0.6, 0.4, 1.0, 1.0 and 1.5. MCP server built without REA: 19.4, 19.5, 20.0, 39.5 and 84.6.
Figure 4. The time spent on each task, averaged over three runs.
Average number of tool calls on each task. Computer use: board-plate 150, cable-slot 152, service-standoffs 172, lid-vent 238, enclosure 754. MCP server built with REA: 32, 24, 41, 43 and 71. MCP server built without REA: 91, 89, 102, 178 and 292.
Figure 5. The number of tool calls made on each task, averaged over three runs.

The MCP runs also needed far fewer tool calls (Figure 5): 211 for the five tasks, against 1,466 with computer use, averaged over three runs. The gap comes from what a single call does: one computer-use call is a click or a key press, while one MCP call is a whole operation, such as cutting one part out of another. Appendix C lists every call of one run, and Appendix D shows three tasks as side-by-side videos.

Ablation

Without reverse-engineering tools, the server the agent builds is much less useful

To see how much the reverse-engineering tools matter, we repeat the build without REA. The agent can still run FreeCAD and use its window, but it cannot inspect the program's files or its running process. The servers it builds this way can therefore only drive menus and dialogs and read the results from the window. They passed no check beyond the starting file (Figure 3), used 752 tool calls (Figure 5) and ran close to the deadline on every task (Figure 4). Table 2 compares the two kinds of server.

Results on Fruit Ninja, a closed-source real-time game

FreeCAD is open source, even though the agent received only its binaries, and its tasks have no time pressure. To test a closed-source program that runs in real time, we use Fruit Ninja, where fruit falls off the screen while the model is still thinking. Kimi K3 builds an MCP server from the game's binary and REA in the same four steps, and then plays three 60-second rounds with the server and three with computer use.

With its server, the model averaged 304.7 points per round, against 67.7 with computer use (Figure 6), where it struggled to make meaningful moves. The computer-use score overstates how well the model played, because most of it is a bonus that the game adds when a round ends, not points from slashing fruit. In the round shown in Demo 2, the model earned 9 points in play with computer use and 202 with its server (Figure 7).

Final score in each of three rounds. MCP server built with REA: 287, 328 and 299. MCP server built without REA: 115, 198 and 109. Computer use: 74, 66 and 63.
Figure 6. The final score in each Fruit Ninja round. It is the points earned in play plus the bonuses added when the round ends.
Points earned in play in each of three rounds. MCP server built with REA: 202, 243 and 229. MCP server built without REA: 40, 137 and 93. Computer use: 9, 6 and 3.
Figure 7. The points earned in play in each Fruit Ninja round, without the bonuses.

Figures 6 and 7 also show a server that the agent built without REA. This server averaged 140.7 points per round, about twice the computer-use score and less than half the score of the server built with REA.

The model does not make each slash with a separate call. The server's auto_play tool reads the fruit positions from the game process many times per second and slashes by itself, so the model played each round with one to three calls (Appendix B).

Discussion

What the reverse-engineering tools add

With REA, the agent gets inside the program. In FreeCAD, it found the functions of the embedded Python interpreter among the exports of libpython3.11, injected a script with Frida, and ran FreeCAD's own Python API from that script on the program's main thread. Each tool therefore asks FreeCAD directly for its objects and calls FreeCAD's own functions. In Fruit Ninja, the agent found where the game keeps its fruit and bombs in memory, so the server reads their exact positions and velocities many times per second and slashes from those numbers. A server built without REA offers similar tools but has to work through the window (Table 2).

Server built with REAServer built without REA
FreeCAD, reading stateAsks the running FreeCAD for its objects and their properties.Takes screenshots and reads the model tree and the property panel with OCR.
FreeCAD, actingCalls FreeCAD's own functions inside the process.Clicks through menus and fills in dialogs.
Fruit Ninja, reading stateReads the exact position and velocity of every fruit and bomb from the game's memory.Captures the screen at 30 frames per second, finds the fruit in the image, and tracks each fruit over at least three frames.
Fruit Ninja, actingSlashes in a loop that runs many times per second.Makes simulated mouse strokes of 200 ms each.
Table 2. How the servers built with and without REA read the state of the program and act on it.

Without REA, the FreeCAD server had to read the window, and this was not reliable enough. In one run it misread the names in the model tree and could not find the object it was asked to change, and in another it could not switch workbenches. The model never sees the screen itself, so it could not work around these errors and did worse than computer use. Fruit Ninja tolerates such errors better, because a missed fruit costs only a few points, so there we can separate two effects of building a server. Moving the real-time decisions from the model into the server, which the server built without REA also does, raised the points in play from 6 to 90 on average, and reading the game's state from memory instead of the window raised them from 90 to 225 (Figure 7).

Tool calls and screenshots

Screenshots are expensive for a model: on lid-vent, computer use spent 22.2M tokens and the MCP run 0.64M. But using software does not have to go through vision. An experienced FreeCAD user who wants to cut a vent into a lid knows the operations before looking at anything (make a box, place it, subtract it from the lid), and knows which tool to use before opening the menu that shows it. The screen is only how they get to the tool. A tool call skips that part: freecad_create_object(type=Part::Box, name=Vent1, properties={Length: 40 mm, Width: 3 mm, Height: 7 mm, ...}) names the operation directly.

Earlier work found a smaller gain: in OSWorld-MCP, adding MCP tools raised Claude 4 Sonnet's success rate from 40.1% to 43.3% (Jia et al., 2025). There the tools are given, so when a task needs something that they do not cover, the agent can only go back to the screen. Here the agent builds the server itself and decides which operations it offers.

Next: the agent keeps reshaping its link to the environment

In our experiments, the agent builds the server once, before it sees any task. The next step is to let it keep changing the server while it works (Figure 8). When a task is awkward with the current tools, the agent can go back to the binary, test how that part of the program behaves, and add a tool, redesign one, or combine several steps into one, as it already did with auto_play in Fruit Ninja. The link then evolves with the tasks, and a server built this way can also be shared with other agents.

This task is awkward with the tools I have now. the agent built before the first task freecad_create_object freecad_part_boolean freecad_export_objects new tool redesigned tool shaped later by the agent, as it works 0110 1001 0111 1100 0011 1010 0101 1110 0001 1011 0100 0110 0011 1101 1000 the installed program 1Do a taskthrough the server 2Notice what isawkward to do 3Go back into theprogram and test 4Reshape the serverand keep it after each round, the link fits the agent's work better
Figure 8. A sketch of how the server could change over time. This is not a result.

If this works, a program does not need to ship an agent interface for agents to use it well. Software is one kind of environment. We are excited about agents that shape their own links to the environments they work in, starting with the software on a computer.

Contributors

Zijian Zhou, Han Zheng, Mugeng Liu, Rongjie Huang, Bo Liu, Mingruo Qu, Hanfei Yu

Appendix

A. What the agent does during a build

One FreeCAD build took 37 minutes and 203 tool calls (Figure A1). About two fifths of these calls tested the program. Writing the server took 70 calls and about 6 minutes. For example, early in the build FreeCAD crashed when the agent called its functions from an injected thread, and the agent changed the server to run every call on FreeCAD's main thread.

minutes into the build

1 Analyze, 12 calls 2 Test, 84 calls 3 Build, 70 calls 4 Check, 37 calls
shell or file call REA call try, review or finish
    Figure A1. Every tool call in one FreeCAD build. Click a number to read what the agent wrote at that moment.

    B. The MCP servers that the agents built

    The servers that the agents built, with and without REA, and the builders that produced them are in the code repository.

    FreeCAD: 85 tools that call the program's own functions

    The FreeCAD server has 85 tools. Each tool calls FreeCAD's own functions inside the running program, for example to save a document or export a STEP file. Figure 2 shows the path of one call.

    Fruit Ninja: five tools, and one of them plays the round

    The Fruit Ninja server built with REA has five tools (Figure A2). Its get_state tool reads the score and the fruit and bombs from the game process. Its auto_play tool plays for a given number of seconds. It reads the positions of the fruit many times per second and performs the slashes. The model does not need to find the fruit in an image.

    One of the five tools plays the round by itself

    get_state

    Mode, score, fruit and bombs, read from the game process.

    auto_play

    Plays by itself for a given number of seconds.

    slash

    One straight slash between two points.

    start_mode

    Starts a round from the menus.

    restart_round

    Starts the same mode again after a round ends.

    Figure A2. The five tools in the MCP server that the agent built from the Fruit Ninja binary.

    C. Every tool call in one run

    This is the run shown in Demo 1. The model sent the 46 calls in 18 replies, because one reply can contain several calls. On the same task with computer use, the model made 265 calls in 40 minutes and passed 7 of the 13 checks. Table A1 lists the 46 calls, which took 44 seconds.

    CallsToolsWhat the calls do
    1–3freecad_status
    freecad_list_documents
    freecad_list_objects
    Find the open document and list its 10 objects.
    4–13freecad_get_object ×10Read the lid, the four screw holes, the four existing cuts and the gasket reference.
    14–18freecad_set_properties ×5Resize the lid to 120 × 80 × 3 mm. Set the radius and position of the four screw holes.
    19–23freecad_create_object ×5Create the five vent boxes, each 40 × 3 × 7 mm.
    24–28freecad_part_boolean ×5Cut the vents out of the lid one after another, from Vented1 to Vented5.
    29–30freecad_recompute
    freecad_get_object
    Recompute the document and read the existing cut named Lid again.
    31–33freecad_save_document
    freecad_export_objects ×2
    Save the project. Export Vented5 to STEP and STL.
    34–38freecad_set_view_property
    freecad_activate_view
    freecad_view_action ×2
    freecad_save_view_image
    Show the final lid in the 3D view and save an image of it.
    39–40freecad_get_computed
    freecad_list_sub_elements
    Read the volume of the final lid and count its faces, edges and vertices.
    41–46freecad_get_object ×4
    freecad_list_documents
    freecad_get_report_view
    Read back two vents, the last cut and the gasket reference. Confirm that the document is saved and that FreeCAD's report view is empty.
    Table A1. Every tool call that the model made with its MCP server in one run of the lid-vent task.

    D. Three tasks side by side

    Figure A3 shows three of the five FreeCAD tasks, with the computer-use run and the MCP run on one clock. The lid-vent video is the one in Demo 1.

    Three of the five tasks, with the two runs shown side by side

    MCP server: 21/21 in 86 s, 1.8M tokens. Computer use: 13/21 in 90 min, 59.9M tokens.
    Figure A3. Three of the five tasks. The left side uses vision-based computer use and the right side uses the MCP server. The right side draws the model inside FreeCAD after each tool call, replayed from the calls recorded in the run.

    Earlier work shows that agents do better with APIs or MCP tools than with only the screen, on the web (Song et al.) and on the desktop (OSWorld-MCP). We ask a different question: where do the tools come from when nobody has written them? Table A2 places this post next to earlier answers.

    Language models can already help to decompile binaries (LLM4Decompile). We do not know of earlier work where the agent turns this analysis into a tool server and then does a user's tasks through the server.