Skip to content

Commit cfd23ef

Browse files
Enhance clarity and structure in Binary Ninja integration guide for ChatGPT
1 parent a3715b7 commit cfd23ef

File tree

1 file changed

+68
-44
lines changed

1 file changed

+68
-44
lines changed

_posts/2025-11-16-binary-ninja-with-chatgpt-win-client.md

Lines changed: 68 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,25 @@ description: Connect Binary Ninja to the ChatGPT desktop app via MCP and ngrok t
77
media_subpath: /assets/img/2025-11-16-binary-ninja-with-chatgpt-win-client
88
---
99

10-
Using native custom tools in the ChatGPT desktop app is a bit tricky: it doesn't yet support the full MCP feature set that local AI agents do, and the built-in connectors/plugins run in the cloud.
10+
Using **native custom tools** in the ChatGPT desktop app is still a bit awkward: it doesn’t expose the full MCP feature set that local AI agents do, and the built-in connectors/plugins all run in the cloud.
1111

12-
However, since the desktop app is a frontend for OpenAI's GPT-5.1 Thinking model (standard vs extended thinking), if we can connect a local MCP/tool as a connector to the ChatGPT app, we can reuse the capabilities you already pay for in your ChatGPT subscription — with the nice desktop UI — and wire them directly into Binary Ninja.
12+
However, the desktop app is “just” a frontend for OpenAIs GPT-5.1 Thinking model (standard vs. extended thinking). If we can connect a local MCP tool server as a **connector** to the ChatGPT app, we can:
1313

14-
This post walks through how to connect Binary Ninja to the ChatGPT desktop app to build an automated, low-cost (assuming you already have ChatGPT Plus) workflow for AI-assisted reverse engineering.
14+
- Reuse the compute you already pay for in your ChatGPT subscription,
15+
- Keep Binary Ninja running locally,
16+
- And control it from a nice desktop UI.
17+
18+
This post walks through how to connect **Binary Ninja** to the **ChatGPT desktop app** to build an automated, low-cost (assuming you already have ChatGPT Plus) workflow for AI-assisted reverse engineering.
19+
20+
> These steps were tested on Windows, but the overall MCP / connector flow is the same on macOS and Linux. You mainly need to adjust paths and shell commands.
21+
{: .prompt-info }
22+
23+
---
1524

1625
## Prerequisites
1726

27+
You’ll need:
28+
1829
- **ChatGPT desktop client (Windows/macOS)**
1930
Version `1.2025.258` or later.
2031

@@ -24,7 +35,10 @@ This post walks through how to connect Binary Ninja to the ChatGPT desktop app t
2435
- **Basic familiarity with:**
2536
- Python virtual environments
2637
- MCP concepts (tool servers over stdio/HTTP)
27-
- Ngrok or similar HTTP tunneling tools
38+
- ngrok or a similar HTTP tunneling tool
39+
40+
> If you already have a preferred virtual-environment tool (e.g., `venv`, Poetry, Conda), you can use that instead of `uv`—just adapt the commands in this guide.
41+
{: .prompt-tip }
2842

2943
---
3044

@@ -44,7 +58,7 @@ Open the binary you want to analyze, then click that indicator. It should change
4458

4559
> `MCP: Running`
4660
47-
This means the MCP bridge script is active inside Binary Ninja.
61+
This means the MCP bridge script is active inside Binary Ninja and ready to accept connections.
4862

4963
![Binary Ninja MCP plugin in plugin manager](image-20251116173708685.png)
5064

@@ -56,15 +70,15 @@ This means the MCP bridge script is active inside Binary Ninja.
5670

5771
Next, locate the plugin’s community folder.
5872

59-
On **Windows**, the path should look like:
73+
On **Windows**, the path typically looks like:
6074

