A secure bridge between AI assistants and Windows computers through controlled PowerShell automation and MCP communication.
PowerShell Guardian is an open-source security bridge that allows AI assistants such as ChatGPT to communicate with Windows computers through a controlled PowerShell execution layer.
The project is designed around a simple principle:
AI should assist your computer, but you should remain in control.
Instead of providing unrestricted access, PowerShell Guardian introduces a controlled gateway between AI systems and Windows automation.
AI Assistant
|
|
MCP Communication
|
|
OpenAI Secure Tunnel
|
|
PowerShell Guardian Gateway
|
|
Windows PowerShell
|
|
Local Computer
Execute Windows automation tasks through a controlled security layer.
Designed for:
- ChatGPT integrations
- MCP compatible assistants
- AI automation workflows
Possible use cases:
- System information
- File management
- Development workflows
- Productivity automation
- Local computer assistance
PowerShell Guardian focuses on:
- Local-first execution
- Permission control
- Command filtering
- Audit visibility
- User ownership
This repository contains the source code.
The installer is intentionally created locally by the user.
You have two options:
- Build the installer yourself from source.
- Download an installer from GitHub Releases when available.
Install:
- Windows 10/11
- PowerShell
- C++ compiler
- NSIS Installer System
git clone https://github.com/CaptainVid/PowerShellGuardian.git
cd PowerShellGuardianRun:
.\build.ps1Install NSIS:
Then:
makensis installer/PowerShellGuardian.nsiYour installer will be generated locally.
PowerShell Guardian requires an OpenAI Tunnel connection.
Open:
https://platform.openai.com/settings/organization/tunnels
Create a new tunnel and copy your Tunnel ID.
Example:
tunnel_xxxxxxxxxxxxx
Keep this value private.
Open:
https://platform.openai.com/settings/organization/api-keys
Create a dedicated API key.
Example:
sk-proj-xxxxxxxxxxxxxxxx
Never upload API keys to GitHub.
Edit:
config/tunnel.json
Add:
{
"tunnel_id": "YOUR_TUNNEL_ID",
"api_key": "YOUR_API_KEY"
}Replace the placeholders with your own values.
Launch the application.
It will:
- Start the local gateway.
- Start the secure tunnel.
- Connect the AI communication layer.
- Wait for ChatGPT communication.
Keep it running while using ChatGPT.
Open ChatGPT.
Go to:
Settings
Then:
Apps / Connectors
Add a new connector and configure the MCP/tunnel connection.
Enter your Tunnel ID and save.
Your ChatGPT instance can now communicate with your Windows computer through PowerShell Guardian.
Check:
- PowerShell Guardian is running.
- Tunnel ID is correct.
- API key is valid.
- Internet connection works.
Check:
- Compiler installation.
- PowerShell permissions.
- NSIS installation.
You can ask ChatGPT or another AI assistant for help.
Include:
- Error messages
- Screenshots
- Build output
- Windows version
Never share:
- API keys
- Tokens
- Private credentials
Open an issue:
https://github.com/CaptainVid/PowerShellGuardian/issues
Include the problem description and steps already attempted.
PowerShellGuardian
βββ src/
βββ installer/
βββ config/
βββ mcp/
βββ tunnel/
βββ tests/
βββ assets/
This project uses external components:
- OpenAI tunnel-client
- Cloudflare cloudflared
See:
THIRD_PARTY_NOTICES.md
for licensing information.
Contributions and security reviews are welcome.
Please read:
SECURITY.md
before reporting security issues.
See:
LICENSE
::: {align="center"}
PowerShell Guardian
Secure AI communication with Windows.
:::