Developer Hub

Developer Quickstart & Policy Integration

Get your first agent protected at the execution boundary in under 10 minutes.

1

Install the Mastyf Gateway

npm install -g @mastyf_ai/server@4.1.12
mastyf-ai --version
2

Create a Policy

# default-policy.yaml
version: '1.0'
policy:
  mode: block # audit, warn or block
  rules: []   # built-in guards still apply
3

Route Your MCP Client through the Gateway

// /path/to/mastyf/github.json: your real server, in the usual format
// On Windows, use "node" and the server's script path instead of npx
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"]
    }
  }
}

// claude_desktop_config.json or .cursor/mcp.json: start it through the gateway
{
  "mcpServers": {
    "github": {
      "command": "mastyf-ai",
      "args": [
        "proxy",
        "--config", "/path/to/mastyf/github.json",
        "--policy", "/path/to/mastyf/default-policy.yaml"
      ]
    }
  }
}
4

Test a Call Against Your Policy

mastyf-ai policy test --policy ./default-policy.yaml --tool read_file --args '{"path":"/etc/passwd"}'
# "action": "block", "reason": "Sensitive path blocked: /etc/passwd"

Explore the Open-Source Repository

Mastyf Gateway, the YAML policy engine, test fixtures, and documentation are all public on GitHub.