6175
```text
6276
C:\Users\{username}\AppData\Roaming\Binary Ninja\repositories\community\plugins\fosdickio_binary_ninja_mcp
63-
```
77+
````
6478
65-
Inside that folder, find the **`bridge`** subfolder. All following commands are run from there.
79+
Inside that folder, open the **`bridge`** subfolder. All commands in the rest of this guide are run from there.
6680
67-
It’s recommended to use **`uv`** (the Rust-based Python package manager) to manage a virtual environment:
81+
It’s convenient to use **`uv`** (the Rust-based Python package manager) to create an isolated environment:
6882
6983
```shell
7084
uv init
@@ -73,20 +87,23 @@ uv add -r .\requirements.txt
7387

7488
This will:
7589

76-
- Initialize a new Python project with an isolated environment.
77-
- Install the dependencies listed in `requirements.txt`.
90+
* Initialize a new Python project with an isolated environment.
91+
* Install the dependencies listed in `requirements.txt`.
7892

79-
------
93+
> Keep the `bridge` environment dedicated to this plugin. Mixing unrelated packages into the same environment can make debugging MCP issues much harder later.
94+
> {: .prompt-warning }
95+
96+
---
8097

8198
## Step 3 – Convert the bridge to a FastMCP HTTP server
8299

83-
The original bridge script only supports **stdio** as an MCP transport, but the ChatGPT desktop app expects an HTTP-based MCP endpoint. So we’ll switch it to use **FastMCP** with `streamable-http` transport.
100+
The original bridge script only supports **stdio** as an MCP transport, but the ChatGPT desktop app expects an **HTTP-based** MCP endpoint. To fix that, we’ll switch it to **FastMCP** with the `streamable-http` transport.
84101

85102
From the `bridge` folder, do the following.
86103

87104
### 3.1 – Install `fastmcp`
88105

89-
Instead of relying on the MCP Python library’s built-in FastMCP, use the dedicated `fastmcp` package for better compatibility:
106+
Instead of relying on the MCP Python library’s built-in FastMCP, install the dedicated `fastmcp` package for better compatibility:
90107

91108
```shell
92109
uv add fastmcp
@@ -126,13 +143,11 @@ This exposes the MCP server over HTTP on `localhost:8050`.
126143

127144
As of **2025-11-16**, the ChatGPT desktop app runs an internal validation pass (likely using a small model) to decide whether a connector is “safe.” If the connector fails that check, you might see:
128145

129-
> ```
130-
> Connector is not safe
131-
> ```
146+
> `Connector is not safe`
132147
133148
when trying to add it.
134149

135-
A practical workaround (described in the OpenAI community thread) is to provide very explicit safety instructions in the MCP metadata:
150+
A practical workaround (described in an OpenAI community thread) is to provide very explicit safety instructions in the MCP metadata:
136151

137152
Change:
138153

@@ -160,14 +175,14 @@ You should see logs indicating that the MCP server is up and listening on the co
160175

161176
![FastMCP bridge running](image-20251116180038803.png)
162177

163-
------
178+
---
164179

165180
## Step 4 – Expose the MCP server using ngrok
166181

167-
The MCP server is currently running **locally**. For the ChatGPT **cloud** environment to reach it, we need to expose it via a reverse proxy. Here we’ll use **ngrok**.
182+
Right now the MCP server is running **locally**. For the ChatGPT **cloud** environment to reach it, we need to expose it via a reverse proxy. Here we’ll use **ngrok**.
168183

