Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions .grok-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,37 @@
"path": "./plugins/grokhunter-termux-connect"
},
"homepage": "https://finecomputer14451.github.io/GrokHunter/",
"keywords": ["grokhunter termux connect", "grokhunter termux mcp", "termux connect grokhunter"],
"domains": ["finecomputer14451.github.io"]
"keywords": [
"grokhunter termux connect",
"grokhunter termux mcp",
"termux connect grokhunter"
],
"domains": [
"finecomputer14451.github.io"
]
},
{
"name": "grokhunter-grok-build-connect",
"description": "Bridge Grok Bot to local Grok Build (grok CLI) via HTTP MCP + tunnel. Termux and desktop.",
"category": "development",
"version": "1.0.0",
"author": {
"name": "FineComputer14451",
"url": "https://github.com/FineComputer14451/GrokHunter"
},
"source": {
"type": "local",
"path": "./plugins/grokhunter-grok-build-connect"
},
"homepage": "https://finecomputer14451.github.io/GrokHunter/",
"keywords": [
"grokhunter grok build connect",
"grok build mcp",
"grok connect"
],
"domains": [
"finecomputer14451.github.io"
]
}
]
}
24 changes: 24 additions & 0 deletions .grok-plugin/plugin-index.json
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,30 @@
}
],
"version": "1.0.0"
},
{
"agents": [],
"commands": [
{
"description": "Install Grok Build Connect MCP on Termux or desktop",
"name": "grok-build-connect-install"
},
{
"description": "Tunnel Grok Build Connect MCP with Cloudflare",
"name": "grok-build-connect-tunnel"
}
],
"hooks": [],
"lspServers": [],
"mcpServers": [],
"name": "grokhunter-grok-build-connect",
"skills": [
{
"description": "Bridge Grok Bot to the local Grok Build (grok) CLI via authenticated HTTP MCP + Cloudflare/ngrok tunnel on Termux or desktop.",
"name": "grok-build-connect"
}
],
"version": "1.0.0"
}
]
}
2 changes: 2 additions & 0 deletions docs/MARKETPLACE.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ grok plugin install grokhunter-ci --trust
| `grokhunter-desktop` | GrokHunter X11 desktop — grokhunter binds, nh-x11, bwrap black-screen triage (rootless). |
| `grokhunter-overlay` | GrokHunter overlay cache — install.sh --overlay-only, MODULES_VERSION, PATH wrappers. |
| `grokhunter-tookie` | Authorized public username OSINT with Tookie-OSINT (Sherlock-class). Scoped GrokHunter mod… |
| `grokhunter-grok-build-connect` | Bridge Grok Bot ↔ local `grok` CLI via HTTP MCP + tunnel (Termux + desktop). |
| `grokhunter-termux-connect` | Bridge Grok Bot ↔ Termux via HTTP MCP + tunnel (not native Local Computer). |
| `grokhunter-full` | Complete GrokHunter Grok Build pack — core, Coding Team, all lab specialists, desktop, ove… |

Expand Down Expand Up @@ -88,6 +89,7 @@ Native Grok Bot Local Computer is Mac/Windows only. To drive GrokHunter on Termu

```bash
grok plugin install grokhunter-termux-connect --trust
grok plugin install grokhunter-grok-build-connect --trust
bash ~/.… # see plugin README / skill termux-connect
```

Expand Down
22 changes: 22 additions & 0 deletions plugins/grokhunter-grok-build-connect/.cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "grokhunter-grok-build-connect",
"version": "1.0.0",
"description": "Bridge Grok Bot to local Grok Build (grok CLI) via authenticated HTTP MCP + tunnel. Termux and desktop. Not affiliated with xAI / OffSec / Termux / jorexdeveloper.",
"author": {
"name": "FineComputer14451",
"url": "https://github.com/FineComputer14451/GrokHunter"
},
"homepage": "https://finecomputer14451.github.io/GrokHunter/",
"repository": "https://github.com/FineComputer14451/GrokHunter",
"license": "MIT",
"keywords": [
"grokhunter grok build connect",
"grok build mcp",
"grok connect"
],
"logo": "assets/logo.png",
"displayName": "GrokHunter Grok Build Connect",
"category": "developer-tools",
"skills": "./skills/",
"commands": "./commands/"
}
18 changes: 18 additions & 0 deletions plugins/grokhunter-grok-build-connect/.grok-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "grokhunter-grok-build-connect",
"version": "1.0.0",
"description": "Bridge Grok Bot to local Grok Build (grok CLI) via authenticated HTTP MCP + tunnel. Termux and desktop. Not affiliated with xAI / OffSec / Termux / jorexdeveloper.",
"author": {
"name": "FineComputer14451",
"url": "https://github.com/FineComputer14451/GrokHunter"
},
"homepage": "https://finecomputer14451.github.io/GrokHunter/",
"repository": "https://github.com/FineComputer14451/GrokHunter",
"license": "MIT",
"keywords": [
"grokhunter grok build connect",
"grok build mcp",
"grok connect"
],
"logo": "assets/logo.png"
}
21 changes: 21 additions & 0 deletions plugins/grokhunter-grok-build-connect/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 GrokHunter contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
28 changes: 28 additions & 0 deletions plugins/grokhunter-grok-build-connect/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# grokhunter-grok-build-connect

