Skip to content

Installation

Requirements

  • Operating System: Linux, macOS, or Windows
  • Go 1.24+ (for building from source)

Installation Methods

Using Go Install

The quickest way to install:

go install github.com/mcphub/mcp-scan/cmd/mcp-scan@latest

Ensure $GOPATH/bin is in your PATH:

export PATH=$PATH:$(go env GOPATH)/bin

Building from Source

# Clone the repository
git clone https://github.com/mcphub/mcp-scan
cd mcp-scan

# Build
make build

# Binary is at ./bin/mcp-scan
./bin/mcp-scan version

Pre-built Binaries

Download from the Releases page:

curl -LO https://github.com/mcphub/mcp-scan/releases/latest/download/mcp-scan-linux-amd64.tar.gz
tar xzf mcp-scan-linux-amd64.tar.gz
sudo mv mcp-scan /usr/local/bin/
curl -LO https://github.com/mcphub/mcp-scan/releases/latest/download/mcp-scan-darwin-arm64.tar.gz
tar xzf mcp-scan-darwin-arm64.tar.gz
sudo mv mcp-scan /usr/local/bin/
# Download mcp-scan-windows-amd64.zip from releases
Expand-Archive mcp-scan-windows-amd64.zip
Move-Item mcp-scan.exe C:\Windows\System32\

Verify Installation

mcp-scan version

Expected output:

mcp-scan version 1.0.0
commit: abc1234
built: 2024-01-15T10:00:00Z

Docker

docker run --rm -v $(pwd):/scan mcphub/mcp-scan scan /scan

Shell Completion

Bash

mcp-scan completion bash > /etc/bash_completion.d/mcp-scan

Zsh

mcp-scan completion zsh > "${fpath[1]}/_mcp-scan"

Fish

mcp-scan completion fish > ~/.config/fish/completions/mcp-scan.fish

Troubleshooting

"command not found"

Ensure the binary location is in your PATH:

# Check where Go installs binaries
go env GOPATH

# Add to PATH in ~/.bashrc or ~/.zshrc
export PATH=$PATH:$(go env GOPATH)/bin

Permission Denied

chmod +x /usr/local/bin/mcp-scan

Tree-sitter Errors

MCP-Scan uses tree-sitter for parsing. If you see parsing errors:

# Ensure you have the latest version
go install github.com/mcphub/mcp-scan/cmd/mcp-scan@latest