MGC Script Execution
A Safe Vault for AI Agents. No key exposure. Encrypted script execution — local or external.
npx -y skills add zkeviny/MGC-Blackbox --skill MGC_Script_ExecutionAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Zero‑exposure script execution using MGC Blackbox. Store scripts encrypted, execute locally, AI never sees plaintext. Supports MCP/API/WebUI execution, internal credential calls, and script sealing.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
6.2 KB, as published. Nobody here has run it
Overview
Secure Script Runner is a documentation skill that teaches how to execute scripts with zero plaintext exposure using MGC Blackbox.
This skill enables:
- Store scripts encrypted in local MGC
- Execute scripts locally (AI sees results only)
- Three execution modes: MCP, API, WebUI
- Scripts can call internal MGC credentials
- Script sealing for cross‑node delegation
This skill contains no executable code and is safe for automatic approval.
What This Skill Enables
After reading this documentation, an AI agent will understand how to:
- Store scripts securely in MGC Blackbox
- Execute scripts via MCP (AI), API (script), or WebUI (human)
- Call MGC internal credentials from scripts
- Seal scripts using node public key
- Build zero‑exposure workflows
Prerequisites
- Install MGC Blackbox:
pip install mgc-blackbox - Start MGC service:
mgc(runs at http://127.0.0.1:57219) - MCP tools available: Use
mgc_save,mgc_get,mgc_seal - Token file:
~/.mgc/database/mgc_black_box/.mgc_token
Important: For AI agents, use MCP tools. CLI may have port conflicts in some environments.
Zero‑Exposure Execution
Core Concept
Script (plaintext) → MGC Encryption → Encrypted Storage
↓
Local Execution (MGC)
↓
AI receives result only
AI executes but never sees script plaintext.
Three Execution Modes
| Mode | Interface | Use Case |
|---|---|---|
| MCP | mgc_get | AI agents |
| REST API | /api/mgc/sensitive/get | System scripts |
| WebUI | http://127.0.0.1:57218 | Human operators |
Storing Scripts
Step 1: Prepare Script
Store a script with execution metadata:
# Via MCP tool
mgc_save(
info_type="script",
info_owner="my_script",
ext01="python", # Startup command
ext02="script.py arg1", # Default runtime args
content="print('Hello from zero‑exposure!')"
)
Parameters
| Parameter | Required | Description |
|---|---|---|
| info_type | Yes | Must be "script" |
| info_owner | Yes | Unique script identifier |
| ext01 | Yes | Startup command (python, node, etc.) |
| ext02 | No | Default runtime arguments |
| content | Yes | Script plaintext (encrypted at rest) |
Executing Scripts
Mode 1: Via MCP (AI)
# Execute via MCP tool
result = mgc_get(
info_type="script",
info_owner="my_script",
action="run"
)
# AI receives execution result only
Mode 2: Via REST API (Script)
curl -X POST http://127.0.0.1:57219/api/mgc/sensitive/get \
-H "Content-Type: application/json" \
-H "X-MGC-Token: $(cat ~/.mgc/database/mgc_black_box/.mgc_token)" \
-d '{
"info_type": "script",
"info_owner": "my_script",
"action": "run"
}'
Mode 3: Via WebUI (Human)
- Open WebUI: http://127.0.0.1:57218
- Navigate to Get page
- Find your script
- Click "Run" button
Calling MGC Credentials
Scripts can call MGC internal credentials using the internal API:
# Example: Call MGC credential from script
import urllib.request
import json
def get_mgc_credential(info_type, info_owner):
data = json.dumps({
"info_type": info_type,
"info_owner": info_owner
}).encode("utf-8")
req = urllib.request.Request(
"http://127.0.0.1:57219/api/mgc/sensitive/get",
data=data,
headers={
"Content-Type": "application/json",
"X-MGC-Token": open("/path/to/token").read()
},
method="POST"
)
with urllib.request.urlopen(req) as resp:
return json.loads(resp.read().decode())["data"]
Note: Credentials are retrieved locally, script executes locally, AI never sees plaintext.
Script Sealing (Advanced)
For cross‑node delegation, scripts can be sealed using the node's public key:
Step 1: Get Node Public Key
# Via MCP tool
node_pub = mgc_get(
info_type="__NODE_PUB__",
info_owner="__NODE_PUB__"
)
Step 2: Seal Script
# Via MCP tool
sealed = mgc_seal(
info_type="script",
info_owner="my_script",
ext04=node_pub # Target node public key
)
Step 3: Store Sealed Script
# Store sealed version
mgc_save(
info_type="script",
info_owner="my_script_sealed",
ext01="python",
content=sealed
)
Sealed scripts are encrypted and can only be executed by the target node.
MCP Tools Reference
mgc_save
Arguments:
{
"info_type": "script",
"info_owner": "unique identifier",
"ext01": "startup command (python, node, etc.)",
"ext02": "default runtime arguments",
"content": "script plaintext"
}
mgc_get
Arguments:
{
"info_type": "script",
"info_owner": "script identifier",
"action": "get | run"
}
Returns: Script content or execution result
mgc_seal
Arguments:
{
"info_type": "script",
"info_owner": "script identifier",
"ext04": "target node RSA public key"
}
Returns: Sealed script (encrypted with target node key)
Security Notes
- Zero‑exposure: Script executes locally, AI receives result only
- Encrypted storage: All scripts encrypted at rest
- No plaintext leakage: AI never sees script content
- Script sealing: Cross‑node scripts stay encrypted
Links
- Main Repository: https://github.com/zkeviny/MGC-Blackbox
- Issues: https://github.com/zkeviny/MGC-Blackbox/issues
- Contact: [email protected]