Skip to content
Gortexa mascot: a black cat silhouette carrying a cardboard box

Gortexa

One h2c port serving gRPC, HTTP/JSON and MCP. Define your contract once in Protobuf — all three protocols share the same interceptor chain, error model and auth path.

Three protocols, one port

h2c multiplexing on Go’s native http.Server.Protocols. One port accepts gRPC, HTTP/JSON and MCP.

Fixed-order interceptor chain

recover → request-id → logger → load-shed → rate-limit → circuit-breaker → auth → validation. Eight stages in a fixed order; a missing stage fails startup.

One error model

A single mapping table produces the gRPC status, HTTP status and MCP error envelope. Internal causes never leak.

AI tool calls go through the same chain

MCP tools/call dispatches over an in-process loopback, so AI calls pass auth and validation like any other request.

Batteries included

Layered config, three-state health, slog + OTLP, pgx + sqlc, cache (in-memory by default), NATS/JetStream.

Importable as a module

go get the framework packages directly — kernel/interceptor/mq for plain services, plus the mcp bridge and gortexa.ai.v1 annotations for AI ones. No scaffold required. See Components.

To have a coding agent build a runnable service scaffold from a prompt, use Quickstart with AI. It pins the release, verifies the toolchain, removes the usable secret generated by the scaffold, and runs HTTP/MCP smoke checks in one shell. For a manual walkthrough, use Quickstart.

Both paths create a prototype only; see Deployment for the work required before production.

Or consume the framework as a Go module — go get it and import the packages directly, no scaffold required:

Terminal window
go get github.com/yshengliao/gortexa@latest

See Components for each package’s usage, or Use as a module for a minimal app.

After either flow starts the server on :8080, hit each protocol once:

Terminal window
curl localhost:8080/healthz # 200: health check is open
curl -XPOST localhost:8080/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' # MCP: list AI tools defined in proto
curl localhost:8080/v1/resources/x # 401: auth is shared across all three