Skip to content

Building from Source

Both implementations can be built locally from the repository. Pre-built binaries are available on the Releases page if you don't need to build from source.


Go

Requirements: Go 1.26+

cd go
go mod tidy
go build -ldflags="-s -w" -trimpath -o gsc-mcp-go .

Run tests:

go test ./...

Run linter (requires golangci-lint):

golangci-lint run

C# (.NET 10)

Requirements: .NET 10 SDK

Build for development (no AOT):

cd csharp
dotnet restore SearchConsoleMcp.slnx
dotnet build SearchConsoleMcp.slnx -c Release --no-restore

Run tests:

dotnet test SearchConsoleMcp.slnx -c Release --no-build

Publish as a Native AOT self-contained binary:

dotnet publish src/SearchConsoleMcp/SearchConsoleMcp.csproj \
  -r linux-x64 -c Release --self-contained true
dotnet publish src/SearchConsoleMcp/SearchConsoleMcp.csproj \
  -r osx-arm64 -c Release --self-contained true
dotnet publish src/SearchConsoleMcp/SearchConsoleMcp.csproj ^
  -r win-x64 -c Release --self-contained true

Native AOT requirements

Native AOT compilation on Linux requires clang and zlib1g-dev. Install with:

sudo apt-get install -y clang zlib1g-dev


Contributing

  1. Open an issue describing the bug or feature before submitting a PR
  2. Run golangci-lint run (Go) or dotnet build with zero warnings (C#) before submitting
  3. Keep both implementations in sync -- a feature added to Go should also be added to C#