Hermes MCP
A high-performance Model Context Protocol (MCP) implementation in Elixir.
Overview
Hermes MCP is a comprehensive Elixir SDK for the Model Context Protocol, providing complete client and server implementations with Elixir's exceptional concurrency model and fault tolerance.
Installation
def deps do
[
{:hermes_mcp, "~> 0.14.1"} # x-release-please-version
]
end
Quick Start
Server
# Define a server with tools capabilities
defmodule MyApp.MCPServer do
use Hermes.Server,
name: "My Server",
version: "1.0.0",
capabilities: [:tools]
@impl true
# this callback will be called when the
# MCP initialize lifecycle completes
def init(_client_info, frame) do
{:ok,frame
|> assign(counter: 0)
|> register_tool("echo",
input_schema: %{
text: {:required, :string, max: 150, description: "the text to be echoed"}
},
annotations: %{read_only: true},
description: "echoes everything the user says to the LLM") }
end
@impl true
def handle_tool("echo", %{text: text}, frame) do
Logger.info("This tool was called #{frame.assigns.counter + 1}")
{:reply, text, assign(frame, counter: frame.assigns.counter + 1)}
end
end
# Add to your application supervisor
children = [
Hermes.Server.Registry,
{MyApp.MCPServer, transport: :streamable_http}
]
# Add to your Plug/Phoenix router (if using HTTP)
forward "/mcp", to: Hermes.Server.Transport.StreamableHTTP.Plug, init_opts: [server: MyApp.MCPServer]
Now you can achieve your MCP server on http://localhost:<port>/mcp
Client
# Define a client module
defmodule MyApp.MCPClient do
use Hermes.Client,
name: "MyApp",
version: "1.0.0",
protocol_version: "2025-03-26"
end
# Add to your application supervisor
children = [
{MyApp.MCPClient,
transport: {:streamable_http, base_url: "http://localhost:4000"}}
]
# Use the client
{:ok, result} = MyApp.MCPClient.call_tool("echo", %{text: "this will be echoed!"})
Why Hermes?
Named after Hermes, the Greek god of boundaries and communication, this library facilitates seamless interaction between Large Language Models and external tools - serving as a messenger between AI and data sources.
Documentation
For detailed guides and examples, visit the official documentation.
Examples
We have build some elixir implementation examples using plug based and phoenix apps:
- upcase-server:
plugbased MCP server using streamable_http - echo-elixir:
phoenixbased MCP server using sse - ascii-server:
phoenix_live_viewbased MCP server using streamable_http and UI
License
MIT License. See LICENSE for details.
Recommend MCP Servers 💡
blender-mcp
BlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
lancedb-mcp-server
A basic serverless MCP server using LanceDB for data storage and retrieval, providing ingest docs, retrieve docs, and get table details tools.

apify/rag-web-browser
A web browser for AI agents and RAG pipelines that queries Google Search, scrapes web pages, and returns content as Markdown for LLM processing, supporting Model Context Protocol (MCP) via SSE.
@growi/mcp-server
A Model Context Protocol (MCP) server that connects AI models to GROWI wiki content. Enables LLMs to search and retrieve information from your organization's knowledge base for accurate, context-aware responses.
kafka-mcp-server
An MCP server for Apache Kafka, enabling LLM models to perform common Kafka operations like producing/consuming messages, managing topics, and monitoring consumer groups through a standardized protocol.
@professional-wiki/mediawiki-mcp-server
An MCP server that enables Large Language Model (LLM) clients to interact with any MediaWiki wiki.