langchain-hs-mcp: Model Context Protocol (MCP) client for langchain-hs

[ ai, library, mit ] [ Propose Tags ] [ Report a vulnerability ]

First-class MCP JSON-RPC 2.0 client supporting stdio and HTTP transports. Enables Haskell agents to discover and call tools published by any MCP server (e.g. Hackage docs, SQLite, filesystem, GitHub). Depends only on langchain-hs-core; no provider-specific dependencies.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.6.0
Change log CHANGELOG.md
Dependencies aeson (>=2.0 && <3), base (>=4.17 && <5), bytestring (>=0.10 && <0.13), http-conduit (>=2 && <3), langchain-hs-core (>=0.0.6 && <0.0.7), mtl (>=2.2 && <2.4), process (>=1.6 && <1.7), text (>=1.2 && <3) [details]
Tested with ghc ==9.12.4, ghc ==9.10.3, ghc ==9.8.4
License MIT
Copyright 2025-2026 Tushar Adhatrao
Author Tushar Adhatrao
Maintainer tusharadhatrao@gmail.com
Uploaded by tusharad at 2026-10-14T21:34:05Z
Category AI
Home page https://github.com/tusharad/langchain-hs#readme
Bug tracker https://github.com/tusharad/langchain-hs/issues
Source repo head: git clone https://github.com/tusharad/langchain-hs
Distributions
Downloads 3 total (3 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for langchain-hs-mcp-0.0.6.0

[back to package description]

langchain-hs-mcp

Model Context Protocol (MCP) client for langchain-hs.

Connect Haskell agents to any MCP server over stdio or HTTP JSON-RPC 2.0. Depends only on langchain-hs-core — no provider dependencies.

Installation

# package.yaml / .cabal
dependencies:
  - langchain-hs-mcp

Usage

import Langchain.MCP.Client
import Control.Monad.Except (runExceptT)

main :: IO ()
main = do
  let client = newStdioMcpClient "hackage" "docker" ["run", "-i", "--rm", "mcp/hackage-doc"]
  res <- runExceptT $ listMcpTools client
  case res of
    Left err    -> print err
    Right tools -> mapM_ (print . mcpToolName) tools