Skip to content
@http4k

http4k

The Functional toolkit for Kotlin HTTP applications

http4k — Server as a Function

The functional toolkit for Kotlin

Server as a Function. We meant it literally — no annotations, no reflection, no container, no magic. Just immutable Kotlin functions you can read, test in-memory, and trust in production.

Website · Quickstart · Docs · News


One platform. Four ecosystems. 200+ modules.

Everything ships under a single BOM version, so it just works together — pull in only what you need.

🧩 Core Servers, clients, routing, typesafe lenses, formats & a full testing toolkit. Zero dependencies.
🤖 AI LLM adapters, MCP and A2A — with Fakes so you can test AI integrations offline.
🔌 Connect Typed clients for cloud & SaaS APIs, each with a stateful in-memory Fake.
🛡️ Pro & Enterprise Premium modules, LTS, priority support and verifiable supply-chain security.

Why teams pick http4k

  • Testable — call your whole app in-memory, no server, no ports.
  • Portable — swap Netty → Lambda → GraalVM with one line.
  • Transparent — what you read is exactly what runs. Zero reflection.
  • Proven — 5M+ downloads/month, in production since 2017.

Get started

val app: HttpHandler = { req -> Response(OK).body("hello ${req.query("name")}") }
app.asServer(SunHttp(9000)).start()

Security

We do our security homework in public — see our advisories and coordinated disclosure policy.


Apache 2.0 core · Built & maintained by http4k Ltd

Peace out. // the http4k team

Pinned Loading

  1. http4k http4k Public

    The Functional toolkit for Kotlin HTTP applications. http4k provides a simple and uniform way to serve, consume, and test HTTP services.

    Kotlin 2.8k 281

  2. http4k-by-example http4k-by-example Public

    Complete TDD'd example http4k application showcasing a lot of the http4k features for building apps

    Kotlin 70 10

  3. examples examples Public

    Fully self-contained examples of using the various http4k features

    Kotlin 91 11

  4. www www Public

    Content of the http4k.org website

    Kotlin 3 10

Repositories

Showing 10 of 52 repositories
  • http4k Public

    The Functional toolkit for Kotlin HTTP applications. http4k provides a simple and uniform way to serve, consume, and test HTTP services.

    Kotlin 2,789 281 43 (2 issues need help) 0 Updated Sep 19, 2026
  • http4k/http4k.github.io's past year of commit activity
    HTML 2 4 0 0 Updated Sep 19, 2026
  • http4k/lts.http4k.org's past year of commit activity
    HTML 0 0 0 0 Updated Sep 19, 2026
  • typeflows Public

    Codified Typeflows (https://typeflows.io) standards for http4k org repos

    http4k/typeflows's past year of commit activity
    Kotlin 0 0 0 0 Updated Sep 17, 2026
  • api Public

    Hosts the generated http4k API docs

    http4k/api's past year of commit activity
    HTML 1 1 0 0 Updated Sep 16, 2026
  • examples Public

    Fully self-contained examples of using the various http4k features

    http4k/examples's past year of commit activity
    Kotlin 91 Apache-2.0 11 0 0 Updated Sep 16, 2026
  • http4k-by-example Public

    Complete TDD'd example http4k application showcasing a lot of the http4k features for building apps

    http4k/http4k-by-example's past year of commit activity
    Kotlin 70 Apache-2.0 10 1 0 Updated Sep 16, 2026
  • agent-skills Public

    Skills repository for agents working with http4k libraries

    http4k/agent-skills's past year of commit activity
    6 0 0 0 Updated Sep 16, 2026
  • http4k-oidc Public
    http4k/http4k-oidc's past year of commit activity
    Kotlin 2 1 0 10 Updated Sep 16, 2026
  • mcp-desktop Public

    http4k MCP Desktop Client

    http4k/mcp-desktop's past year of commit activity
    Kotlin 39 5 0 7 Updated Sep 16, 2026

Top languages

Loading…

Most used topics

Loading…