MCP-Haskell

MCP-Haskell is an MCP server and framework implementation that brings the Model Context Protocol to the Haskell ecosystem, supporting both standard input/output (StdIO) and HTTP transport mechanisms. It connects LLM frontends such as Claude Desktop and HTTP API consumers to Haskell applications, providing a strongly typed, type-safe architecture for exposing custom capabilities. Developers who write in Haskell use this framework to expose external context, tools, and prompts to Large Language Models while preserving strict compile-time safety and automatic JSON serialization through Aeson. The framework is organized into two primary packages: mcp-types, which supplies protocol structures and JSON-RPC primitives with minimal dependencies, and mcp, which provides a Servant-based HTTP server featuring JWT authentication and Server-Sent Events alongside StdIO transport. By using MCP-Haskell, developers can implement custom tool handlers, subscribe to resource streams, expose prompt templates, and manage client-server lifecycle communications under the latest protocol specifications.

Category: AI & LLM Tooling

Tags: framework, haskell, http, sdk, stdio

Visit MCP-Haskell

How to install and configure MCP-Haskell

  1. Clone the repository at https://github.com/Tritlo/mcp to your local development environment. 2. Ensure you have GHC 9.12 and Cabal installed on your system. 3. Add mcp or mcp-types to your project's Cabal build-depends configuration depending on whether you are building a server or client. 4. Build the project using cabal build all. 5. Run the provided example server using cabal run mcp-example to start an HTTP server on http://localhost:8080/mcp and retrieve your JWT token from stdout. 6. For connecting clients such as Claude Desktop via StdIO or HTTP, configure your client using the template provided in example/mcp-config.json as documented in the repository.

What you can do with MCP-Haskell

  • Exposing native Haskell functions as callable tools for Large Language Models using the built-in ToolHandler framework. - Serving dynamic text resources, templates, and subscription updates to AI clients through streaming SSE and HTTP. - Implementing secure remote MCP servers using Servant with built-in JWT bearer token authentication. - Developing standalone lightweight MCP client libraries using the dependency-light mcp-types package for pure protocol manipulation. - Providing automated code prompts and context completion directly to developer assistants using standard JSON-RPC 2.0 communication.

Key facts

  • Open Source
  • https://github.com/Tritlo/mcp
  • AI & LLM Tooling
  • framework, haskell, http, sdk, stdio

Part of MCP Servers

Related MCP servers

  • MCP Memory Dashboard β€” MCP Memory Dashboard is an MCP server desktop interface that connects to the MCP Memory Service to provide visual semantic…
  • MCP Manager β€” MCP Manager is an MCP server management tool that connects directly to your Claude Desktop environment, enabling users to discover,…
  • MCP Lab β€” MCP Lab is an MCP server development environment designed for building, testing, and debugging custom Model Context Protocol servers integrated…
  • MCP LLM Integration Server β€” MCP LLM Integration Server is an MCP server that connects local Large Language Model runtimes with Model Context Protocol clients…
  • MCP Neurolora β€” MCP Neurolora is an MCP server that provides code analysis, code collection, and automated documentation generation using the OpenAI API.…
  • MCP OpenVision β€” MCP OpenVision is an MCP server that provides image analysis capabilities powered by OpenRouter vision models. It connects client interfaces…

What is MCP-Haskell?

MCP-Haskell is a complete, type-safe implementation of the Model Context Protocol for Haskell. It enables developers to build custom MCP servers and clients using either StdIO or HTTP transports, integrating Haskell logic, tools, and resources with AI assistants.

How do I install MCP-Haskell?

You can add mcp or mcp-types to the build-depends section of your project's Cabal configuration file. For server development, include dependencies like servant, servant-server, servant-auth-server, aeson, and mcp, targeting GHC 9.12.

What transport protocols are supported by MCP-Haskell?

MCP-Haskell supports both standard input/output (StdIO) communication for local integrations and HTTP transport with streaming Server-Sent Events (SSE) and JWT authentication powered by Servant.

Is MCP-Haskell open source?

Yes, MCP-Haskell is open source and licensed under the Mozilla Public License 2.0 (MPL-2.0). Source code and documentation are available in the public repository.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories