Library / SDK
connectrpc/connect-go avatar
connectrpc/connect-go

connect-go: Protobuf RPC over plain net/http

The Go implementation of Connect: Protobuf RPC that works.

4,153 stars163 forksGoApache-2.0

At a glance

What is it?
connect-go generates type-safe Go handlers and clients that speak Connect, gRPC and gRPC-Web using net/http. Both v1 and v2 are stable modules, with a migration guide for teams moving between them.
Who is it for?
Adopt connect-go if you want Protobuf RPC on the standard library and need gRPC compatibility. For an existing v1 application, read the v2 migration guide and test the changed API before upgrading; both major versions are stable and v1 remains supported.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • connectrpc/connect-go4,153 ★ · +64
Star history
Repository2026-09-242026-11-15
connectrpc/connect-go4.1k4.2k

64 Stars in the last 52 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What connect-go replaces, and who it is for

Connect is described in the README as "a slim library for building browser and gRPC-compatible HTTP APIs." You write a Protocol Buffer schema, implement your application logic, and the code generator produces the marshaling, routing, compression and content type negotiation, plus a type-safe client. The audience is Go teams that already keep .proto files and want RPC semantics without adopting gRPC's own HTTP implementation, name resolution or load balancing APIs. The README is explicit that Connect is Protocol Buffers plus the standard library: any package that works with an http.Server, http.Client or http.Handler also works with Connect. That is the whole pitch. If your middleware, tracing or test helpers are written against net/http, they keep working. If you have never used Protobuf, this library is not a shortcut around learning it.

Three protocols on one handler

A generated handler serves gRPC, gRPC-Web and the Connect protocol from the same registration. The README states that streaming, headers, trailers and error details are supported across them, and that gRPC-compatible server reflection and health checks ship as standalone packages (grpcreflect-go and grpchealth-go). The Connect protocol itself is documented as working over HTTP/1.1 or HTTP/2, which is why a curl call is a valid client. The repository layout shows the split clearly: connecthttp/ holds the HTTP transport and mounting helpers, connectgzip/ handles compression, connectproto/ deals with Protobuf-level concerns, and connectinprocess/ provides an in-process path that skips the network. That last package matters for tests, since you can exercise a handler without binding a port. The design decision worth naming: because everything routes through net/http, you inherit net/http's limits as well. Connection pooling, timeouts and h2c configuration are your problem, and the README points at the deployment docs rather than hiding that.

Installing connect-go and serving a first request

The module is connectrpc.com/connect/v2, and go.mod declares go 1.26.0 with google.golang.org/protobuf v1.36.11 as the only direct Protobuf dependency. Add it with the module path exactly as the repository declares it; the /v2 suffix is part of the module name, not a version tag you can drop.

bash
go get connectrpc.com/connect/v2

The README's example registers a generated service on a *connect.Server, mounts that server on an http.ServeMux with connecthttp.Mount, and then enables HTTP/1.1 and unencrypted HTTP/2 on the http.Server. Interceptors are passed to connect.NewServer, and the example passes a Protovalidate server interceptor, which the README calls almost always recommended.

go
server := connect.NewServer(validate.NewServerInterceptor())
pingv1connect.RegisterPingServiceHandler(server, &PingServer{})
mux := http.NewServeMux()
connecthttp.Mount(mux, server)
p := new(http.Protocols)
p.SetHTTP1(true)
p.SetUnencryptedHTTP2(true)
s := &http.Server{Addr: "localhost:8080", Handler: mux, Protocols: p}

With that running on localhost:8080, the README shows a client built from connecthttp.NewTransport wrapped around http.DefaultClient, then passed to the generated client constructor. The README also warns that http.ListenAndServe and http.DefaultClient are not fit for production and points to the deployment docs for timeouts, connection pools, observability and h2c. Before any of this you need generated code, which comes from a Protobuf plugin; the repository's own buf.gen.yaml and buf.yaml show Buf as the build tool used here, and the README's gRPC curl example installs buf with go install github.com/bufbuild/buf/cmd/buf@latest.

Both v2 and v1 are stable

The project now describes `connectrpc.com/connect/v2` as stable and follows semantic versioning within the 2.x series. The v1 module, `connectrpc.com/connect`, also remains stable and supported on the v1 branch. Read the v2 migration guide and test your generated clients, handlers and middleware before moving an existing application between major versions.

When connect-go is the wrong tool

If your clients are browsers and you do not want Protobuf, connect-go adds a schema and a code generation step for no benefit. The README's own curl example sends JSON, but the handler still exists because a .proto was compiled. Teams that only need JSON over HTTP are better served by net/http and encoding/json. Second, a migration from v1 to the stable v2 API still requires code review and compatibility testing. Third, connect-go does not replace your HTTP server configuration. The README says plainly that http.ListenAndServe and http.DefaultClient are not production-ready, so a team expecting the library to handle connection management, timeouts and observability will be doing that work themselves against the deployment docs. Fourth, the Go version floor is real: go.mod requires go 1.26.0, and the project supports only the two most recent major Go releases. If you are pinned to an older toolchain, this is a blocker before any code is written.

connect-go against grpc-go

The comparison that matters is with grpc-go, and the difference is architectural rather than cosmetic. grpc-go brings its own HTTP/2 implementation, its own name resolution and load balancing APIs, and a client that is not an http.Client. connect-go routes everything through net/http: the README states there is no custom HTTP implementation and no new name resolution or load balancing APIs. Practically, that means your existing http.Handler middleware, your httptest servers and your http.Client instrumentation apply unchanged, and a Connect handler can be mounted in a mux alongside ordinary REST endpoints. The cost is that you give up grpc-go's built-in resolver and balancer ecosystem and configure those concerns yourself, and you accept that the Connect protocol is the project's own specification rather than a standard. For interoperability the repository keeps a conformance suite in internal/conformance with a runconformance make target, which is how the project checks Connect, gRPC and gRPC-Web against each other. If your environment is already all-gRPC and you depend on grpc-go's balancers, switching buys you less than it costs.

Licence, maintenance and upgrade cost

connect-go is offered under the Apache 2.0 licence, per the README's Legal section and the LICENSE file at the repository root. That is a permissive licence with an explicit patent grant, but this is not legal advice and your counsel should review it against your distribution model. The project publishes stable releases for both major lines. Review the release notes, Go version requirements and v2 migration guide for your selected version before upgrading; test clients and servers together.

Editorial conclusion

Adopt connect-go if you want Protobuf RPC on the standard library and need gRPC compatibility. For an existing v1 application, read the v2 migration guide and test the changed API before upgrading; both major versions are stable and v1 remains supported. Confirm the Go requirements for the version you select.

Frequently asked questions

What is connect-go?

It is the Go implementation of Connect, described in the README as a slim library for building browser and gRPC-compatible HTTP APIs from Protocol Buffer schemas. It generates handlers and type-safe clients that support the Connect, gRPC and gRPC-Web protocols.

What is connect-go used for?

It handles marshaling, routing, compression and content type negotiation for Protobuf RPC services, and it mounts on the standard library, so existing http.Server, http.Client and http.Handler code keeps working. The README also notes gRPC-compatible server reflection and health checks are available as standalone packages.

How does connect-go compare with gRPC?

The README states Connect uses Protocol Buffers and the standard library, with no custom HTTP implementation and no new name resolution or load balancing APIs, while still supporting the gRPC and gRPC-Web protocols including streaming, headers, trailers and error details. That means grpc-go's resolver and balancer ecosystem is not part of connect-go.

Official sources

  1. connectrpc/connect-go on GitHub
  2. License: Apache-2.0
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/connectrpc-connect-go.svg)](https://hysenlabs.com/projects/connectrpc-connect-go)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/connectrpc-connect-go.svg)](https://hysenlabs.com/projects/connectrpc-connect-go)

Was this useful?