name: 'OSINT MCP Server'
description: 'Run 37 OSINT reconnaissance tools in your CI/CD pipeline — DNS, WHOIS, Shodan, VirusTotal, Censys, crt.sh, BGP, Wayback Machine, and more'
author: 'Orhan Yildirim'

branding:
  icon: 'search'
  color: 'blue'

inputs:
  tool:
    description: 'Tool name to run (e.g., dns_lookup, osint_domain_recon, shodan_host). Run `npx osint-mcp-server --list` for all tools.'
    required: true
  args:
    description: 'JSON arguments for the tool (e.g., {"domain": "example.com"})'
    required: false
    default: '{}'
  format:
    description: 'Output format: json (default) or text'
    required: false
    default: 'json'
  node-version:
    description: 'Node.js version to use'
    required: false
    default: '20'

outputs:
  result:
    description: 'Tool execution result (JSON or text)'
    value: ${{ steps.run.outputs.result }}

runs:
  using: 'composite'
  steps:
    - name: Setup Node.js
      uses: actions/setup-node@v4
      with:
        node-version: ${{ inputs.node-version }}

    - name: Run OSINT tool
      id: run
      shell: bash
      run: |
        RESULT=$(npx -y osint-mcp-server@latest --tool "${{ inputs.tool }}" '${{ inputs.args }}' --format "${{ inputs.format }}" 2>/dev/null)
        EXIT_CODE=$?
        echo "result<<OSINT_EOF" >> $GITHUB_OUTPUT
        echo "$RESULT" >> $GITHUB_OUTPUT
        echo "OSINT_EOF" >> $GITHUB_OUTPUT
        echo "$RESULT"
        exit $EXIT_CODE