Bridge **Grok Bot → local Grok Build (`grok` CLI)** via authenticated HTTP MCP + tunnel.
Works on **Termux and desktop**. Not affiliated with xAI / OffSec / Termux / jorexdeveloper.

## Why

Grok Bot’s native Local Computer is Mac/Windows. This plugin exposes your installed
`grok` CLI (phone or desktop) over HTTPS MCP so the Bot can call version/plugins/ask tools.

## Quick start

```bash
curl -fsSL https://raw.githubusercontent.com/FineComputer14451/GrokHunter/main/skills/grok-build-connect/scripts/bootstrap.sh | bash -s -- --tunnel
```

Default port **8766** (keeps Termux Connect on 8765 free).

## Security

- Listens on `127.0.0.1` only
- Bearer token required (min 24 chars)
- Path jail: `$HOME` (+ `$PREFIX` on Termux)
- Never commit `~/.grokhunter-grok-build-connect/token`

## Credits

See [CREDITS.md](https://github.com/FineComputer14451/GrokHunter/blob/main/CREDITS.md).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
description: Install Grok Build Connect MCP on Termux or desktop
---
Run:

```bash
bash skills/grok-build-connect/scripts/install.sh
~/.grokhunter-grok-build-connect/start.sh
```

Do **not** print `~/.grokhunter-grok-build-connect/token`. Next: `/grok-build-connect-tunnel`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
description: Tunnel Grok Build Connect MCP with Cloudflare
---
```bash
bash skills/grok-build-connect/scripts/tunnel-cloudflare.sh
```

Copy `https://….trycloudflare.com`, append `/mcp`. Bearer from `~/.grokhunter-grok-build-connect/token`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: grok-build-connect
description: >-
Use when bridging Grok Bot to the local Grok Build (`grok`) CLI via HTTP MCP +
Cloudflare/ngrok tunnel on Termux or desktop.
---
# Grok Build Connect (MVP)

Expose the **local `grok` CLI** to Grok Bot through an authenticated **HTTP MCP**
(and a tunnel). Works on **Termux and desktop**. Port default **8766** (Termux
Connect uses 8765).

## Install

```bash
curl -fsSL https://raw.githubusercontent.com/FineComputer14451/GrokHunter/main/skills/grok-build-connect/scripts/bootstrap.sh | bash -s -- --tunnel
```

Or from a checkout:

```bash
bash skills/grok-build-connect/scripts/install.sh
~/.grokhunter-grok-build-connect/start.sh
bash skills/grok-build-connect/scripts/tunnel-cloudflare.sh
```

## Grok Bot connector

1. Add custom connector (chat / desktop / grok.com/connectors)
2. URL: `https://<tunnel-host>/mcp`
3. Auth: Bearer from `~/.grokhunter-grok-build-connect/token` — never paste in chat

## Tools

`grok_version`, `grok_plugin_list`, `grok_mcp_list`, `grok_mcp_doctor`, `grok_ask`, `list_dir`, `read_file`

## Hard rules

- Never print the bearer token or secrets.env
- Not Magisk/root; not native Android Local Computer
- Coding lab only
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
#!/usr/bin/env bash
# Grok Build Connect — one-shot bootstrap (Termux or desktop).
# curl -fsSL https://raw.githubusercontent.com/FineComputer14451/GrokHunter/main/skills/grok-build-connect/scripts/bootstrap.sh | bash -s -- --tunnel
set -euo pipefail

REPO_URL="${GROKHUNTER_REPO_URL:-https://github.com/FineComputer14451/GrokHunter.git}"
BRANCH="${GROKHUNTER_BRANCH:-main}"
TARGET_DIR="${GROKHUNTER_DIR:-$HOME/GrokHunter}"
START_MCP=1
START_TUNNEL=0
START_FOREGROUND=0
REGISTER_MARKETPLACE=1
PORT="${GROK_BUILD_CONNECT_PORT:-8766}"

usage() {
cat <<'U'
GrokHunter Grok Build Connect bootstrap (Termux + desktop)

Options:
--dir PATH Clone/update location (default: ~/GrokHunter)
--tunnel Also start Cloudflare quick tunnel (tmux session: gbc-tun)
--no-start Do not auto-start MCP in tmux
--start Start MCP in the foreground (blocks; skips tmux)
--no-marketplace Skip grok plugin marketplace add
-h, --help Show help

Env:
GROKHUNTER_DIR, GROKHUNTER_REPO_URL, GROKHUNTER_BRANCH, GROK_BUILD_CONNECT_PORT
U
}

while [[ $# -gt 0 ]]; do
case "$1" in
--dir) TARGET_DIR="$2"; shift 2 ;;
--tunnel) START_TUNNEL=1; shift ;;
--no-start) START_MCP=0; shift ;;
--start) START_FOREGROUND=1; START_MCP=0; shift ;;
--no-marketplace) REGISTER_MARKETPLACE=0; shift ;;
-h|--help) usage; exit 0 ;;
*) echo "Unknown arg: $1" >&2; usage >&2; exit 2 ;;
esac
done

