Installation
Requirements
- macOS, Linux, or Windows (amd64 / arm64)
- Go 1.26+ (only for
go installor building from source)
Compatibility
| Method | macOS | Linux | Windows |
|---|---|---|---|
| One-liner (curl) | ✅ | ✅ | ❌ |
| Homebrew | ✅ | ✅ | ❌ |
| Scoop | ❌ | ❌ | ✅ |
| APT (deb) | ❌ | ✅ | ❌ |
| RPM | ❌ | ✅ | ❌ |
| Docker | ❌ | ✅ | ❌ |
| GitHub Release | ✅ | ✅ | ✅ |
| go install | ✅ | ✅ | ✅ |
| Build from source | ✅ | ✅ | ✅ |
macOS
One-liner (recommended)
curl -fsSL https://raw.githubusercontent.com/mmadfox/swag2mcp/main/scripts/install.sh | bashInstalls to /usr/local/bin/swag2mcp (or ~/.local/bin/swag2mcp if /usr/local/bin is not writable).
Homebrew
brew install mmadfox/tap/swag2mcpGitHub Release
curl -LO https://github.com/mmadfox/swag2mcp/releases/latest/download/swag2mcp_darwin_arm64.tar.gz
tar -xzf swag2mcp_darwin_arm64.tar.gz
sudo mv swag2mcp /usr/local/bin/curl -LO https://github.com/mmadfox/swag2mcp/releases/latest/download/swag2mcp_darwin_amd64.tar.gz
tar -xzf swag2mcp_darwin_amd64.tar.gz
sudo mv swag2mcp /usr/local/bin/go install
go install github.com/mmadfox/swag2mcp/cmd/swag2mcp@latestEnsure $GOPATH/bin is in your $PATH:
export PATH=$PATH:$(go env GOPATH)/binBuild from source
git clone https://github.com/mmadfox/swag2mcp.git
cd swag2mcp
make build
sudo mv swag2mcp /usr/local/bin/Linux
One-liner (recommended)
curl -fsSL https://raw.githubusercontent.com/mmadfox/swag2mcp/main/scripts/install.sh | bashInstalls to /usr/local/bin/swag2mcp (or ~/.local/bin/swag2mcp if /usr/local/bin is not writable).
Homebrew
brew install mmadfox/tap/swag2mcpAPT (Debian / Ubuntu)
# Download the .deb from the latest release
curl -LO https://github.com/mmadfox/swag2mcp/releases/latest/download/swag2mcp_linux_amd64.deb
sudo dpkg -i swag2mcp_linux_amd64.debRPM (Fedora / RHEL)
# Download the .rpm from the latest release
curl -LO https://github.com/mmadfox/swag2mcp/releases/latest/download/swag2mcp_linux_amd64.rpm
sudo rpm -i swag2mcp_linux_amd64.rpmDocker
docker pull ghcr.io/mmadfox/swag2mcp:latestRun with stdio transport:
docker run --rm -i ghcr.io/mmadfox/swag2mcp:latest swag2mcp mcpRun with HTTP transport:
docker run --rm -p 8080:8080 ghcr.io/mmadfox/swag2mcp:latest swag2mcp mcp --transport sse --http-addr :8080GitHub Release
curl -LO https://github.com/mmadfox/swag2mcp/releases/latest/download/swag2mcp_linux_amd64.tar.gz
tar -xzf swag2mcp_linux_amd64.tar.gz
sudo mv swag2mcp /usr/local/bin/curl -LO https://github.com/mmadfox/swag2mcp/releases/latest/download/swag2mcp_linux_arm64.tar.gz
tar -xzf swag2mcp_linux_arm64.tar.gz
sudo mv swag2mcp /usr/local/bin/go install
go install github.com/mmadfox/swag2mcp/cmd/swag2mcp@latestEnsure $GOPATH/bin is in your $PATH:
export PATH=$PATH:$(go env GOPATH)/binBuild from source
git clone https://github.com/mmadfox/swag2mcp.git
cd swag2mcp
make build
sudo mv swag2mcp /usr/local/bin/Windows
Scoop
scoop bucket add mmadfox https://github.com/mmadfox/scoop-bucket
scoop install mmadfox/swag2mcpGitHub Release
# Download the latest release
curl -LO https://github.com/mmadfox/swag2mcp/releases/latest/download/swag2mcp_windows_amd64.zip
Expand-Archive swag2mcp_windows_amd64.zip -DestinationPath .
move swag2mcp.exe C:\Windows\System32\go install
go install github.com/mmadfox/swag2mcp/cmd/swag2mcp@latestBuild from source
git clone https://github.com/mmadfox/swag2mcp.git
cd swag2mcp
go build -o swag2mcp.exe ./cmd/swag2mcpMock Server
The swag2mcp-mock binary is available as a separate download. Install it using the same method as the main binary:
go install github.com/mmadfox/swag2mcp/cmd/swag2mcp-mock@latestgo install github.com/mmadfox/swag2mcp/cmd/swag2mcp-mock@latestOr download from GitHub Releases — look for swag2mcp-mock_<version>_<os>_<arch>.tar.gz.
Install via LLM Agent
If you use an AI-powered IDE (OpenCode, Cursor, Claude Desktop, VS Code, etc.), you can install swag2mcp through your agent:
Ask your agent to add the swag2mcp skills:
"Create the .agents/skills/swag2mcp-cli directory and add the skill from https://github.com/mmadfox/swag2mcp/blob/main/.agents/skills/swag2mcp-cli/SKILL.md to .agents/skills/swag2mcp-cli/SKILL.md" "Create the .agents/skills/swag2mcp-format directory and add the skill from https://github.com/mmadfox/swag2mcp/blob/main/.agents/skills/swag2mcp-format/SKILL.md to .agents/skills/swag2mcp-format/SKILL.md"Then tell your agent:
"Set up swag2mcp"The agent will download and install swag2mcp, then create a workspace with ready-to-use specs.
Some IDEs require a restart after adding skills.
Verify
swag2mcp --versionExpected output (version may vary):
swag2mcp v*.*.*Next Steps
- Quick Start — get running in 2 minutes