mcp: A Servant-based Model Context Protocol (MCP) server for Haskell
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.
[Skip to Readme]
Modules
[Index] [Quick Jump]
Downloads
- mcp-0.3.1.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1.0.0, 0.1.1.0, 0.2.0.0, 0.2.0.1, 0.3.0.1, 0.3.1.0 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | 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) [details] |
| Tested with | ghc ==9.12.2 |
| License | MPL-2.0 |
| Copyright | (c) 2025 DPella AB |
| Author | DPella AB |
| Maintainer | matti@dpella.io, lobo@dpella.io |
| Uploaded | by tritlo at 2026-02-19T12:47:35Z |
| Category | Web, AI |
| Home page | https://github.com/DPella/mcp |
| Bug tracker | https://github.com/DPella/mcp/issues |
| Source repo | head: git clone https://github.com/DPella/mcp.git |
| Distributions | |
| Downloads | 70 total (9 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] |