Developer Hub
Developer Quickstart & Policy Integration
Get your first agent protected at the execution boundary in under 10 minutes.
1
Install or Run Mastyf Gateway
# Option A: Run via Docker
docker run -d -p 4000:4000 --name mastyf ghcr.io/mastyf-ai/gateway:latest
# Option B: Run via npm
npm install -g @mastyf/gateway
mastyf start --mode audit2
Configure MCP Client to Route through Gateway
// claude_desktop_config.json or cursor.json
{
"mcpServers": {
"github": {
"command": "mastyf-proxy",
"args": ["--upstream", "npx -y @modelcontextprotocol/server-github"]
}
}
}3
Define Execution Policies in YAML
# mastyf-policy.yaml
version: "1.0"
mode: "warn" # audit -> warn -> block
rules:
- tool: "filesystem.read_file"
invariants:
path_containment:
allowed_prefixes: ["./src", "./docs"]
denied_patterns: ["/etc/*", ".env", "*.pem"]
- tool: "payment_payout"
invariants:
monetary_clamping:
max_single_transaction_usd: 50.004
Run Adversarial CI Checks with Mastyf Swarm
# Probe your policies against multi-turn injections
mastyf-swarm test --policy ./mastyf-policy.yaml --fixtures ./corpus
# Output: 228/228 PASS (0 regressions)Explore the Open-Source Repository
Mastyf Gateway, the YAML policy engine, test fixtures, and documentation are all public on GitHub.