diff --git a/servant-auth-client.cabal b/servant-auth-client.cabal
--- a/servant-auth-client.cabal
+++ b/servant-auth-client.cabal
@@ -3,7 +3,7 @@
 -- see: https://github.com/sol/hpack
 
 name:           servant-auth-client
-version:        0.2.0.0
+version:        0.2.1.0
 synopsis:       servant-client/servant-auth compatibility
 description:    This package provides instances that allow generating clients from
                 <https://hackage.haskell.org/package/servant servant>
@@ -13,7 +13,7 @@
                 For a quick overview of the usage, see the <http://github.com/plow-technologies/servant-auth#readme README>.
 category:       Web, Servant, Authentication
 homepage:       http://github.com/plow-technologies/servant-auth#readme
-bug-reports:    https://github.com/plow-techologies/servant-auth/issues
+bug-reports:    https://github.com/plow-technologies/servant-auth/issues
 author:         Julian K. Arni
 maintainer:     jkarni@gmail.com
 copyright:      (c) Julian K. Arni
@@ -25,7 +25,7 @@
 
 source-repository head
   type: git
-  location: https://github.com/plow-techologies/servant-auth
+  location: https://github.com/plow-technologies/servant-auth
 
 library
   hs-source-dirs:
diff --git a/test/Servant/Auth/ClientSpec.hs b/test/Servant/Auth/ClientSpec.hs
--- a/test/Servant/Auth/ClientSpec.hs
+++ b/test/Servant/Auth/ClientSpec.hs
@@ -1,29 +1,33 @@
+{-# LANGUAGE CPP            #-}
 {-# LANGUAGE DeriveAnyClass #-}
 module Servant.Auth.ClientSpec (spec) where
 
-import           Control.Monad.Trans.Except (runExceptT)
-import           Crypto.JOSE                (JWK,
-                                             KeyMaterialGenParam (OctGenParam),
-                                             genJWK)
-import           Data.Aeson                 (FromJSON (..), ToJSON (..))
-import qualified Data.ByteString.Lazy       as BSL
-import           Data.Time                  (UTCTime, defaultTimeLocale,
-                                             parseTimeOrError)
-import           GHC.Generics               (Generic)
-import           Network.HTTP.Client        (Manager, defaultManagerSettings,
-                                             newManager)
-import           Network.HTTP.Types         (status401)
-import           Network.Wai                (Application)
-import           Network.Wai.Handler.Warp   (testWithApplication)
+import           Crypto.JOSE              (JWK,
+                                           KeyMaterialGenParam (OctGenParam),
+                                           genJWK)
+import           Data.Aeson               (FromJSON (..), ToJSON (..))
+import qualified Data.ByteString.Lazy     as BSL
+import           Data.Time                (UTCTime, defaultTimeLocale,
+                                           parseTimeOrError)
+import           GHC.Generics             (Generic)
+import           Network.HTTP.Client      (Manager, defaultManagerSettings,
+                                           newManager)
+import           Network.HTTP.Types       (status401)
+import           Network.Wai.Handler.Warp (testWithApplication)
 import           Servant
-import           Servant.Client             (BaseUrl (..), ClientM,
-                                             Scheme (Http),
-                                             ServantError (FailureResponse),
-                                             client)
-import           System.IO.Unsafe           (unsafePerformIO)
+import           Servant.Client           (BaseUrl (..), Scheme (Http),
+                                           ServantError (FailureResponse),
+                                           client)
+import           System.IO.Unsafe         (unsafePerformIO)
 import           Test.Hspec
 import           Test.QuickCheck
 
+#if MIN_VERSION_servant(0,9,0)
+import Servant.Client (ClientEnv (..), runClientM)
+#else
+import Control.Monad.Trans.Except (runExceptT)
+#endif
+
 import Servant.Auth.Client
 import Servant.Auth.Server
 
@@ -45,23 +49,26 @@
 
   it "succeeds when the token does not have expiry" $ \port -> property $ \user -> do
     tok <- mkTok user Nothing
-    v <- runExceptT $ getIntClient tok mgr (BaseUrl Http "localhost" port "")
+    v <- getIntClient tok mgr (BaseUrl Http "localhost" port "")
     v `shouldBe` Right (length $ name user)
 
   it "succeeds when the token is not expired" $ \port -> property $ \user -> do
     tok <- mkTok user (Just future)
-    v <- runExceptT $ getIntClient tok mgr (BaseUrl Http "localhost" port "")
+    v <- getIntClient tok mgr (BaseUrl Http "localhost" port "")
     v `shouldBe` Right (length $ name user)
 
   it "fails when token is expired" $ \port -> property $ \user -> do
     tok <- mkTok user (Just past)
-    Left (FailureResponse stat _ _)  <- runExceptT
-      $ getIntClient tok mgr (BaseUrl Http "localhost" port "")
+    Left (FailureResponse stat _ _)  <- getIntClient tok mgr (BaseUrl Http "localhost" port "")
     stat `shouldBe` status401
 
 
-getIntClient :: Token -> Manager -> BaseUrl -> ClientM Int
-getIntClient = client api
+getIntClient :: Token -> Manager -> BaseUrl -> IO (Either ServantError Int)
+#if MIN_VERSION_servant(0,9,0)
+getIntClient tok m burl = runClientM (client api tok) (ClientEnv m burl)
+#else
+getIntClient tok m burl = runExceptT $ client api tok m burl
+#endif
 -- }}}
 ------------------------------------------------------------------------------
 -- * API and Server {{{
@@ -108,6 +115,7 @@
 
 future :: UTCTime
 future = parseTimeOrError True defaultTimeLocale "%Y-%m-%d" "2070-01-01"
+
 
 -- }}}
 ------------------------------------------------------------------------------
