diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Revision history for mu-haskell
+
+## 0.1.0.0 -- YYYY-mm-dd
+
+* First version. Released on an unsuspecting world.
diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright © 2019-2020 47 Degrees. <http://47deg.com>
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/exe/ExampleServer.hs b/exe/ExampleServer.hs
new file mode 100644
--- /dev/null
+++ b/exe/ExampleServer.hs
@@ -0,0 +1,46 @@
+{-# language DataKinds             #-}
+{-# language OverloadedStrings     #-}
+{-# language PartialTypeSignatures #-}
+{-# language TypeApplications      #-}
+{-# language TypeFamilies          #-}
+
+module Main where
+
+import qualified Data.Text.IO             as Text
+import           Mu.Rpc.Annotations
+import           Mu.Rpc.Examples
+import           Mu.Schema.Annotations
+import           Mu.Servant.Server
+import           Mu.Server
+import           Network.Wai.Handler.Warp
+import           Servant
+
+main :: IO ()
+main = do
+  putStrLn "running quickstart application"
+  Text.putStrLn $ layout quickstartAPI
+  run 8081 (serve quickstartAPI servantServer)
+
+servantServer :: _
+servantServer = servantServerHandlers toHandler quickstartServer
+
+quickstartAPI :: Proxy _
+quickstartAPI = packageAPI (quickstartServer @ServerErrorIO)
+
+type instance
+  AnnotatedPackage ServantRoute QuickStartService =
+    '[ 'AnnService "Greeter" ('ServantTopLevelRoute '["greet"]),
+       'AnnMethod "Greeter" "SayHello"
+                  ('ServantRoute '["say", "hello"] 'POST 200),
+       'AnnMethod "Greeter" "SayHi"
+                  ('ServantRoute '["say", "hi"] 'POST 200),
+       'AnnMethod "Greeter" "SayManyHellos"
+                  ('ServantRoute '["say", "many", "hellos"] 'POST 200)
+     ]
+
+type instance
+  AnnotatedSchema ServantContentTypes QuickstartSchema =
+    '[ 'AnnType "HelloRequest" DefaultServantContentTypes,
+       'AnnType "HelloResponse" DefaultServantContentTypes,
+       'AnnType "HiRequest" DefaultServantContentTypes
+     ]
diff --git a/mu-servant-server.cabal b/mu-servant-server.cabal
new file mode 100644
--- /dev/null
+++ b/mu-servant-server.cabal
@@ -0,0 +1,61 @@
+name:               mu-servant-server
+version:            0.4.0.0
+synopsis:           Servant servers for Mu definitions
+description:
+  With @mu-servant-server@ you can easily build Servant servers for mu-haskell!
+
+license:            Apache-2.0
+license-file:       LICENSE
+author:             Andre Marianiello
+maintainer:         alejandro.serrano@47deg.com
+copyright:          Copyright © 2019-2020 <http://47deg.com 47 Degrees>
+cabal-version:      >=1.10
+category:           Network
+build-type:         Simple
+extra-source-files: CHANGELOG.md
+homepage:           https://higherkindness.io/mu-haskell/
+bug-reports:        https://github.com/higherkindness/mu-haskell/issues
+
+source-repository head
+  type:     git
+  location: https://github.com/higherkindness/mu-haskell
+
+library
+  exposed-modules:  Mu.Servant.Server
+  build-depends:
+      aeson           >=1.4   && <2
+    , async           >=2.2   && < 3
+    , base            >=4.12  && <5
+    , conduit         >=1.3.2 && <2
+    , generic-aeson   >=0.2   && <0.3
+    , ghc-prim        >=0.5   && <0.7
+    , mtl             >=2.2   && <3
+    , mu-rpc          ==0.4.*
+    , mu-schema       ==0.3.*
+    , servant         >=0.16  && <0.19
+    , servant-server  >=0.16  && <0.19
+    , servant-swagger >=1.1.7 && <2
+    , stm             >=2.5   && <3
+    , swagger2        >=2.5   && <3
+    , utf8-string     >=1     && <2
+
+  hs-source-dirs:   src
+  default-language: Haskell2010
+  ghc-options:      -Wall -fprint-potential-instances
+
+executable servant-example-server
+  main-is:          ExampleServer.hs
+  build-depends:
+      aeson           >=1.4   && <2
+    , base            >=4.12  && <5
+    , conduit         >=1.3.2 && <2
+    , mu-rpc          ==0.4.*
+    , mu-schema       ==0.3.*
+    , mu-servant-server
+    , servant-server  >=0.16  && <0.19
+    , text            >=1.2   && <2
+    , warp            >=3.3   && <4
+
+  hs-source-dirs:   exe
+  default-language: Haskell2010
+  ghc-options:      -Wall -fprint-explicit-kinds -fprint-explicit-foralls
diff --git a/src/Mu/Servant/Server.hs b/src/Mu/Servant/Server.hs
new file mode 100644
--- /dev/null
+++ b/src/Mu/Servant/Server.hs
@@ -0,0 +1,509 @@
+{-# language ConstraintKinds       #-}
+{-# language DataKinds             #-}
+{-# language DeriveGeneric         #-}
+{-# language FlexibleContexts      #-}
+{-# language FlexibleInstances     #-}
+{-# language GADTs                 #-}
+{-# language MultiParamTypeClasses #-}
+{-# language PolyKinds             #-}
+{-# language RankNTypes            #-}
+{-# language ScopedTypeVariables   #-}
+{-# language TypeApplications      #-}
+{-# language TypeFamilies          #-}
+{-# language TypeOperators         #-}
+{-# language UndecidableInstances  #-}
+
+{-|
+Description : Execute a Mu 'Server' using Servant
+
+This module allows you to serve a Mu 'Server'
+as an OpenAPI / Swagger / REST end-point.
+In particular, it translates to the kind of
+type-level APIs used by Servant.
+-}
+module Mu.Servant.Server (
+  -- * Convert Mu to Servant
+  servantServerHandlers,
+  servantServerHandlersExtra,
+  toHandler,
+  packageAPI,
+  swagger,
+  -- * Required annotations
+  ServantRoute(..),
+  DefaultServantContentTypes,
+  ServantContentTypes(..),
+  ServantStreamContentType(..),
+  -- Reexports
+  StdMethod(..),
+  module Servant.API
+) where
+
+import           Conduit
+import           Control.Concurrent
+import           Control.Concurrent.Async
+import           Control.Monad.Except
+import           Data.Aeson
+import qualified Data.ByteString.Lazy.UTF8 as LB8
+import           Data.Conduit.Internal     (ConduitT (..), Pipe (..))
+import           Data.Kind
+import           Data.Swagger              (Swagger, ToSchema (..))
+import           Generics.Generic.Aeson
+import           GHC.Generics
+import           GHC.TypeLits
+import           GHC.Types                 (Any)
+import           Mu.Rpc
+import           Mu.Rpc.Annotations
+import           Mu.Schema
+import           Mu.Schema.Annotations
+import           Mu.Server
+import           Servant
+import           Servant.API
+import           Servant.Swagger
+import           Servant.Types.SourceT
+
+-- | Reinterprets a Mu server action as a Servant handler.
+toHandler :: ServerErrorIO a -> Handler a
+toHandler = Handler . withExceptT convertServerError
+
+-- | Translates a Mu `Mu.Server.ServerError` into a Servant `Servant.ServerError`.
+convertServerError :: Mu.Server.ServerError -> Servant.ServerError
+convertServerError (Mu.Server.ServerError code msg) = case code of
+  Unknown         -> err502 {errBody = LB8.fromString msg}
+  Unavailable     -> err503 {errBody = LB8.fromString msg}
+  Unimplemented   -> err501 {errBody = LB8.fromString msg}
+  Unauthenticated -> err401 {errBody = LB8.fromString msg}
+  Internal        -> err500 {errBody = LB8.fromString msg}
+  Invalid         -> err400 {errBody = LB8.fromString msg}
+  NotFound        -> err404 {errBody = LB8.fromString msg}
+
+-- | Converts a Mu server into Servant server
+--   by running all Mu handler actions in the `Handler` type.
+--   This version assumes /no/ additional routes
+--   in the Servant server when compared to Mu's.
+servantServerHandlers ::
+  forall pname m chn ss handlers.
+  ( ServantServiceHandlers
+      ('Package pname ss)
+      m
+      chn
+      ss
+      handlers
+  , ExtraFor ('Package pname ss) ~ EmptyAPI
+  )
+  => (forall a. m a -> Handler a) -- ^ how to turn the inner Mu monad into 'Handler', use 'toHandler' (or a composition with it) in most cases
+  -> Mu.Server.ServerT chn () ('Package pname ss) m handlers  -- ^ server to be converted
+  -> Servant.Server (PackageAPI ('Package pname ss) handlers)
+servantServerHandlers f (Services svcs) =
+  emptyServer :<|> servantServiceHandlers f (Proxy @('Package pname ss)) svcs
+
+-- | Converts a Mu server into Servant server
+--   by running all Mu handler actions in the `Handler` type.
+--   This version should be used when additional
+--   routes have been added in the Servant version.
+servantServerHandlersExtra ::
+  forall pname m chn ss handlers.
+  ( ServantServiceHandlers
+      ('Package pname ss)
+      m
+      chn
+      ss
+      handlers
+  )
+  => (forall a. m a -> Handler a) -- ^ how to turn the inner Mu monad into 'Handler', use 'toHandler' (or a composition with it) in most cases
+  -> Server (ExtraFor ('Package pname ss)) -- ^ additional handler for the extra route
+  -> Mu.Server.ServerT chn () ('Package pname ss) m handlers  -- ^ server to be converted
+  -> Servant.Server (PackageAPI ('Package pname ss) handlers)
+servantServerHandlersExtra f extra (Services svcs) =
+  extra :<|> servantServiceHandlers f (Proxy @('Package pname ss)) svcs
+
+-- | Converts the information from a Mu server
+--   into a 'Swagger' document.
+swagger :: forall pname ss handlers chn m.
+           HasSwagger (ServicesAPI ('Package pname ss) ss handlers)
+        => Mu.Server.ServerT chn () ('Package pname ss) m handlers
+        -> Swagger
+swagger _ = toSwagger (Proxy @(ServicesAPI ('Package pname ss) ss handlers))
+
+-- | Obtains a Servant API 'Proxy' value for use
+--   with functions like 'serve' and 'layout'.
+packageAPI :: Mu.Server.ServerT chn t pkg s handlers -> Proxy (PackageAPI pkg handlers)
+packageAPI _ = Proxy
+
+type family PackageAPI (pkg :: Package snm mnm anm (TypeRef snm)) handlers where
+  PackageAPI ('Package pnm ss) handlers = PackageAPI' (ExtraFor ('Package pnm ss)) ('Package pnm ss) handlers
+
+type family PackageAPI' (extra :: Type) (pkg :: Package snm mnm anm (TypeRef snm)) handlers where
+  PackageAPI' extra ('Package pnm ss) handlers = extra :<|> ServicesAPI ('Package pnm ss) ss handlers
+
+class
+  ServantServiceHandlers
+    (pkg :: Package snm mnm anm (TypeRef snm))
+    (m :: Type -> Type)
+    (chn :: ServiceChain snm)
+    (ss :: [Service snm mnm anm (TypeRef snm)])
+    (hss :: [[Type]]) where
+  type ServicesAPI pkg ss hss
+
+  servantServiceHandlers ::
+    (forall a. m a -> Handler a) ->
+    Proxy pkg ->
+    ServicesT chn info ss m hss ->
+    Servant.Server (ServicesAPI pkg ss hss)
+
+instance ServantServiceHandlers pkg m chn '[] '[] where
+  type ServicesAPI pkg '[] '[] = EmptyAPI
+  servantServiceHandlers _ _ S0 = emptyServer
+
+instance
+  ( ServantMethodHandlers
+      pkg
+      sname
+      m
+      chn
+      (MappingRight chn sname)
+      methods
+      hs,
+    ServantServiceHandlers pkg m chn rest hss
+  ) =>
+  ServantServiceHandlers pkg m chn ('Service sname methods ': rest) (hs ': hss)
+  where
+  type
+    ServicesAPI pkg ('Service sname methods ': rest) (hs ': hss) =
+      MethodsAPI pkg sname methods hs :<|> ServicesAPI pkg rest hss
+  servantServiceHandlers f pkgP (svr :<&>: rest) =
+    servantMethodHandlers f pkgP (Proxy @sname) svr
+      :<|> servantServiceHandlers f pkgP rest
+
+class
+  ServantMethodHandlers
+    (pkg :: Package Symbol Symbol anm (TypeRef Symbol))
+    (sname :: Symbol)
+    (m :: Type -> Type)
+    (chn :: ServiceChain snm)
+    (inh :: Type)
+    (ms :: [Method snm Symbol anm (TypeRef snm)])
+    (hs :: [Type]) where
+  type MethodsAPI pkg sname ms hs
+  servantMethodHandlers ::
+    (forall a. m a -> Handler a) ->
+    Proxy pkg ->
+    Proxy sname ->
+    HandlersT chn info inh ms m hs ->
+    Servant.Server (MethodsAPI pkg sname ms hs)
+
+instance
+  ServantMethodHandlers pkg svc m chn inh '[] '[] where
+  type MethodsAPI _ _ '[] '[] = EmptyAPI
+  servantMethodHandlers _ _ _ H0 = emptyServer
+
+instance
+  ( ServantMethodHandler httpMethod httpStatus m args ret h,
+    ServantMethodHandlers pkg sname m chn () rest hs,
+    HttpMethodFor pkg sname mname ~ httpMethod,
+    HttpStatusFor pkg sname mname ~ httpStatus,
+    Server (MethodAPI pkg sname ('Method mname args ret) h) ~ Server (HandlerAPI httpMethod httpStatus args ret h)
+  ) =>
+  ServantMethodHandlers pkg sname m chn () ('Method mname args ret ': rest) (h ': hs)
+  where
+  type
+    MethodsAPI pkg sname ('Method mname args ret ': rest) (h ': hs) =
+      MethodAPI pkg sname ('Method mname args ret) h
+        :<|> MethodsAPI pkg sname rest hs
+  servantMethodHandlers f pkgP snameP (Hmore _ _ h rest) =
+    servantMethodHandler
+      f
+      (Proxy @httpMethod)
+      (Proxy @httpStatus)
+      (Proxy @args)
+      (Proxy @ret)
+      (h NoRpcInfo ())
+      :<|> servantMethodHandlers f pkgP snameP rest
+
+type family MethodAPI pkg sname method h where
+  MethodAPI pkg sname ('Method mname args ret) h =
+    PrefixRoute (RouteFor pkg sname mname)
+      ( HandlerAPI
+          (HttpMethodFor pkg sname mname)
+          (HttpStatusFor pkg sname mname)
+          args
+          ret
+          h
+      )
+
+class
+  ServantMethodHandler
+    (httpMethod :: StdMethod)
+    (httpStatus :: Nat)
+    (m :: Type -> Type)
+    (args :: [Argument snm anm (TypeRef snm)])
+    (ret :: Return snm (TypeRef snm))
+    (h :: Type) where
+  type
+    HandlerAPI
+      httpMethod
+      httpStatus
+      args
+      ret
+      h
+  servantMethodHandler ::
+    (forall a. m a -> Handler a) ->
+    Proxy httpMethod ->
+    Proxy httpStatus ->
+    Proxy args ->
+    Proxy ret ->
+    h ->
+    Servant.Server (HandlerAPI httpMethod httpStatus args ret h)
+
+instance ServantMethodHandler httpMethod httpStatus m '[] 'RetNothing (m ()) where
+  type
+    HandlerAPI httpMethod httpStatus '[] 'RetNothing (m ()) =
+      -- according to https://github.com/haskell-servant/servant/issues/683
+      -- we always need a content type for NoContent
+      Verb httpMethod httpStatus '[JSON] NoContent
+  servantMethodHandler f _ _ _ _ = fmap (const NoContent) . f
+
+instance ServantMethodHandler httpMethod httpStatus m '[] ('RetSingle rref) (m r) where
+  type
+    HandlerAPI httpMethod httpStatus '[] ('RetSingle rref) (m r) =
+      Verb httpMethod httpStatus (UnaryContentTypesFor rref) r
+  servantMethodHandler f _ _ _ _ = f
+
+instance
+  (MonadServer m) =>
+  ServantMethodHandler httpMethod httpStatus m '[] ('RetStream rref) (ConduitT r Void m () -> m ())
+  where
+  type
+    HandlerAPI httpMethod httpStatus '[] ('RetStream rref) (ConduitT r Void m () -> m ()) =
+      Stream httpMethod httpStatus (StreamFramingFor rref) (StreamContentTypeFor rref) (SourceIO (StreamResult r))
+  servantMethodHandler f _ _ _ _ = liftIO . sinkToSource f
+
+-- | represents a single element that will be streamed from the server to the client. That element will either be a `Result` containing a return value, or an `Error` indicating that something went wrong. Without this wrapper, server streams that encountered an error after the response headers have been sent would simply terminate without communicating to the client that anything went wrong.
+data StreamResult a = Error String | Result a
+  deriving (Generic, Show)
+
+instance Data.Swagger.ToSchema a => Data.Swagger.ToSchema (StreamResult a)
+instance ToJSON a => ToJSON (StreamResult a) where
+  toJSON = gtoJson
+
+-- converts a conduit sink into a Servant SourceIO for interoperating with server streaming handlers
+sinkToSource ::
+  forall r m.
+  (MonadServer m) =>
+  (forall a. m a -> Handler a) ->
+  (ConduitT r Void m () -> m ()) ->
+  IO (SourceIO (StreamResult r))
+sinkToSource f sink = do
+  var <- newEmptyMVar :: IO (MVar (Maybe r))
+  forwarder <- liftIO $ async $ do
+    e <- runHandler . f . sink $ toMVarConduit var
+    -- signal that the conduit finished
+    putMVar var Nothing
+    pure e
+  let step :: StepT IO (StreamResult r)
+      step = Effect $ do
+        nextOutput <- takeMVar var
+        case nextOutput of
+          Just r -> pure $ Yield (Result r) step
+          Nothing -> do
+            -- waiting on this thread should get us sync and async exceptions
+            res <- wait forwarder
+            case res of
+              Left err -> do
+                let streamErr = LB8.toString $ errBody err
+                pure $ Yield (Mu.Servant.Server.Error streamErr) Stop
+              Right () -> pure Stop
+  pure $ fromStepT step
+
+toMVarConduit :: MonadServer m => MVar (Maybe r) -> ConduitT r Void m ()
+toMVarConduit var = do
+  x <- await
+  case x of
+    Nothing -> pure ()
+    Just _ -> do
+      liftIO $ putMVar var x
+      toMVarConduit var
+
+instance
+  (ServantMethodHandler httpMethod httpStatus m rest ret h) =>
+  ServantMethodHandler httpMethod httpStatus m ('ArgSingle anm aref ': rest) ret (t -> h)
+  where
+  type
+    HandlerAPI httpMethod httpStatus ('ArgSingle anm aref ': rest) ret (t -> h) =
+      ReqBody (UnaryContentTypesFor aref) t :> HandlerAPI httpMethod httpStatus rest ret h
+  servantMethodHandler f mP sP _ retP h t =
+    servantMethodHandler f mP sP (Proxy @rest) retP (h t)
+
+instance
+  (MonadServer m, ServantMethodHandler httpMethod httpStatus m rest ret h) =>
+  ServantMethodHandler httpMethod httpStatus m ('ArgStream anm aref ': rest) ret (ConduitT () t m () -> h)
+  where
+  type
+    HandlerAPI httpMethod httpStatus ('ArgStream anm aref ': rest) ret (ConduitT () t m () -> h) =
+      StreamBody (StreamFramingFor aref) (StreamContentTypeFor aref) (SourceIO t)
+        :> HandlerAPI httpMethod httpStatus rest ret h
+  servantMethodHandler f mP sP _ retP h =
+    servantMethodHandler f mP sP (Proxy @rest) retP . h . sourceToSource
+
+-- converts a Servant SourceIO into a conduit for interoperating with client streaming handlers
+sourceToSource :: (MonadServer m) => SourceIO t -> ConduitT () t m ()
+sourceToSource (SourceT src) = ConduitT (PipeM (liftIO $ src (pure . go)) >>=)
+  where
+    go :: (MonadServer m) => StepT IO t -> Pipe i i t u m ()
+    go Stop = Done ()
+    go (Skip s) = go s
+    go (Yield t s) = HaveOutput (go s) t
+    go (Effect m) = PipeM (liftIO $ go <$> m)
+    go (Servant.Types.SourceT.Error msg) =
+      PipeM (throwError $ Mu.Server.ServerError Invalid ("error reading stream: " ++ msg))
+
+-- | ServantRoute represents the URL path components of a route. It is used as an `AnnotatedPackage` domain to override the default path for a `Method`. When used in an `AnnService`, the specified `TopLevelRoute` is used as a prefix for all `Method`s in that `Service`.
+-- 1. List of components for the route,
+-- 2. HTTP method which must be used,
+-- 3. HTTP status code of a successful HTTP response from a specific `Method`. Use 200 for the usual status code.
+data ServantRoute
+  = ServantAdditional Type
+  | ServantTopLevelRoute [Symbol]
+  | ServantRoute [Symbol] StdMethod Nat
+
+type family Assert (err :: Constraint) (break :: k1) (a :: k2) :: k2 where
+  -- these cases exist to force evaluation of the "break" parameter when it either has kind [RpcAnnotation ...] or [Annotation ...]
+  Assert _ '[ 'AnnSchema a, 'AnnSchema a ] _ = Any
+  Assert _ '[ 'AnnPackage a, 'AnnPackage a ] _ = Any
+  -- this case should be used whenever "break" is not stuck
+  Assert _ _ a = a
+
+-- a helper type synonym used to provide better errors when a required AnnotatedPackage instance doesn't exist
+type WithAnnotatedPackageInstance domain pkg a =
+  Assert (NoPackageAnnotations domain pkg) (AnnotatedPackage domain pkg) a
+
+-- a helper type synonym used to provide better errors when a required AnnotatedSchema instance doesn't exist
+type WithAnnotatedSchemaInstance domain sch a =
+  Assert (NoSchemaAnnotations domain sch) (AnnotatedSchema domain sch) a
+
+
+-- a helper type family for generating custom error messages about missing AnnotatedPackage instances
+type family NoPackageAnnotations domain pkg :: Constraint where
+  NoPackageAnnotations domain ('Package ('Just pname) _)
+    = TypeError (
+        'Text "Missing required AnnotatedPackage " ':<>: 'ShowType domain ':<>: 'Text " type instance" ':$$:
+        'Text "for " ':<>: 'ShowType pname ':<>: 'Text " package"
+      )
+  NoPackageAnnotations domain pkg
+    = TypeError (
+        'Text "Missing required AnnotatedPackage " ':<>: 'ShowType domain ':<>: 'Text " type instance" ':$$:
+        'Text "for unnamed package: " ':$$: 'ShowType pkg
+      )
+
+-- a helper type family for generating custom error messages about missing AnnotatedSchema instances
+type family NoSchemaAnnotations domain sch :: Constraint where
+  NoSchemaAnnotations domain sch
+    = TypeError (
+        'Text "Missing required AnnotatedSchema " ':<>: 'ShowType domain ':<>: 'Text " type instance" ':$$:
+        'Text "for schema:" ':$$: 'ShowType sch
+      )
+
+-- used to construct a route for a specific method m of service s in package pkg from the @AnnotatedPackage ServantRoute pkg@ instance, along with a custom error message
+type family RouteFor (pkg :: Package snm mnm anm tyref) (s :: Symbol) (m :: Symbol) :: [Symbol] where
+  RouteFor pkg s m =
+    WithAnnotatedPackageInstance ServantRoute pkg (
+      Concat
+        (UnwrapServantRoute (FromMaybe ('ServantRoute '[s] Any Any) (GetServiceAnnotationMay (AnnotatedPackage ServantRoute pkg) s)))
+        (UnwrapServantRoute (FromMaybe ('ServantRoute '[m] Any Any) (GetMethodAnnotationMay (AnnotatedPackage ServantRoute pkg) s m)))
+    )
+
+type family UnwrapServantRoute s where
+  UnwrapServantRoute ('ServantTopLevelRoute s) = s
+  UnwrapServantRoute ('ServantRoute s _ _)     = s
+
+type family ExtraFor (pkg :: Package snm mnm anm tyref) :: Type where
+  ExtraFor pkg =
+    WithAnnotatedPackageInstance ServantRoute pkg
+      (UnwrapServantExtra (FromMaybe ('ServantAdditional EmptyAPI) (GetPackageAnnotationMay (AnnotatedPackage ServantRoute pkg))))
+
+type family UnwrapServantExtra s where
+  UnwrapServantExtra ('ServantAdditional e) = e
+
+type family FromMaybe (a :: k) (ma :: Maybe k) :: k where
+  FromMaybe a 'Nothing = a
+  FromMaybe _ ('Just a) = a
+
+type family Concat (as :: [k]) (bs :: [k]) :: [k] where
+  Concat '[] bs = bs
+  Concat (a ': as) bs = a ': Concat as bs
+
+type family PrefixRoute (prefix :: [Symbol]) route where
+  PrefixRoute '[] route = route
+  PrefixRoute (p ': rest) route = p :> PrefixRoute rest route
+
+-- | ServantContentTypes represents that acceptable content types that can be used when a message in encoded:
+-- 1. in a unary (non-streaming) HTTP request\/response body,
+-- 2. encoded in a streaming HTTP request\/response body.
+-- It is used as an `AnnotatedSchema` domain.
+data ServantContentTypes
+  = ServantContentTypes
+      { unary  :: [Type]
+      , stream :: Maybe ServantStreamContentType
+      }
+
+type DefaultServantContentTypes
+  = 'ServantContentTypes '[JSON] ('Just ('ServantStreamContentType NewlineFraming JSON))
+
+data ServantStreamContentType
+  = ServantStreamContentType
+      { framing           :: Type,
+        streamContentType :: Type
+      }
+
+-- extracts a StdMethod from a ServantMethod annotation of a given method, defaulting to POST if such an annotation doesn't exist
+type family HttpMethodFor pkg sname mname :: StdMethod where
+  HttpMethodFor pkg sname mname =
+    WithAnnotatedPackageInstance ServantRoute pkg (
+      UnwrapServantMethod (FromMaybe ('ServantRoute Any 'POST Any) (GetMethodAnnotationMay (AnnotatedPackage ServantRoute pkg) sname mname))
+    )
+
+type family UnwrapServantMethod m where
+  UnwrapServantMethod ('ServantRoute _ m _) = m
+
+-- extracts the HTTP status code from the ServantStatus annotation of a given method, or defaults to 200 if such an annotation doesn't exist
+type family HttpStatusFor pkg sname mname :: Nat where
+  HttpStatusFor pkg sname mname =
+    WithAnnotatedPackageInstance ServantRoute pkg (
+      UnwrapServantStatus (FromMaybe ('ServantRoute Any Any 200) (GetMethodAnnotationMay (AnnotatedPackage ServantRoute pkg) sname mname))
+    )
+
+type family UnwrapServantStatus s where
+  UnwrapServantStatus ('ServantRoute _ _ s) = s
+
+-- extracts a list of content types from a ServantUnaryContentTypes annotation of a given method
+type family UnaryContentTypesFor (tyRef :: TypeRef sname) :: [Type] where
+  UnaryContentTypesFor ('SchemaRef schema typeName) =
+    WithAnnotatedSchemaInstance ServantContentTypes schema (
+      UnwrapServantUnaryContentType (GetTypeAnnotation (AnnotatedSchema ServantContentTypes schema) typeName)
+    )
+
+type family UnwrapServantUnaryContentType (sctype :: ServantContentTypes) :: [Type] where
+  UnwrapServantUnaryContentType ('ServantContentTypes ctype stype) = ctype
+
+-- extracts a content type from a ServantStreamContentType annotation of a given method
+type family StreamContentTypeFor (tyRef :: TypeRef sname) :: Type where
+  StreamContentTypeFor ('SchemaRef schema typeName) =
+    WithAnnotatedSchemaInstance ServantContentTypes schema (
+      StreamContentType (GetTypeAnnotation (AnnotatedSchema ServantContentTypes schema) typeName)
+    )
+
+type family StreamContentType (sct :: ServantContentTypes) where
+  StreamContentType ('ServantContentTypes _ 'Nothing)
+    = TypeError ('Text "missing stream content type")
+  StreamContentType ('ServantContentTypes _ ('Just ('ServantStreamContentType _ ctype))) = ctype
+
+-- extracts a framing from a ServantStreamContentType annotation of a given method
+type family StreamFramingFor (tyRef :: TypeRef sname) :: Type where
+  StreamFramingFor ('SchemaRef schema typeName) =
+    WithAnnotatedSchemaInstance ServantContentTypes schema (
+      StreamFraming (GetTypeAnnotation (AnnotatedSchema ServantContentTypes schema) typeName)
+    )
+
+type family StreamFraming (sct :: ServantContentTypes) where
+  StreamFraming ('ServantContentTypes _ 'Nothing)
+    = TypeError ('Text "missing stream content type")
+  StreamFraming ('ServantContentTypes _ ('Just ('ServantStreamContentType framing _))) = framing
