Skip to main content
Glama
README.md
# Gemini Windows MCP

**Control your own Windows PC from Gemini in your browser. Skip the Antigravity install.**

Start Windows MCP on your PC, then add it under **Connected Apps → Custom apps** in Gemini. With **Full desktop** enabled, you can ask Gemini to open Notepad, take a screenshot, click or type, or create and read back a file in a folder you choose.

Use the connected app in Gemini chat. If your account offers Task, you can use it there too. The setup guide explains account eligibility, the HTTPS address, and GitHub sign-in.

[Download for Windows](#download-for-windows) · [Gemini web setup](README.gemini.md) · [简体中文](README.zh-CN.md) · [MIT license](LICENSE.md)

## Gemini web demo

In a browser test, we selected **Windows Desktop MCP** with `@` and asked Gemini to create `Gemini-Hello.txt` on a Windows PC, write a greeting, and read it back. We used **Allow once** for the file actions.

![Gemini's web reply showing the greeting it read from the test file](assets/gemini-file-readback.jpg)

The screenshot shows Gemini's readback in Chinese. The file contained “Hello! This is a greeting from Gemini via MCP.” To try it on your PC, enable **Full desktop**, name an empty test folder in your prompt, and open the new file in Windows to check the result. [Gemini web setup](README.gemini.md)

## Download for Windows

| Package | Pick this if you want to… |
| --- | --- |
| [Desktop app ZIP](../../releases/latest/download/Windows-MCP-Desktop-win-x64.zip) | Use a window to change settings, register a local client, or connect Gemini in your browser. The app interface is in Simplified Chinese. |
| [Command-line ZIP](../../releases/latest/download/Windows-MCP-CLI-win-x64.zip) | Add the server to Codex, Gemini CLI, or another local MCP client using PowerShell. |

Both packages include Python and its dependencies. Use 64-bit Windows 10 or 11. On Windows 11 ARM64, the packages use Windows' x64 emulation. In GitHub's **Releases** sidebar, look under **Assets** for the filenames in the table if a direct link is unavailable. GitHub's **Source code** archives require the source setup described below.

<details>
<summary>Download from PowerShell</summary>

Paste the GitHub repository's home page URL when prompted. Run this in the folder where you want the ZIP. For the desktop package, replace `CLI` with `Desktop` in the filename.

```powershell
$repo = (Read-Host 'GitHub repository URL').TrimEnd('/')
$file = 'Windows-MCP-CLI-win-x64.zip'
Invoke-WebRequest -Uri "$repo/releases/latest/download/$file" -OutFile $file
```

</details>

### Desktop app

![Windows MCP desktop app showing gateway status and setup links](assets/desktop-preview.png)

1. Right-click the ZIP in File Explorer and choose **Extract All**. Pick a new folder you can write to, such as `Documents\Windows MCP Desktop`.
2. Open that folder and double-click `Start-Windows-MCP.exe`. The **Windows MCP** window opens without a console. If Windows asks about the unsigned launcher, check that this is the file from this project's release and verify the ZIP hash below before opening it.
3. For a locally installed Codex or Gemini CLI, open **本机控制** (Local control) and click **注册到 Codex** or **注册到 Gemini CLI**. Confirm the change to your client settings and reopen the client. You can leave the web gateway stopped for this route.
4. For Gemini in a browser, follow the [Gemini web walkthrough](README.gemini.md). The buttons in **Gemini 接入** (Gemini setup) open Chrome by default. Pick Edge or your system browser in **跳转浏览器** and click **保存配置** (Save) to remember it.

For a desktop shortcut, open PowerShell in the extracted folder and run the command below. It adds a **Windows MCP** shortcut with the app icon. Open PowerShell there by typing `powershell` in File Explorer's address bar and pressing Enter.

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File .\install-desktop-shortcut.ps1
```

### Command-line package

1. Extract the ZIP to its own folder, such as `Documents\Windows MCP CLI`. Open that folder in File Explorer, type `powershell` in the address bar, and press Enter.
2. Run `.\windows-mcp.cmd --help` to check that the launcher is available.
3. Run the commands for **one** of the clients below from that folder. Install your chosen client first.

**Codex**

```powershell
codex mcp add windows-mcp -- "$PWD\runtime\python.exe" "$PWD\serve_local.py"
codex mcp list
```

**Gemini CLI**

```powershell
gemini mcp add --scope user windows-mcp "$PWD\runtime\python.exe" "$PWD\serve_local.py"
gemini mcp list
```

Close and reopen the client. For another local MCP client, choose **stdio** (a local program the client starts), provide the full path to `runtime\python.exe` as the command, and give the full path to `serve_local.py` as its one argument. Running `windows-mcp.cmd` by itself starts the protocol and waits for a client to connect. Client reference pages provide additional configuration examples. [Codex MCP docs](https://developers.openai.com/codex/mcp) · [Gemini CLI MCP docs](https://geminicli.com/docs/tools/mcp-server/)

### Try one action

Send this prompt to your client.

> Use the Windows MCP `DisplayInventory` tool to tell me how many monitors Windows sees and their resolutions.

A successful tool call returns the display list. For a file test, make an empty test folder and copy its full path from File Explorer. Ask the client to use Windows MCP to create `hello-mcp.txt` in that folder, with `overwrite=false`, then read back the greeting. Open the same folder in File Explorer to check the result. For keyboard and mouse tests, keep Windows signed in and unlocked.

## Gemini on the web

The [step-by-step guide](README.gemini.md) shows where to get the ngrok domain and token, how to fill in the GitHub OAuth form, and how to run a read-only trial in Gemini. Gemini's web app must offer **Custom apps** on your account. The optional gateway gives Gemini an authenticated HTTPS connection back to this PC. Keep Windows and the gateway running while the task uses the tools. [Google's eligibility and setup help](https://support.google.com/gemini/answer/17209137?hl=en)

## Troubleshooting

| What you see | What to do |
| --- | --- |
| The desktop window does not open | Extract the full ZIP and launch from the extracted folder. Check that `runtime\pythonw.exe` is beside the launcher's other files in the `runtime` folder. |
| The client says `codex` or `gemini` is missing | Install the corresponding client, open a fresh PowerShell window, and run `Get-Command codex` or `Get-Command gemini`. Then register Windows MCP. |
| The assistant answers without using Windows MCP | Check `codex mcp list` or `gemini mcp list`, reopen the client, and name the MCP tool in your prompt. After moving the extracted folder, update the client's saved paths. |
| File creation fails | Check that the full path leads to a folder you can write to. If the test filename already exists, choose a fresh name. |
| Windows operations pause or the screenshot is blank | Unlock the desktop and check that the target app is visible. Physical mouse input can take control back. Try one desktop task at a time. |
| Dragging a Start menu tile or pinned taskbar button has no effect | These use Windows XAML shell surfaces. Use clicks or keyboard shortcuts to work with them. |
| Gemini web cannot connect after a restart | Check **运行日志** (Logs), confirm the address matches the current profile, and follow the reconnect steps in the [Gemini guide](README.gemini.md). |

To verify a download, save [SHA256SUMS.txt](../../releases/latest/download/SHA256SUMS.txt) alongside your ZIP. Run the following command in the download folder and compare the shown hash with the line for that filename. Use the CLI filename if you downloaded that package.

```powershell
Get-FileHash .\Windows-MCP-Desktop-win-x64.zip -Algorithm SHA256
```

## Files, permissions, and data

The tools run with your Windows account's permissions. The local and full desktop profiles can read and write text and binary files, and can send mouse and keyboard input to the active desktop. Their file tool requires `overwrite=true` to replace an existing file and disables deletion and overwriting by copy or move. A connected AI client can receive the contents of files and screenshots it requests. Use test files for the first run and keep credential files out of tool requests.

## Source and contributions

[Source setup and testing](CONTRIBUTING.md) · [Release build](docs/RELEASING.md) · [Local tool reference](README.local.md) · [Security reporting](SECURITY.md)

The Windows application uses Python and Tkinter. FastMCP handles MCP connections. Windows UI Automation, pywin32, and Pillow provide desktop integration and screen capture. The desktop and file engine builds on [CursorTouch/Windows-MCP](https://github.com/CursorTouch/Windows-MCP), upstream v0.9.1 (`56c1a83`). This distribution adds portable packages, a desktop setup app, and an optional authenticated Gemini web gateway. [MIT license](LICENSE.md)