packages feed

mcp-server 0.1.0.17 → 0.1.0.18

raw patch · 3 files changed

+97/−22 lines, 3 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,78 @@-# Revision history for haskell-mcp-lib+# Revision history for mcp-server -## 0.1.0.0 -- YYYY-mm-dd+## Unreleased++* Switch default-language to GHC2021 to support broader range of GHC versions (9.6 - 9.12)++## 0.1.0.17 -- 2026-01-28++* Implement protocol version negotiation according to spec+* Remove unused dependencies, fix GHC warnings+* Add tested-with and haskell-ci generated GitHub Actions config++## 0.1.0.16 -- 2026-01-19++* Bump template-haskell dependency upper bound++## 0.1.0.15 -- 2025-08-13++* Update to MCP spec 2025-06-18++## 0.1.0.14 -- 2025-06-26++* Bump version bounds before adding to Stackage+* Remove support for JSON-RPC batching++## 0.1.0.13 -- 2025-06-17++* Better handling of UTF-8 in logs++## 0.1.0.12 -- 2025-06-17++* Fix unicode handling+* Refactor transports to remove unneeded functions+* Add unicode handling tests++## 0.1.0.11 -- 2025-06-17++* Refactor transports and add HTTP streaming support+* Add `MCP.Server.Handlers` module+* Add `MCP.Server.Transport.Http` and `MCP.Server.Transport.Stdio` modules++## 0.1.0.10 -- 2025-06-13++* Fix resources handling++## 0.1.0.9 -- 2025-06-13++* Bump versions of dependencies+* Port tests to hspec++## 0.1.0.8 -- 2025-06-12++* Support for nestable data types++## 0.1.0.7 -- 2025-06-09++* Documentation updates++## 0.1.0.6 -- 2025-06-09++* Remove pagination support++## 0.1.0.5 -- 2025-06-09++* Add descriptions to constructors and fields++## 0.1.0.4 -- 2025-06-09++* Clean up build configuration++## 0.1.0.3 -- 2025-06-09++* Refactor example modules+* Fix JSON to Haskell type conversion++## 0.1.0.0 -- 2025-06-05  * First version. Released on an unsuspecting world.
README.md view
@@ -13,7 +13,7 @@ ## Supported MCP Features  - ✅ **Prompts**: User-controlled prompt templates with arguments-- ✅ **Resources**: Application-controlled readable resources  +- ✅ **Resources**: Application-controlled readable resources - ✅ **Tools**: Model-controlled callable functions - ✅ **Initialization Flow**: Complete protocol lifecycle with version negotiation - ✅ **Error Handling**: Comprehensive error types and JSON-RPC error responses@@ -38,7 +38,7 @@  -- Define your data types data MyPrompt = Recipe { idea :: Text } | Shopping { items :: Text }-data MyResource = Menu | Specials  +data MyResource = Menu | Specials data MyTool = Search { query :: Text } | Order { item :: Text }  -- Implement handlers@@ -46,7 +46,7 @@ handlePrompt (Recipe idea) = pure $ ContentText $ "Recipe for " <> idea handlePrompt (Shopping items) = pure $ ContentText $ "Shopping list: " <> items -handleResource :: MyResource -> IO Content  +handleResource :: MyResource -> IO Content handleResource Menu = pure $ ContentText "Today's menu..." handleResource Specials = pure $ ContentText "Daily specials..." @@ -60,12 +60,12 @@   where     serverInfo = McpServerInfo       { serverName = "My MCP Server"-      , serverVersion = "1.0.0" +      , serverVersion = "1.0.0"       , serverInstructions = "A sample MCP server"       }     handlers = McpServerHandlers       { prompts = Just $(derivePromptHandler ''MyPrompt 'handlePrompt)-      , resources = Just $(deriveResourceHandler ''MyResource 'handleResource)  +      , resources = Just $(deriveResourceHandler ''MyResource 'handleResource)       , tools = Just $(deriveToolHandler ''MyTool 'handleTool)       } ```@@ -88,7 +88,7 @@ ```haskell data MyTool = Calculate { number :: Int, factor :: Double, enabled :: Bool } -- Text "42" -> Int 42--- Text "3.14" -> Double 3.14  +-- Text "3.14" -> Double 3.14 -- Text "true" -> Bool True ``` @@ -141,7 +141,7 @@ ```haskell -- Define descriptions for constructors and fields descriptions :: [(String, String)]-descriptions = +descriptions =   [ ("Recipe", "Generate a recipe for a specific dish")     -- Constructor description   , ("Search", "Search our menu database")                  -- Constructor description   , ("idea", "The dish you want a recipe for")              -- Field description@@ -174,7 +174,7 @@     handlers = McpServerHandlers       { prompts = Just (promptListHandler, promptGetHandler)       , resources = Nothing  -- Not supported-      , tools = Nothing      -- Not supported  +      , tools = Nothing      -- Not supported       } ``` @@ -200,7 +200,7 @@ ```  **Features:**-- CORS enabled for web clients  +- CORS enabled for web clients - GET `/mcp` for server discovery - POST `/mcp` for JSON-RPC messages - Full MCP 2025-06-18 compliance@@ -215,14 +215,14 @@  ## Docker Usage -I like to build and publish my MCP servers to Docker - which means that it's much easier to configure assistants such as Claude Desktop to run them. +I like to build and publish my MCP servers to Docker - which means that it's much easier to configure assistants such as Claude Desktop to run them.  ```bash # Build the image docker build -t haskell-mcp-server .  # Run different examples-docker run -i --entrypoint="/usr/local/bin/haskell-mcp-server" haskell-mcp-server+docker run -i --entrypoint="/usr/local/bin/simple-example" haskell-mcp-server ```  And then configure Claude by editing `claude_desktop_config.json`:@@ -230,12 +230,12 @@ ```json {     "mcpServers": {-       "haskell-mcp-server-example": {+       "simple-example": {             "command": "docker",             "args": [                 "run",                 "-i",-                "--entrypoint=/usr/local/bin/haskell-mcp-server",+                "--entrypoint=/usr/local/bin/simple-example",                 "haskell-mcp-server"             ]         }
mcp-server.cabal view
@@ -15,7 +15,7 @@ -- PVP summary:     +-+------- breaking API changes --                  | | +----- non-breaking API additions --                  | | | +--- code changes with no API change-version: 0.1.0.17+version: 0.1.0.18 -- A short (one-line) description of the package. synopsis: Library for building Model Context Protocol (MCP) servers -- A longer description of the package.@@ -46,6 +46,8 @@   CHANGELOG.md   README.md +tested-with: ghc ==9.6.7 || ==9.8.4 || ==9.10.3 || ==9.12.2+ -- Extra source files to be distributed with the package, such as examples, or a tutorial module. -- extra-source-files: SPEC.md -- Source repository information@@ -79,7 +81,7 @@   -- Other library packages from which modules are imported.   build-depends:     aeson >=2 && <3,-    base >=4.20 && <4.23,+    base >=4.18 && <4.23,     bytestring >=0.10 && <0.13,     containers >=0.6 && <0.9,     http-types >=0.12 && <1,@@ -92,7 +94,7 @@   -- Directories containing source files.   hs-source-dirs: src   -- Base language which the package is written in.-  default-language: GHC2024+  default-language: GHC2021  executable simple-example   -- Import common warning flags.@@ -112,7 +114,7 @@   -- Directories containing source files.   hs-source-dirs: examples/Simple   -- Base language which the package is written in.-  default-language: GHC2024+  default-language: GHC2021  executable complete-example   -- Import common warning flags.@@ -132,7 +134,7 @@   -- Directories containing source files.   hs-source-dirs: examples/Complete   -- Base language which the package is written in.-  default-language: GHC2024+  default-language: GHC2021  executable http-simple-example   -- Import common warning flags.@@ -152,13 +154,13 @@   -- Directories containing source files.   hs-source-dirs: examples/HttpSimple   -- Base language which the package is written in.-  default-language: GHC2024+  default-language: GHC2021  test-suite haskell-mcp-server-test   -- Import common warning flags.   import: warnings   -- Base language which the package is written in.-  default-language: GHC2024+  default-language: GHC2021   -- Modules included in this executable, other than Main.   other-modules:     Spec.AdvancedDerivation