VPN Gate MCP Server
by vito1317
README.md
# VPN Gate MCP Server
An MCP (Model Context Protocol) server that provides automatic VPN rotation via [VPN Gate](https://www.vpngate.net/). Designed for authorized penetration testing workflows where IP rotation is needed to avoid WAF/rate-limit blocking.
## Features
- **list_servers** — Fetch and rank available VPN Gate servers by speed, with optional country filter
- **connect** — Connect to a VPN Gate server (fastest by default, or specify country/IP)
- **disconnect** — Disconnect the current VPN connection
- **check_ip** — Check current public IP and VPN connection status
- **auto_rotate** — One-click IP rotation: disconnect → pick new server → connect (avoids blocked IPs)
## Requirements
- Node.js >= 18
- OpenVPN client installed (`openvpn` command available)
- Root/sudo access (OpenVPN requires elevated privileges)
- `curl` for IP checking
## Installation
### From Source
```bash
git clone https://github.com/vito1317/vpngate-mcp-server.git
cd vpngate-mcp-server
npm install
npm run build
```
### Docker
```bash
docker build -t vpngate-mcp-server .
```
## MCP Configuration
### Claude Desktop / Cowork (stdio mode)
Add to your MCP settings:
```json
{
"mcpServers": {
"vpngate": {
"command": "node",
"args": ["/path/to/vpngate-mcp-server/dist/index.js"]
}
}
}
```
### Docker (stdio mode)
```json
{
"mcpServers": {
"vpngate": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"--cap-add=NET_ADMIN",
"--device=/dev/net/tun",
"vpngate-mcp-server"
]
}
}
}
```
> **Note:** `--cap-add=NET_ADMIN` and `--device=/dev/net/tun` are required for OpenVPN to create tunnel interfaces.
### With cve-hunter Plugin (Bolt MCP)
If using alongside the cve-hunter plugin with Bolt:
```json
{
"mcpServers": {
"bolt": {
"command": "docker",
"args": ["exec", "-i", "bolt", "node", "/app/mcp-filter.js"]
},
"vpngate": {
"command": "node",
"args": ["/path/to/vpngate-mcp-server/dist/index.js"]
}
}
}
```
## Usage Examples
### List available servers
```
Use the list_servers tool to show top VPN Gate servers.
Filter by country: list_servers with country="JP"
```
### Connect to fastest server
```
Use the connect tool to connect to the fastest available VPN server.
Or specify a country: connect with country="US"
```
### Auto-rotate when blocked
```
When WAF blocking is detected (HTTP 403/429), use auto_rotate to:
1. Disconnect current VPN
2. Pick a new fast server (avoiding the blocked IP)
3. Connect automatically
```
### Pentest workflow
```
1. Start scan → detect WAF block (403/429)
2. auto_rotate (avoid_ip="blocked.ip.address")
3. Verify new IP with check_ip
4. Resume scanning with reduced intensity
```
## Security Notice
This tool is designed for **authorized penetration testing only**. Always ensure you have written authorization before scanning any target. Unauthorized access to computer systems is illegal.
## License
MIT