Guard

GitHub Copilot CLI Integration

Integrate AIVory Guard with GitHub Copilot CLI to scan your code for compliance violations directly from your terminal using AI-powered assistance.

  • Terminal-native scanning - Run compliance checks without leaving your command line
  • MCP protocol - Uses Model Context Protocol for seamless AI integration
  • Free tier available - Get started without an API key
  • Multi-standard support - OWASP, GDPR, HIPAA, PCI-DSS, and more

Installation

Install GitHub Copilot CLI using your preferred method.

Homebrew (macOS)
brew install github/gh-cli-copilot/gh-copilot
npm (Cross-platform)
npm install -g @github/copilot-cli

After installation, authenticate with GitHub:

gh auth login
gh copilot auth
Note If you already have the GitHub CLI (gh) installed, the Homebrew method is faster and integrates automatically.

Configuration

Create the MCP configuration for AIVory Guard.

Premium Configuration

For full access to all compliance standards and AI detection:

mkdir -p ~/.config/github-copilot/mcp

cat > ~/.config/github-copilot/mcp/aivory.json <<EOF
{
  "command": "npx",
  "args": ["--yes", "@aivorynet/guard"],
  "env": {
    "AIVORY_API_KEY": "your_api_key_here"
  }
}
EOF
Note Get your API key from app.aivory.net/tokens.

Free Tier Configuration

Get started immediately without an API key:

mkdir -p ~/.config/github-copilot/mcp

cat > ~/.config/github-copilot/mcp/aivory.json <<EOF
{
  "command": "npx",
  "args": ["--yes", "@aivorynet/guard"]
}
EOF
Note The free tier includes 5 scans per week with support for OWASP Top 10 and GDPR standards.

Usage

Start GitHub Copilot CLI and ask it to use AIVory Guard for compliance scanning.

gh copilot
OWASP Scanning
Scan this authentication function with AIVory for OWASP compliance
GDPR Review
Review my code with AIVory and fix any GDPR violations
Security Check
Check this API endpoint with AIVory for security issues
Warning You must explicitly ask Copilot to use AIVory - it won’t scan automatically. Include “AIVory” in your prompt.

Verification

Test Your Integration

Verify that AIVory Guard is properly configured:

# Verify config file exists
cat ~/.config/github-copilot/mcp/aivory.json

# Test AIVory Guard directly
npx --yes @aivorynet/guard test

# Ask Copilot to confirm
gh copilot chat "Can you check if AIVory Guard is available?"
Troubleshooting

Config not found:

  • Ensure the directory exists: ~/.config/github-copilot/mcp/
  • Check file permissions: chmod 644 ~/.config/github-copilot/mcp/aivory.json

Authentication issues:

AIVory not responding:

  • Test directly: npx --yes @aivorynet/guard test
  • Check npm cache: npm cache clean --force

Next Steps