Skip to main content

CLI Reference

The Tollgate CLI provides policy-based access control for MCP (Model Context Protocol) servers, adding a security layer between AI agents and their tools.

Commands

CommandDescription
wrapWrap any MCP server with instant protection
startStart proxy for a configured server
initCreate a tollgate.yaml config file
validateValidate configuration file
logsView recent audit logs
statsShow audit statistics
exportExport logs for compliance reporting

Global Options

dotset tollgate --version    # Show version
dotset tollgate --help       # Show help

Quick Examples

# Zero-config protection (prompts for all tool calls)
dotset tollgate wrap npx @modelcontextprotocol/server-postgres

# Use a configuration file
dotset tollgate start -s postgres -c ./tollgate.yaml

# View recent tool calls
dotset tollgate logs -n 50

# Export logs for compliance
dotset tollgate export -f json -o audit.json

Two Modes of Operation

Wrap Mode (Zero Config)

Instantly protect any MCP server without configuration:
dotset tollgate wrap npx @anthropic/mcp-server-filesystem ./src

Config Mode (Full Control)

Use a YAML configuration file for fine-grained policies:
# Create config
dotset tollgate init

# Start with config
dotset tollgate start -s filesystem