- Explore MCP Servers
- hs-mcp
Hs Mcp
What is Hs Mcp
hs-mcp is a Haskell implementation of the Model Context Protocol (MCP), which allows Haskell applications to expose tools, resources, and prompts to MCP-compatible clients.
Use cases
Use cases for hs-mcp include building AI assistants that interact with users through prompts and tools, creating data processing services that expose resources to clients, and developing interactive applications that require real-time communication.
How to use
To use hs-mcp, clone the repository, set up the environment with direnv and nix, and build the project using cabal. You can create a simple server by defining server information, capabilities, resources, and tools, and registering handlers for resource reading and tool calls.
Key features
Key features of hs-mcp include a full implementation of the MCP protocol, StdIO transport for local process communication, JSON-RPC messaging, support for resources, tools, and prompts, and a comprehensive test suite.
Where to use
hs-mcp can be used in various domains where Haskell applications need to communicate with MCP-compatible clients, such as AI tools, data processing applications, and interactive systems.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Hs Mcp
hs-mcp is a Haskell implementation of the Model Context Protocol (MCP), which allows Haskell applications to expose tools, resources, and prompts to MCP-compatible clients.
Use cases
Use cases for hs-mcp include building AI assistants that interact with users through prompts and tools, creating data processing services that expose resources to clients, and developing interactive applications that require real-time communication.
How to use
To use hs-mcp, clone the repository, set up the environment with direnv and nix, and build the project using cabal. You can create a simple server by defining server information, capabilities, resources, and tools, and registering handlers for resource reading and tool calls.
Key features
Key features of hs-mcp include a full implementation of the MCP protocol, StdIO transport for local process communication, JSON-RPC messaging, support for resources, tools, and prompts, and a comprehensive test suite.
Where to use
hs-mcp can be used in various domains where Haskell applications need to communicate with MCP-compatible clients, such as AI tools, data processing applications, and interactive systems.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
MCP-Haskell (hs-mcp)
A Haskell implementation of the Model Context Protocol (MCP).
Overview
MCP-Haskell (hs-mcp) provides a Haskell implementation of the Model Context Protocol, allowing Haskell applications to expose tools, resources, and prompts to MCP-compatible clients like Claude.
Key features:
- Full implementation of MCP protocol
- StdIO transport for local process communication
- JSON-RPC messaging
- Support for resources, tools, and prompts
- Comprehensive test suite
Installation
# Clone the repository
git clone github.com:buecking/hs-mcp.git
cd hs-mcp
# direnv
# echo 'use flake' > .envrc
direnv allow
# nix
nix develop
# Build the project
cabal build
Usage
Creating a simple server
Example Server
The project includes an example echo server that demonstrates the MCP functionality:
# Build and run the example server
cabal run mcp-echo-server
You can test it with the MCP Inspector or Claude Desktop.
Testing
Run the test suite:
cabal test
Protocol Compatibility
This implementation follows the Model Context Protocol specification and is compatible with:
- Claude Desktop
- MCP Inspector
- Other MCP clients following the specification
Project Structure
src/Network/MCP/Types.hs- Core MCP typessrc/Network/MCP/Transport/- Transport implementationssrc/Network/MCP/Server/- Server implementationExamples/- Example implementationsTest/- Test suite
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the BSD-3-Clause License - see the LICENSE file for details.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










