diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,30 @@
+Copyright (c) 2012, IlyaPortnov
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of IlyaPortnov nor the names of other
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Network/YAML/Scotty.hs b/Network/YAML/Scotty.hs
new file mode 100644
--- /dev/null
+++ b/Network/YAML/Scotty.hs
@@ -0,0 +1,24 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Network.YAML.Scotty (servePost) where
+
+import Control.Monad.IO.Class
+import Web.Scotty
+import Network.HTTP.Types
+import qualified Data.Text as T
+import Data.Aeson hiding (json)
+
+import Network.YAML.API
+import Network.YAML.TH.Dispatcher
+
+-- | Scotty handler. Serves each method on @/:method@.
+servePost :: Dispatcher -> ScottyM ()
+servePost dispatcher = post "/:method" $ do
+    methodName <- param "method"
+    case dispatcher methodName of
+      Nothing -> status status404
+      Just method -> do
+          args <- jsonData
+          result <- liftIO $ method args
+          json result
+
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/Test/Server.hs b/Test/Server.hs
new file mode 100644
--- /dev/null
+++ b/Test/Server.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE TemplateHaskell, OverloadedStrings, DeriveGeneric, StandaloneDeriving #-}
+
+module Test.Server where
+
+import Web.Scotty
+
+import Network.YAML
+import Network.YAML.Scotty
+
+import Test.TestAPIImpl
+
+$(generateDispatcher api)
+
+main :: IO ()
+main = scotty 3000 $ do
+  servePost dispatcher
+
diff --git a/Test/TestAPIImpl.hs b/Test/TestAPIImpl.hs
new file mode 100644
--- /dev/null
+++ b/Test/TestAPIImpl.hs
@@ -0,0 +1,33 @@
+{-# LANGUAGE TemplateHaskell, OverloadedStrings, DeriveGeneric, StandaloneDeriving #-}
+
+module Test.TestAPIImpl where
+
+import GHC.Generics
+import qualified Data.Text as T
+import Data.Aeson
+
+import Network.YAML
+
+data User = User {fullName :: T.Text, login :: T.Text}
+  deriving (Eq, Show)
+
+deriving instance Generic User
+instance FromJSON User
+instance ToJSON User
+
+data Something = Something {smthText :: T.Text, smthList :: [T.Text]}
+  deriving (Eq, Show, Generic)
+
+instance FromJSON Something
+instance ToJSON Something
+
+sayHello :: User -> IO T.Text
+sayHello user = return $ "Hello, " `T.append` fullName user `T.append` "!"
+
+testSmth :: T.Text -> Something -> IO User
+testSmth t s = return $ User {login = t `T.append` smthText s, fullName = T.intercalate " " (smthList s)}
+
+api :: API
+api = $(makeAPI "http://home.iportnov.ru/test.api" [''User, ''Something] ['sayHello, 'testSmth])
+
+$(writeAPI "test.api" "http://home.iportnov.ru/test.api" [''User, ''Something] ['sayHello, 'testSmth])
diff --git a/yaml-rpc-scotty.cabal b/yaml-rpc-scotty.cabal
new file mode 100644
--- /dev/null
+++ b/yaml-rpc-scotty.cabal
@@ -0,0 +1,36 @@
+Name:                yaml-rpc-scotty
+
+Version:             1.0
+
+Synopsis:            Scotty server backend for yaml-rpc
+Description:         This package provides Scotty-based server backend for yaml-rpc package.
+Homepage:            http://redmine.iportnov.ru/projects/yaml-rpc
+License:             BSD3
+License-file:        LICENSE
+Author:              Ilya V. Portnov
+Maintainer:          portnov84@rambler.ru
+Category:            Network
+Build-type:          Simple
+Cabal-version:       >= 1.8
+
+Library
+  Exposed-modules:   Network.YAML.Scotty
+  Build-depends:       base >= 3 && <= 5,
+                       transformers >= 0.3.0.0,
+                       aeson >= 0.7.0.3,
+                       yaml,
+                       containers,
+                       text >= 1.1.1.3,
+                       http-types >= 0.8.5,
+                       scotty >= 0.8.0,
+                       yaml-rpc >= 1.0
+
+  Other-modules:     Test.Server,
+                     Test.TestAPIImpl
+
+Source-repository head
+  type: git
+  location: git@github.com:portnov/yaml-rpc.git
+
+
+
