diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+0.8.7
+-----
+
+- Support for servant-0.18
+   - Hint for migration: if you get errors about `ambiguous type
+     variable ‘context0’ arising from a use of ‘mock’`, try calling
+     `mock` with explicit type information about the context: `mock
+     api (Proxy @'[])`, not `mock api Proxy`.
+
 0.8.6
 -----
 
diff --git a/example/main.hs b/example/main.hs
--- a/example/main.hs
+++ b/example/main.hs
@@ -23,4 +23,4 @@
 api = Proxy
 
 main :: IO ()
-main = run 8080 (serve api $ mock api Proxy)
+main = run 8080 (serve api $ mock api (Proxy :: Proxy '[]))
diff --git a/servant-mock.cabal b/servant-mock.cabal
--- a/servant-mock.cabal
+++ b/servant-mock.cabal
@@ -1,6 +1,6 @@
 cabal-version:       >=1.10
 name:                servant-mock
-version:             0.8.6
+version:             0.8.7
 
 synopsis:            Derive a mock server for free from your servant API types
 category:            Servant, Web, Testing
@@ -43,8 +43,8 @@
     base-compat     >=0.10.5   && <0.12,
     bytestring      >=0.10.8.1 && <0.11,
     http-types      >=0.12.2   && <0.13,
-    servant         >=0.17     && <0.18,
-    servant-server  >=0.17     && <0.18,
+    servant         >=0.17     && <0.19,
+    servant-server  >=0.17     && <0.19,
     transformers    >=0.5.2.0  && <0.6,
     QuickCheck      >=2.12.6.1 && <2.14,
     wai             >=3.2.1.2  && <3.3
diff --git a/src/Servant/Mock.hs b/src/Servant/Mock.hs
--- a/src/Servant/Mock.hs
+++ b/src/Servant/Mock.hs
@@ -76,7 +76,11 @@
 --   than turns them into random-response-generating
 --   request handlers, hence providing an instance for
 --   all the combinators of the core /servant/ library.
-class HasServer api context => HasMock api context where
+class (HasServer api context
+#if MIN_VERSION_servant_server(0,18,0)
+      , HasContextEntry (context .++ DefaultErrorFormatters) ErrorFormatters
+#endif
+      ) => HasMock api context where
   -- | Calling this method creates request handlers of
   --   the right type to implement the API described by
   --   @api@ that just generate random response values of
@@ -156,32 +160,56 @@
     => HasMock (Header' mods h a :> rest) context where
   mock _ context = \_ -> mock (Proxy :: Proxy rest) context
 
-instance (Arbitrary a, KnownNat status, ReflectMethod method, AllCTRender ctypes a)
+instance (Arbitrary a, KnownNat status, ReflectMethod method, AllCTRender ctypes a
+#if MIN_VERSION_servant_server(0,18,0)
+         , HasContextEntry (context .++ DefaultErrorFormatters) ErrorFormatters
+#endif
+         )
     => HasMock (Verb method status ctypes a) context where
   mock _ _ = mockArbitrary
 
-instance (ReflectMethod method) => HasMock (NoContentVerb method) context where
+instance (ReflectMethod method
+#if MIN_VERSION_servant_server(0,18,0)
+         , HasContextEntry (context .++ DefaultErrorFormatters) ErrorFormatters
+#endif
+         ) => HasMock (NoContentVerb method) context where
   mock _ _ = mockArbitrary
 
-instance (Arbitrary a, KnownNat status, ReflectMethod method, MimeRender ctype chunk, FramingRender fr, ToSourceIO chunk a)
+instance (Arbitrary a, KnownNat status, ReflectMethod method, MimeRender ctype chunk, FramingRender fr, ToSourceIO chunk a
+#if MIN_VERSION_servant_server(0,18,0)
+         , HasContextEntry (context .++ DefaultErrorFormatters) ErrorFormatters
+#endif
+         )
     => HasMock (Stream method status fr ctype a) context where
   mock _ _ = mockArbitrary
 
 instance OVERLAPPING_
     (GetHeaders (Headers headerTypes a), Arbitrary (HList headerTypes),
-     Arbitrary a, KnownNat status, ReflectMethod method, AllCTRender ctypes a)
+     Arbitrary a, KnownNat status, ReflectMethod method, AllCTRender ctypes a
+#if MIN_VERSION_servant_server(0,18,0)
+    , HasContextEntry (context .++ DefaultErrorFormatters) ErrorFormatters
+#endif
+    )
     => HasMock (Verb method status ctypes (Headers headerTypes a)) context where
   mock _ _ = mockArbitrary
 
-instance HasMock Raw context where
+instance
+#if MIN_VERSION_servant_server(0,18,0)
+    HasContextEntry (context .++ DefaultErrorFormatters) ErrorFormatters =>
+#endif
+    HasMock Raw context where
   mock _ _ = Tagged $ \_req respond -> do
     bdy <- genBody
     respond $ responseLBS status200 [] bdy
 
     where genBody = pack <$> generate (vector 100 :: Gen [Char])
 
-instance HasMock EmptyAPI context where
-    mock _ _ = emptyServer
+instance
+#if MIN_VERSION_servant_server(0,18,0)
+    HasContextEntry (context .++ DefaultErrorFormatters) ErrorFormatters =>
+#endif
+    HasMock EmptyAPI context where
+  mock _ _ = emptyServer
 
 instance HasMock api context => HasMock (Summary d :> api) context where
     mock _ context = mock (Proxy :: Proxy api) context
@@ -189,7 +217,11 @@
 instance HasMock api context => HasMock (Description d :> api) context where
     mock _ context = mock (Proxy :: Proxy api) context
 
-instance (HasContextEntry context (NamedContext name subContext), HasMock rest subContext) =>
+instance ( HasContextEntry context (NamedContext name subContext)
+#if MIN_VERSION_servant_server(0,18,0)
+         , HasContextEntry (context .++ DefaultErrorFormatters) ErrorFormatters
+#endif
+         , HasMock rest subContext) =>
   HasMock (WithNamedContext name subContext rest) context where
 
   mock _ _ = mock (Proxy :: Proxy rest) (Proxy :: Proxy subContext)
diff --git a/test/Servant/MockSpec.hs b/test/Servant/MockSpec.hs
--- a/test/Servant/MockSpec.hs
+++ b/test/Servant/MockSpec.hs
@@ -61,7 +61,7 @@
     context "Get" $ do
       let api :: Proxy (Get '[JSON] Body)
           api = Proxy
-          app = serve api (mock api Proxy)
+          app = serve api (mock api (Proxy :: Proxy '[]))
       with (return app) $ do
         it "serves arbitrary response bodies" $ do
           get "/" `shouldRespondWith` 200{
