# Servant

> Type-level web API DSL for Haskell: servers, clients and docs from one type

Source: https://talira.ai/catalog/servant-wj496h90
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Framework, Library
- Categories: [frameworks / web / backend](https://talira.ai/categories/frameworks/web/backend), [languages / haskell](https://talira.ai/categories/languages/haskell)
- Licence: BSD-3-Clause[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Servant Contributors](https://talira.ai/orgs/haskell-servant.md)

Servant is a family of Haskell libraries for type-safe web APIs. You describe an API as a Haskell type, and Servant checks at compile time that your server's request handlers implement it, derives Haskell client functions that call it, generates JavaScript clients, documentation and OpenAPI (Swagger) descriptions from it, and can mock it. The server side (servant-server) works as a web framework running on [Warp](https://talira.ai/catalog/warp-v49eg311.md) through WAI, and servant-auth adds authentication. It's maintained by the Servant contributors, after starting at Zalora.

## Links

- Website: https://www.servant.dev/
- GitHub: https://github.com/haskell-servant/servant
- Docs: https://docs.servant.dev/

## Problems it solves

- build a REST API in Haskell where the compiler checks the handlers match the spec
- get a typed client for my Haskell web API without writing it by hand
- generate API docs and an OpenAPI spec from my Haskell server's types

## Features

- Describe a web API as a Haskell type checked at compile time
- Serve the API with servant-server, checked against its handlers
- Derive Haskell client functions with servant-client
- Generate JavaScript client functions and API documentation
- OpenAPI (Swagger) descriptions from the API type
- Authentication with servant-auth

## Trust

Overall: 0.59 out of 1.
Signals: maintenance 0.79, adoption 0.66, momentum 0.35, community 0.98, backing 0.30, extensibility 0.00.

- last commit 3 days ago
- 28 commits in the last 90 days
- 2.0k GitHub stars
- 284 contributors
- accepts sponsorship (Github, Custom)
- backed by Servant Contributors

## Related

- Works with [WAI](https://talira.ai/catalog/wai-zb43k2ze.md)
- Works with [Haskell](https://talira.ai/catalog/haskell-jjq1dx6f.md)

## Sources

[^1]: https://github.com/haskell-servant/servant/blob/master/servant/LICENSE (checked 28 Nov 2026)
