MGC Script Execution Auth
Skill zkeviny/MGC-Blackbox/mgc_skill/MGC_Script_Execution_Auth
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_Execution_AuthAssembled 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 cross‑device script authorization using MGC Blackbox seal functionality. Scripts are encrypted with target node's public key, transferred as ciphertext, and decrypted only during execution on authorized node. Complete zero‑exposure throughout the entire chain.
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
7.0 KB, as published. Nobody here has run it
Overview
Cross‑Device Encrypted Script Authorization is a documentation skill that teaches how to authorize script execution across devices without exposing plaintext.
This skill enables:
- Seal scripts using target node's public key
- Transfer encrypted scripts to authorized nodes
- Execute sealed scripts with zero plaintext exposure
- Build cross‑device trust chains
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:
- Get node public key for sealing
- Seal scripts using RSA encryption
- Transfer sealed scripts securely
- Execute sealed scripts on target node
- Understand dependency requirements
Prerequisites
- Install MGC Blackbox:
pip install mgc-blackbox(recommended 1.4.6+) - Start MGC service:
mgc(runs at http://127.0.0.1:57219) - MCP tools available: Use
mgc_get,mgc_seal,mgc_save - Two MGC nodes: One for script owner, one for authorized node (single node can be used for self-validation)
- Token file:
~/.mgc/database/mgc_black_box/.mgc_token
Core Concept
Why Cross‑Device Authorization?
Traditional: Script Owner → Send Script (plaintext) → Authorized Node
MGC Way: Script Owner → Seal with node_pub → Encrypted → Authorized Node
↓
Always encrypted, never exposed
The script remains encrypted throughout:
- Transfer process
- Storage on authorized node
- Execution in sandbox
Use Cases
Use Case 1: Cross‑Organization Script Sharing
Organization A has a script they want to share with Organization B without exposing the script content.
- Organization B installs MGC and provides their node_pub
- Organization A seals the script with node_pub
- Organization B stores sealed script and executes
Use Case 2: Trusted Partner Automation
A company wants to provide automation scripts to partners without revealing the script logic.
- Partner installs MGC and provides node_pub
- Company seals script with partner's node_pub
- Partner runs sealed script locally
Use Case 3: Delegated Task Execution
A central server delegates tasks to edge devices without exposing task logic.
- Edge device provides node_pub to central server
- Central server seals task script
- Edge device executes sealed task
Workflow
Step 1: Authorized Node Gets Node Public Key
The node that will run the sealed script must provide its public key.
# Get node public key via MCP
node_pub = mgc_get(
info_type="__NODE_PUB__",
info_owner="__NODE_PUB__"
)
Note: If no node key exists, MGC automatically generates one when first accessed.
Step 2: Script Owner Seals Script
The script owner seals their script using the authorized node's public key.
# Store original script first
mgc_save(
info_type="script",
info_owner="my_script",
ext01="python",
content="print('Confidential script')"
)
# Seal the script with target node's public key
sealed_script = mgc_seal(
info_type="script",
info_owner="my_script",
ext04=node_pub # Target node's public key
)
Step 3: Transfer Sealed Script
Transfer the sealed script to the authorized node. The sealed content is ciphertext.
# sealed_script contains encrypted data
print(sealed_script) # Only send this to authorized node
Step 4: Authorized Node Stores Sealed Script
The authorized node stores the sealed script in their MGC.
# Store sealed version
mgc_save(
info_type="script",
info_owner="partner_script",
ext01="python",
content=sealed_script # This is already encrypted
)
Step 5: Execute Sealed Script
The authorized node executes the sealed script.
# Execute sealed script
result = mgc_get(
info_type="script",
info_owner="partner_script",
action="run"
)
# Result returned, script never exposed
Dependency Requirements
When sealing scripts, ensure dependencies are available on the target node:
| Dependency | How to Handle |
|---|---|
| MGC credentials | Store credentials on target node with same info_type/info_owner, format must be consistent but content varies by node |
| External files | Must exist on target node with consistent paths, recommended to also store in MGC and call via MGC API |
| Environment variables | Must be set on target node |
Important: If your script relies on MGC credentials or external resources, ensure they are available on the target node before execution.
Security Notes
- Zero exposure: Script is encrypted at rest and during transfer
- Sandbox execution: Sealed scripts run in sandbox, cannot bypass OS security
- No root protection: Malicious root can inspect memory, ensure target node is trusted before authorizing
- One‑way sealing: Once sealed, decrypted only during execution on target node, cannot be decrypted by other nodes (including source node)
MCP Tools Reference
mgc_get
Get node public key:
{
"info_type": "__NODE_PUB__",
"info_owner": "__NODE_PUB__"
}
Execute sealed script:
{
"info_type": "script",
"info_owner": "sealed_script_identifier",
"action": "run"
}
mgc_seal
Arguments:
{
"info_type": "script",
"info_owner": "original_script_identifier",
"ext04": "target_node_public_key"
}
Returns: Sealed (encrypted) script content / key / startup command, etc.
mgc_save
Store original script:
{
"info_type": "script",
"info_owner": "script_identifier",
"ext01": "python",
"content": "script plaintext"
}
Store sealed script:
{
"info_type": "script",
"info_owner": "sealed_script_identifier",
"ext01": "python",
"content": "sealed_encrypted_content"
}
Troubleshooting
| Issue | Solution |
|---|---|
| Script fails to run | Check MGC version 1.4.6+ required |
| Credential not found | Ensure credentials stored with same info_type/info_owner on target |
| Sealing fails | Verify node_pub is valid RSA public key |
| Execution timeout | Check script dependencies are available |
Links
- Main Repository: https://github.com/zkeviny/MGC-Blackbox
- Issues: https://github.com/zkeviny/MGC-Blackbox/issues
- Contact: [email protected]
Gives 0 of the 12 instructions most auth identity skills give
Counted across 409 of the 410 authors here whose files we hold, read 2026-08-06
- hash passwords with bcrypt or argon2in 53 of 409, across 43 files
- use parameterized queriesin 47 of 409, across 39 files
- load SECRET_KEY from environment variablesin 23 of 409, across 14 files
- validate all input server-sidein 19 of 409, across 11 files
- refresh access tokens before expiryin 17 of 409, across 9 files
- store tokens in httponly cookiesin 17 of 409, across 16 files
- store refresh tokens securelyin 16 of 409, across 6 files
- validate webhook signatures before processingin 15 of 409, across 5 files
- sanitize user inputsin 15 of 409, across 9 files
- implement rate limiting on auth endpointsin 14 of 409, across 9 files
- encrypt sensitive data at restin 13 of 409, across 10 files
- validate uploaded file extensions and sizesin 12 of 409, across 5 files
Said here and by no other author read
- install mgc blackbox
- start the mgc service
- get the target node public key
- store the original script
- seal the script with the target public key
- transfer the sealed script ciphertext
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.