The contract-first serverless runtime.
One application model. Three runtimes. AppTheory keeps Go, TypeScript, and Python in lock-step on the shared Lambda contract — routing, middleware, error envelope, AppSync, WebSockets, and event workloads — verified on every commit by 128 shared contract fixtures. The Go runtime also carries the MCP Streamable HTTP surface used by Remote MCP deployments.
Where AppTheory shows up
Three real Lambda surfaces — one runtime, one contract, one entrypoint behind all of them.
One unified HandleLambda for Lambda Function URL, API Gateway v2, and ALB — with the same routing, middleware, and error envelope across all three runtimes.
Go Streamable HTTP transport, sessions, resumable SSE, and OAuth-protected remote MCP — packaged as Lambda-native constructs Claude and Claude Code consume directly.
SQS, EventBridge, DynamoDB Streams, Kinesis, AppSync, and WebSockets — registered through the same app, dispatched through the same entrypoint.
One app. Three runtimes.
Pick a language and ship the same Lambda contract.
go get github.com/theory-cloud/apptheory@vX.Y.Z
```go package main import ( "context" "encoding/json" "github.com/aws/aws-lambda-go/lambda" apptheory "github.com/theory-cloud/apptheory/runtime" ) func main() { app := apptheory.New() app.Get("/ping", func(ctx *apptheory.Context) (*apptheory.Response, error) { return apptheory.Text(200, "pong"), nil }) // One entrypoint handles HTTP, AppSync, SQS, EventBridge, // DynamoDB Streams, Kinesis, and WebSockets. lambda.Start(func(ctx context.Context, event json.RawMessage) (any, error) { return app.HandleLambda(ctx, event) }) } ```npm i ./theory-cloud-apptheory-X.Y.Z.tgz # from a GitHub Release asset
```typescript import { createApp, text } from "@theory-cloud/apptheory"; const app = createApp(); app.get("/ping", () => text(200, "pong")); // One entrypoint handles HTTP, AppSync, SQS, EventBridge, // DynamoDB Streams, Kinesis, and WebSockets. export const handler = async (event: unknown, ctx: unknown) => app.handleLambda(event, ctx); ```python -m pip install ./apptheory-X.Y.Z-py3-none-any.whl # from a GitHub Release asset
```python from apptheory import create_app, text app = create_app() @app.get("/ping") def ping(ctx): return text(200, "pong") # One entrypoint handles HTTP, AppSync, SQS, EventBridge, # DynamoDB Streams, Kinesis, and WebSockets. def handler(event, ctx): return app.handle_lambda(event, ctx) ```Quick starts
The deepest-value sections, ranked by how often new consumers reach for them.
Set up a deterministic local workspace for Go, TS, or Python.
P0 → P1 → P2: choose your middleware surface area.
One HandleLambda for HTTP, AppSync, SQS, and EventBridge.
Go Streamable HTTP runtime, sessions, and resumable SSE.
Safe HTTP source IP from provider context — never client headers.
The 128-fixture covenant every runtime is tested against.