need() {
command -v "$1" >/dev/null 2>&1 || { echo "Missing dependency: $1" >&2; exit 1; }
}
need git
need python3
need bash

SCRIPTS=""
resolve_scripts() {
if [[ -f "$TARGET_DIR/skills/grok-build-connect/scripts/install.sh" ]]; then
SCRIPTS="$TARGET_DIR/skills/grok-build-connect/scripts"
elif [[ -f "$TARGET_DIR/plugins/grokhunter-grok-build-connect/skills/grok-build-connect/scripts/install.sh" ]]; then
SCRIPTS="$TARGET_DIR/plugins/grokhunter-grok-build-connect/skills/grok-build-connect/scripts"
else
return 1
fi
}

echo "==> Ensuring GrokHunter at $TARGET_DIR ($BRANCH)"
if [[ -d "$TARGET_DIR/.git" ]]; then
git -C "$TARGET_DIR" fetch --depth 1 origin "$BRANCH"
git -C "$TARGET_DIR" checkout -B "$BRANCH" "origin/$BRANCH" 2>/dev/null \
|| { git -C "$TARGET_DIR" checkout "$BRANCH" 2>/dev/null || true; git -C "$TARGET_DIR" pull --ff-only origin "$BRANCH" || true; }
else
mkdir -p "$(dirname "$TARGET_DIR")"
if [[ -e "$TARGET_DIR" ]] && [[ ! -d "$TARGET_DIR/.git" ]]; then
echo "Path exists but is not a git repo: $TARGET_DIR" >&2
exit 1
fi
git clone --depth 1 --branch "$BRANCH" "$REPO_URL" "$TARGET_DIR"
fi

if ! resolve_scripts; then
echo "grok-build-connect scripts not found in $TARGET_DIR" >&2
exit 1
fi

echo "==> Installing Grok Build Connect MCP"
bash "$SCRIPTS/install.sh"

echo "==> Ensuring cloudflared"
bash "$SCRIPTS/ensure-cloudflared.sh" || echo "WARN: cloudflared ensure failed" >&2

if [[ "$REGISTER_MARKETPLACE" -eq 1 ]] && command -v grok >/dev/null 2>&1; then
grok plugin marketplace add FineComputer14451/GrokHunter 2>/dev/null || true
grok plugin install grokhunter-grok-build-connect --trust 2>/dev/null \
|| grok plugin install "$TARGET_DIR/plugins/grokhunter-grok-build-connect" --trust 2>/dev/null \
|| echo "WARN: plugin install skipped" >&2
fi

PREFIX_DIR="${GROK_BUILD_CONNECT_HOME:-$HOME/.grokhunter-grok-build-connect}"

if [[ "$START_FOREGROUND" -eq 1 ]]; then
exec "$PREFIX_DIR/start.sh"
fi

if [[ "$START_MCP" -eq 1 ]]; then
if ! command -v tmux >/dev/null 2>&1; then
echo "tmux missing — start manually: $PREFIX_DIR/start.sh" >&2
else
tmux has-session -t gbc 2>/dev/null && tmux kill-session -t gbc
echo "==> Starting MCP in tmux session 'gbc'"
tmux new-session -d -s gbc "$PREFIX_DIR/start.sh"
for i in $(seq 1 20); do
curl -fsS "http://127.0.0.1:${PORT}/healthz" >/dev/null 2>&1 && break
sleep 0.5
done
if curl -fsS "http://127.0.0.1:${PORT}/healthz"; then
echo
echo "MCP healthy on :$PORT"
else
echo "WARN: MCP healthz not ready — tmux attach -t gbc" >&2
fi
fi
fi

if [[ "$START_TUNNEL" -eq 1 ]]; then
if ! curl -fsS "http://127.0.0.1:${PORT}/healthz" >/dev/null 2>&1; then
echo "Cannot start tunnel — MCP unhealthy" >&2
exit 1
fi
if command -v tmux >/dev/null 2>&1; then
tmux has-session -t gbc-tun 2>/dev/null && tmux kill-session -t gbc-tun
echo "==> Starting Cloudflare tunnel in tmux session 'gbc-tun'"
tmux new-session -d -s gbc-tun "bash '$SCRIPTS/tunnel-cloudflare.sh'"
echo "Attach: tmux attach -t gbc-tun"
else
exec bash "$SCRIPTS/tunnel-cloudflare.sh"
fi
fi

cat <<EOF

Done.
MCP: $PREFIX_DIR/start.sh (tmux: gbc)
Tunnel: bash $SCRIPTS/tunnel-cloudflare.sh (tmux: gbc-tun)
Health: curl -s http://127.0.0.1:${PORT}/healthz
URL: https://<tunnel-host>/mcp
Token: $PREFIX_DIR/token (do not paste into chat)
EOF
Loading
Loading