packages feed

mcp-0.3.1.0: mcp.cabal

cabal-version: 2.2
name: mcp
version: 0.3.1.0
license: MPL-2.0
license-file: LICENSE
copyright: (c) 2025 DPella AB
author: DPella AB
tested-with: ghc ==9.12.2
extra-doc-files:
  CHANGELOG.md
  README.md

maintainer:
  matti@dpella.io,
  lobo@dpella.io

synopsis: A Servant-based Model Context Protocol (MCP) server for Haskell
description:
  This library provides a complete server implementation of the Model Context
  Protocol (MCP) for Haskell, built on Servant. It re-exports the core
  protocol types from @mcp-types@ for convenience.
  .
  MCP is a protocol that enables seamless communication between AI models and
  external tools, resources, and services. This implementation supports MCP
  protocol version 2025-06-18 with full compatibility for resources, tools,
  prompts, completions, elicitation, and all standard MCP message types.
  .
  Three transports are provided: HTTP with JWT authentication via
  @servant-auth-server@, a simple unauthenticated HTTP transport for local
  development or use behind a reverse proxy, and a stdio transport for
  subprocess-based integrations.  All HTTP transports use streaming SSE
  responses at the @/mcp@ endpoint. An extensible handler framework
  (@ProcessHandlers@, @ToolHandler@) allows implementing custom MCP servers
  with minimal boilerplate.

homepage: https://github.com/DPella/mcp
bug-reports: https://github.com/DPella/mcp/issues
category: Web, AI

source-repository head
  type: git
  location: https://github.com/DPella/mcp.git

library
  default-language:
    Haskell2010

  default-extensions:
    DataKinds
    FlexibleInstances
    GADTs
    GeneralizedNewtypeDeriving
    ImportQualifiedPost
    LambdaCase
    OverloadedStrings
    PolyKinds
    RankNTypes
    TypeApplications
    TypeFamilies

  hs-source-dirs:
    src

  exposed-modules:
    MCP.Server
    MCP.Server.Common
    MCP.Server.HTTP
    MCP.Server.HTTP.Internal
    MCP.Server.Stdio

  build-depends:
    aeson >=2.1 && <2.3,
    base >=4.18 && <4.22,
    bytestring >=0.11 && <0.13,
    containers >=0.6 && <0.8,
    http-media >=0.8 && <0.9,
    mcp-types >=0.1.0 && <0.2,
    mtl >=2.2 && <2.4,
    servant >=0.19 && <0.21,
    servant-auth-server >=0.4 && <0.5,
    servant-server >=0.19 && <0.21,
    text >=2.0 && <2.2,
    time >=1.12 && <1.15,
    wai >=3.2 && <3.3,

test-suite test-mcp
  type: exitcode-stdio-1.0
  default-language:
    Haskell2010

  default-extensions:
    DataKinds
    FlexibleInstances
    GADTs
    GeneralizedNewtypeDeriving
    ImportQualifiedPost
    LambdaCase
    OverloadedStrings
    PolyKinds
    RankNTypes
    TypeApplications

  hs-source-dirs:
    test

  main-is:
    Main.hs

  other-modules:
    MCP.Integration
    MCP.SimpleHTTPIntegration
    MCP.StdioIntegration
    MCP.TestServer
    MCP.TestUtils

  build-depends:
    aeson >=2.1 && <2.3,
    attoparsec >=0.14 && <0.15,
    base >=4.18 && <4.22,
    bytestring >=0.11 && <0.13,
    containers >=0.6 && <0.8,
    hspec >=2.10 && <2.12,
    hspec-wai >=0.11 && <0.12,
    http-types >=0.12 && <0.13,
    jose >=0.10 && <0.12,
    mcp,
    mcp-types >=0.1.0 && <0.2,
    mtl >=2.2 && <2.4,
    process >=1.6 && <1.8,
    servant >=0.19 && <0.21,
    servant-auth-server >=0.4 && <0.5,
    servant-server >=0.19 && <0.21,
    text >=2.0 && <2.2,
    time >=1.12 && <1.15,
    wai >=3.2 && <3.3,
    wai-extra >=3.1 && <3.2,
    wai-test >=3.0 && <3.1,