169184
1. Sign up for an ngrok account (if you don’t already have one):
170-
https://dashboard.ngrok.com/signup
185+
[https://dashboard.ngrok.com/signup](https://dashboard.ngrok.com/signup)
171186

172187
2. Install ngrok. On Windows, you can download it from the Microsoft Store or directly from their site.
173188

@@ -193,7 +208,10 @@ https://your-random-subdomain.ngrok-free.app
193208

194209
We’ll use this URL in the ChatGPT connector configuration.
195210

196-
------
211+
> When ngrok is running, anything that can reach the public URL can talk to your MCP server. Only expose this from a trusted network, and avoid loading highly sensitive or proprietary binaries while experimenting.
212+
> {: .prompt-danger }
213+
214+
---
197215

198216
## Step 5 – Create a custom connector in the ChatGPT desktop app
199217

@@ -204,22 +222,22 @@ Open the **ChatGPT desktop app**.
204222

205223
![Enable developer mode in ChatGPT desktop](image-20251116180911413.png)
206224

207-
1. Click the **Back** button, then click **Create** on the top-right to create a new connector.
225+
3. Click the **Back** button, then click **Create** in the top-right to create a new connector.
208226

209227
Fill in the fields:
210228

211-
- **Name**: e.g., `Binary Ninja MCP`
229+
* **Name**: e.g., `Binary Ninja MCP`
212230

213-
- **Description**: e.g., `Use Binary Ninja analysis tools from ChatGPT`
231+
* **Description**: e.g., `Use Binary Ninja analysis tools from ChatGPT`
214232

215-
- **Icon**: You can use the Binary Ninja icon from:
233+
* **Icon**: You can use the Binary Ninja icon from:
216234

217235
```text
218236
C:\Users\{username}\AppData\Local\Programs\Vector35\BinaryNinja
219237
```
220238

221-
- **MCP server URL**:
222-
Use the HTTPS endpoint from ngrok **plus `/mcp`**. For example:
239+
* **MCP server URL**:
240+
Use the HTTPS endpoint from ngrok **plus `/mcp`**. For example:
223241

224242
```text
225243
https://your-random-subdomain.ngrok-free.app/mcp
@@ -229,27 +247,37 @@ Fill in the fields:
229247

230248
Save the connector.
231249

232-
------
250+
---
233251

234252
## Step 6 – Use Binary Ninja from the ChatGPT desktop app
235253

236254
Back in the ChatGPT desktop app, open a new chat:
237255

238-
1. In the model selector, choose the **Binary Ninja connector** you just created (or select the GPT model and pick the connector under tools, depending on UI).
239-
2. Start chatting and issue a request that uses Binary Ninja (e.g., “Analyze the current function,” “Summarize cross-references to this address,” etc.).
256+
1. In the model selector, choose the **Binary Ninja connector** you just created (or pick a GPT model and enable the connector under **Tools**, depending on the UI).
257+
2. Start chatting and issue a request that uses Binary Ninja—for example:
258+
259+
* “Analyze the current function.”
260+
* “Summarize cross-references to this address.”
261+
* “Map out the call graph starting from the current function.”
240262

241263
![Using Binary Ninja connector from ChatGPT](image-20251116182608952.png)
242264

243265
When ChatGPT calls a tool for the first time in a session, it will ask for permission:
244266

245-
- Approve the tool call.
246-
- Optionally check **“Remember”** to auto-approve that tool for the rest of the session.
267+
* Approve the tool call.
268+
* Optionally check **“Remember”** to auto-approve that tool for the rest of the session.
247269

248270
![Tool permission prompt in ChatGPT desktop](image-20251116182849994.png)
249271

250272
At this point, you have Binary Ninja wired into ChatGPT, with the MCP bridge and ngrok tunnel in between.
251273

252-
------
274+
> If the connector appears but calls fail, double-check:
275+
> – Is the MCP server running in the `bridge` environment?
276+
> – Is ngrok still active and pointing at the correct port?
277+
> – Did you include the `/mcp` suffix in the connector URL?
278+
> {: .prompt-tip }
279+
280+
---
253281

254282
## Step 7 – Example reverse-engineering prompt
255283

@@ -349,19 +377,15 @@ Binary Ninja aids
349377
* Prefer HLIL; drop lower when needed for precision.
350378
```
351379

352-
You can tweak this further (e.g., add rules for malware-specific behaviors, a particular C2 family, or your internal naming conventions), but this should give ChatGPT enough structure to do serious, repeatable reverse-engineering passes with Binary Ninja.
380+
You can tweak this further—for example, adding rules for specific malware families, internal naming conventions, or your own note-taking style—but it should give ChatGPT enough structure to perform serious, repeatable reverse-engineering passes with Binary Ninja.
353381

354-
------
382+
---
355383

356-
That’s ityou now have a Binary-Ninja-to-ChatGPT workflow that’s:
384+
That’s ityou now have a Binary-Ninja-to-ChatGPT workflow that’s:
357385

358-
- Local where it matters (Binary Ninja, your binaries),
359-
- Cloud where it’s convenient (ChatGPT’s reasoning),
360-
- And glued together with an MCP bridge plus ngrok.
386+
* Local where it matters (Binary Ninja, your binaries),
387+
* Cloud where it’s convenient (ChatGPT’s reasoning),
388+
* And glued together with an MCP bridge plus ngrok.
361389

362390
Happy reversing!
363391

364-
```
365-
:contentReference[oaicite:0]{index=0}
366-
::contentReference[oaicite:1]{index=1}
367-
```

0 commit comments

Comments
 (0)