Overview
Codex can connect to Leapwork Play through MCP. After connecting, you can ask Codex to perform work in Leapwork Play while it also works with your local files, repository, and other Codex tools.
For example, you can ask Codex:
-
Create a test case in Leapwork Play for this bug. -
Search Leapwork Play for test cases mentioning admin. -
Open the failing test case in Leapwork Play and start a browser session.
Codex will use your normal Leapwork Play account, so it has the same access and permissions that you have in the product.
Before You Start
You need:
-
Codex installed and signed in.
-
Access to Leapwork Play.
The MCP server URL looks like this:
https://mcp.leapwork.ai/mcp
Setup
From a terminal, add Leapwork Play as a remote MCP server:
codex mcp add play --url https://mcp.leapwork.ai/mcp
Then verify that Codex has the server configured:
codex mcp list
Expected result:
play
If Codex prompts for authentication, complete the browser sign-in flow.
After sign-in, Codex should be able to call Leapwork Play through the play MCP server.
Using Leapwork Play
Once connected, ask Codex for what you want done in Leapwork Play:
Create a test case in Leapwork Play named after a famous musician.
If Leapwork Play needs approval or clarification, Codex will show that response and can continue the operation after you answer.
Leapwork Play uses MCP Streamable HTTP for Codex. Long-running requests stay connected while Leapwork Play plans and performs the work, and Codex receives the final result, approval prompt, or clarification prompt when the operation reaches that state.
Troubleshooting
If Codex says the server failed to connect:
-
Make sure the MCP URL ends with
/mcp. -
Make sure Leapwork Play is reachable from your machine.
-
Run
codex mcp listto check that theplayserver is configured. -
Reconnect or re-authenticate the
playserver if Codex prompts you to do so.
If authentication succeeds but the server still fails to connect, ask your Leapwork Play administrator to check that external MCP authentication is enabled for your Leapwork Play environment.
Current limitations
-
If a connection drops, ask Codex to check the pending Leapwork Play request and continue from there.