Local AI Automation
Since 2.3, WPE can hand its existing features to an AI client on the same machine that speaks MCP: read packets, look at logs, write filters, create accounts, run senders and robots — all by conversation. This chapter covers the WPE side: how to switch it on, how to read its state, what it can read and write, and what to watch out for.
MCP is a local channel: the AI client and the server both run on this computer, and neither starts the other.
- Start WPE first. The connector never starts WPE, the proxy, injection or Remote Management — it only talks to a WPE that is already running.
- Home screen → MCP Settings: make sure Enable MCP service is on (it is by default), then decide about MCP operations need confirmation.
- Check the MCP status lamp at the right-hand end of the status bar: as long as it is not grey, the service is up.
- Add a stdio server to your AI client's MCP configuration pointing at
C:\WPE64DB\McpServer\WPEMcpServer.exe, then connect once.
01 · What this is
MCP (Model Context Protocol) is a common interface between AI clients and programs on the same machine. WPE 2.3 implements the server side: it wraps its own features into named "tools" that a connected AI client can call — so instead of clicking through menus you can say "change the third byte of that packet to 0x10 and send it again".
- It is local: the service runs alongside WPE on this computer and serves the current Windows user only. No internet, no account.
- WPE has to be running: the connector presses WPE's buttons for you; it never starts anything. Close WPE and the AI client reports the service offline.
- WPE is the only source of truth: every read and write goes through WPE's own entry points — the AI client never edits your configuration files or database behind its back.
- Who uses it: you. Whoever runs WPE can drive it over MCP, so this has to be your own, trusted machine.
02 · MCP Settings
The entry is the second narrow row on the home screen (the one labelled MCP), with the number of available tools on the right. It opens a sectioned dialog like every other setting: two switches and one list.
| Switch | Default | What it does |
|---|---|---|
| Enable MCP service | On | Once off, an AI client on this machine can neither discover nor reach WPE's MCP service, and any session already connected ends with it |
| MCP operations need confirmation | On | On: every call that would change WPE asks for confirmation inside WPE first and only runs once you approve it. Off: such calls execute straight away. The switch only decides whether you are asked — every call is written to the MCP log either way |
The MCP tool list below shows every tool actually registered (125 of them in 2.3), grouped as proxy / inject / packet / filter / send / robot / warehouse / settings / other, each with its name and a one-line description — this list matches what the AI client sees one for one. Write tools are marked according to the confirmation switch above. This tutorial also carries the list on the web — see Chapter 9 · MCP Tool Reference.
The MCP Settings entry stays on the home screen when the master switch is off (otherwise there would be no way back in), so you can come back and enable it again at any time.
03 · State and logs
- The MCP status lamp (right-hand end of the status bar, right after the proxy state): grey = MCP service off; amber = running, writes need your confirmation; green = running, writes can execute automatically. One lamp tells you which state you are in
- The MCP log (Proxy / Inject Mode → System Log, the fourth tab — see Tools, section 07): every tool call, the write-audit verdict and any error. The module column carries the tool name, so this is the page to read when you want to know what the AI actually touched
04 · Connecting an AI client
The WPE release ships a self-contained connector, WPEMcpServer.exe (no extra runtime needed). The launcher syncs it to a fixed path on every start:
C:\WPE64DB\McpServer\WPEMcpServer.exe
- Add a stdio server to your AI client's MCP configuration with that path as the command (if the client wants a full command line, this exe on its own, with no arguments).
- Keep WPE running and let the client connect once: it discovers the WPE instance running under the current user and pulls the tool list.
- Close WPE and the client reports the service offline; connect again next time WPE is up. Nothing in the configuration changes.
The connector does not live in the per-version folder that changes on every start; it is synced to a fixed path, so upgrading WPE does not touch the AI client's configuration.
Using VS Code
VS Code puts MCP inside GitHub Copilot Chat — MCP servers are used through Copilot's agent mode, so install the Copilot extension and sign in first (with Copilot unavailable, the server in your configuration will not start), then connect WPE in three steps.
- Open the configuration file: run MCP: Open User Configuration from the Command Palette (Ctrl+Shift+P) — that is the user-level file, configured once and available in every workspace; to scope it to one project, open that project's
.vscode/mcp.json. You can also run MCP: Add Server and pick Workspace or Global, which writes the block below for you. - Paste this in. Note that backslashes in a Windows path must be doubled; the file has completion and validation, so a misspelled key is flagged as you type:
{"servers": {"wpe": {"type": "stdio","command": "C:\\WPE64DB\\McpServer\\WPEMcpServer.exe"}}} - Start it and trust it: once saved, a Start link appears in the file — click it. The first start asks you to confirm that you trust the server; once confirmed, VS Code discovers the tools and exposes them in chat. If the tool list goes stale (after a WPE upgrade, say), run MCP: Reset Cached Tools.
Then open the Chat view (Ctrl+Alt+I), switch to agent mode and just ask in plain language — "read me the current packet list", for instance. The Configure Tools button next to the chat input lists every WPE tool and lets you enable or disable them one by one.
| In VS Code | What to do |
|---|---|
| The server is missing, or its tools never show up in chat | Check in order: WPE is running · the master switch in MCP Settings is on · the server has been started · you confirmed the trust prompt (a server you have not trusted is never started) |
| You want to be asked again | Command Palette → MCP: Reset Trust; the next start asks once more |
| A call fails and you want the server's own error | Command Palette → MCP: List Servers, pick the wpe entry → Show Output |
05 · What it can do
Tools come in read-only and write flavours. Read tools let the AI look; write tools let it change things — the latter are governed by "MCP operations need confirmation".
| Kind | Group | What it does |
|---|---|---|
| Read | Packets and connections | List packets, read one packet's full bytes (both the current and the original payload), filter by condition, inspect connections and statistics |
| State and logs | Read the proxy and inject runtime state, the account list, all four logs, the WPC servers and notices, and the current settings | |
| Write | Rules and data | Filters (add / edit / enable / reorder), proxy accounts (including batch and import), warehouses, auto-store, WPC servers |
| Automation | Send lists and robots (create / edit / start / stop), plus an emergency stop that halts running senders and robot executors. It only stops; it never starts a task | |
| Capture and edit | Editing and replaying a single packet; triggering an existing injection flow (choosing the target still works exactly as it does in the UI) | |
| Network and control | Proxy settings, Force Proxy process settings, the firewall lists, Map Local and Map Remote, and backup export / import |
- One extra thing on the start page: while you are still on the home screen and have not entered a mode, the AI can pick Proxy or Inject Mode for you. That is only a choice between the two modes — it starts no listener and injects nothing — and the ability disappears once you leave the home screen (picking the mode you are already in just reports that nothing needs doing)
- Two things are not offered: arbitrary file and clipboard access, and injection that runs without confirmation
06 · Using it, and troubleshooting
MCP hands WPE's controls to an AI, so keep these in mind:
- Only enable it on your own computer: the service and its discovery record are visible to the current Windows user only, so other users on the same machine cannot see them. Turning the master switch off when you are done is the simplest habit
- When in doubt, keep confirmation on: with it on, every write asks inside WPE — the decision to execute stays with you
- Read tools return complete data: packet contents and account passwords are handed to the client as they are. Connect only clients you trust
| Symptom | What to check first |
|---|---|
| The client cannot connect, or reports WPE offline | ① Is WPE running? ② Is the master switch still on in MCP Settings on the home screen? ③ Is the MCP status lamp on the status bar grey? |
| The tools are listed but every call fails | Read the MCP log tab: it carries the tool name and the reason it failed. Some tools only work under certain conditions — "pick a mode" needs you to still be on the home screen, and the send / robot tools need a target process attached |
| The AI says it changed something and the UI does not show it | List-type changes apply immediately; settings that concern a running service (listening ports, the system proxy) still follow the old rule — stop the service before changing them |
| You want it to stop writing | Turn on "MCP operations need confirmation", or switch the master switch off (an already-connected session ends with it) |