freshcrate
Home > MCP Servers > anubis-mcp

anubis-mcp

Elixir Model Context Protocol (MCP) SDK (hermes-mcp fork)

Description

Elixir Model Context Protocol (MCP) SDK (hermes-mcp fork)

README

Anubis MCP

hex.pm docs ci Hex Downloads

A high-performance Model Context Protocol (MCP) implementation in Elixir.

Overview

Anubis 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
  [
    {:anubis_mcp, "~> 1.1.0"}  # x-release-please-version
  ]
end

Quick Start

Server

# Define a tool as a Component (compile-time registration)
defmodule MyApp.Echo do
  @moduledoc "Echoes everything the user says to the LLM"

  use Anubis.Server.Component, type: :tool

  alias Anubis.Server.Response

  schema do
    field :text, :string, required: true, max_length: 150, description: "the text to be echoed"
  end

  @impl true
  def execute(%{text: text}, frame) do
    {:reply, Response.text(Response.tool(), text), frame}
  end
end

defmodule MyApp.MCPServer do
  use Anubis.Server,
    name: "My Server",
    version: "1.0.0",
    capabilities: [:tools]

  # Static component registration — dispatches to MyApp.Echo.execute/2
  component MyApp.Echo

  @impl true
  def init(_client_info, frame) do
    # You can also register tools dynamically at runtime via the Frame:
    # frame = register_tool(frame, "dynamic_tool", description: "...", input_schema: %{...})
    {:ok, frame}
  end
end

# Add to your application supervisor
children = [
  {MyApp.MCPServer, transport: :streamable_http}
]

# Add to your Phoenix router (if using HTTP)
forward "/mcp", Anubis.Server.Transport.StreamableHTTP.Plug, server: MyApp.MCPServer

# Or if using only Plug router
forward "/mcp", to: Anubis.Server.Transport.StreamableHTTP.Plug, init_opts: [server: MyApp.MCPServer]

Now you can achieve your MCP server on http://localhost:<port>/mcp

Client

# Add to your application supervisor
children = [
  {Anubis.Client,
   name: MyApp.MCPClient,
   transport: {:streamable_http, base_url: "http://localhost:4000"},
   client_info: %{"name" => "MyApp", "version" => "1.0.0"},
   protocol_version: "2025-06-18"}
]

# Use the client
{:ok, result} = Anubis.Client.call_tool(MyApp.MCPClient, "echo", %{text: "this will be echoed!"})

Why Anubis?

Named after Anubis, the Egyptian god of the underworld and guide to the afterlife, this library helps navigate the boundaries between Large Language Models and external tools. Much like how Anubis guided souls through transitions, this SDK guides data through the liminal space between AI and external systems.

The name also carries personal significance - after my journey through the corporate underworld ended unexpectedly, this project was reborn from the ashes of its predecessor, ready to guide developers through their own MCP adventures. Sometimes you need a deity of transitions to help you... transition. 🏳️‍⚧️

Sponsors

Thanks to our amazing sponsors for supporting this project!

Coderabbit Sponsor Logo

Documentation

For detailed guides and examples, visit the official documentation.

Examples

We have build some elixir implementation examples using plug based and phoenix apps:

  1. upcase-server: plug based MCP server using streamable_http
  2. echo-elixir: phoenix based MCP server using sse
  3. ascii-server: phoenix_live_view based MCP server using streamable_http and UI

License

LGPL-v3 License. See LICENSE for details.

Release History

VersionChangesUrgencyDate
v1.1.0## [1.1.0](https://github.com/zoedsoupe/anubis-mcp/compare/v1.0.0...v1.1.0) (2026-04-13) ### Features * Add Client.await_ready/2 to block until MCP handshake completes ([#117](https://github.com/zoedsoupe/anubis-mcp/issues/117)) ([4c48647](https://github.com/zoedsoupe/anubis-mcp/commit/4c48647192c3304e012049669729008d7177940e)) * add instructions field to initialize response ([#122](https://github.com/zoedsoupe/anubis-mcp/issues/122)) ([8103b7c](https://github.com/zoedsoupe/anubis-mcp/commit/Medium4/13/2026
v1.0.0## [1.0.0](https://github.com/zoedsoupe/anubis-mcp/compare/v0.17.1...v1.0.0) (2026-03-16) ### ⚠ BREAKING CHANGES * remove client base module and client macro ([#110](https://github.com/zoedsoupe/anubis-mcp/issues/110)) * **phase-3:** server re-implementation and simplification ([#96](https://github.com/zoedsoupe/anubis-mcp/issues/96)) ### Features * add _meta support to Tool struct and JSON encoder ([#108](https://github.com/zoedsoupe/anubis-mcp/issues/108)) ([6ac49d1](https://github.com/zoLow3/16/2026
v0.17.1## [0.17.1](https://github.com/zoedsoupe/anubis-mcp/compare/v0.17.0...v0.17.1) (2026-02-28) ### Bug Fixes * Check Process.alive? before sending to SSE handler ([#82](https://github.com/zoedsoupe/anubis-mcp/issues/82)) ([e1dc705](https://github.com/zoedsoupe/anubis-mcp/commit/e1dc705f1ae8ee7e8670d26c7fdfc30583d19efd)) ### Code Refactoring * **phase-1:** abstract protocol version negotiation ([#93](https://github.com/zoedsoupe/anubis-mcp/issues/93)) ([05a2362](https://github.com/zoedsoupe/anLow2/28/2026
v0.17.0## [0.17.0](https://github.com/zoedsoupe/anubis-mcp/compare/v0.16.0...v0.17.0) (2025-12-09) ### Features * **redis:** add redix_opts for SSL/TLS support ([#59](https://github.com/zoedsoupe/anubis-mcp/issues/59)) ([33658ab](https://github.com/zoedsoupe/anubis-mcp/commit/33658abab69e1f0c361a4dbf4e9665bb900d2f7e)) ### Bug Fixes * added server component description/0 callback ([#58](https://github.com/zoedsoupe/anubis-mcp/issues/58)) ([a094473](https://github.com/zoedsoupe/anubis-mcp/commit/a0Low12/9/2025
v0.16.0## [0.16.0](https://github.com/zoedsoupe/anubis-mcp/compare/v0.15.0...v0.16.0) (2025-11-18) ### Features * redis based session store (continue from [#48](https://github.com/zoedsoupe/anubis-mcp/issues/48)) ([#55](https://github.com/zoedsoupe/anubis-mcp/issues/55)) ([fddea32](https://github.com/zoedsoupe/anubis-mcp/commit/fddea327ef8d91c57c4dc65f527aadc3e8d105a2)) ### Bug Fixes * correct arguments in Logging.should_log? ([#47](https://github.com/zoedsoupe/anubis-mcp/issues/47)) ([6f550e6](hLow11/18/2025
v0.15.0## [0.15.0](https://github.com/zoedsoupe/anubis-mcp/compare/v0.14.1...v0.15.0) (2025-11-03) ### Features * add timeout for client/server -&gt; transport calling option ([#50](https://github.com/zoedsoupe/anubis-mcp/issues/50)) ([1e37c23](https://github.com/zoedsoupe/anubis-mcp/commit/1e37c23d3af3f40c54e0ba8b1bcc5043d80547d1)) * allow template resources registration ([#43](https://github.com/zoedsoupe/anubis-mcp/issues/43)) ([9af9b8d](https://github.com/zoedsoupe/anubis-mcp/commit/9af9b8dcf436Low11/3/2025
v0.14.1## [0.14.1](https://github.com/zoedsoupe/anubis-mcp/compare/v0.14.0...v0.14.1) (2025-10-07) ### Bug Fixes * correct capability parsing to nest options under capability keys ([#31](https://github.com/zoedsoupe/anubis-mcp/issues/31)) ([9946027](https://github.com/zoedsoupe/anubis-mcp/commit/9946027072aee81297ee3c6c10e75acbb1328ae3)) * correctly handle timeouts and keepalive ([#41](https://github.com/zoedsoupe/anubis-mcp/issues/41)) ([2f44840](https://github.com/zoedsoupe/anubis-mcp/commit/2f448Low10/8/2025
v0.14.0## [0.14.0](https://github.com/zoedsoupe/anubis-mcp/compare/v0.13.1...v0.14.0) (2025-08-21) ### Features * `resources/templates/list` method for clients ([a6eb210](https://github.com/zoedsoupe/anubis-mcp/commit/a6eb210af4b6913d8a8480e5247002c2b15f511c)) ### Bug Fixes * align docs and parsing of server component schema-field definition options ([#12](https://github.com/zoedsoupe/anubis-mcp/issues/12)) ([cb2df76](https://github.com/zoedsoupe/anubis-mcp/commit/cb2df761e05beacf2beb3d5e94bf5632Low8/21/2025
v0.13.1## [0.13.1](https://github.com/zoedsoupe/anubis-mcp/compare/v0.13.0...v0.13.1) (2025-07-31) ### Bug Fixes * not crash server on empty tool/prompt args ([#4](https://github.com/zoedsoupe/anubis-mcp/issues/4)) ([ee8043f](https://github.com/zoedsoupe/anubis-mcp/commit/ee8043f331481790931d2d711b6df8f9cd7a4940)) ### Miscellaneous Chores * old release are from the original fork ([e99d8ba](https://github.com/zoedsoupe/anubis-mcp/commit/e99d8baa7e8c00f3105ce16f8ac2178698859278)) * plug router confLow7/31/2025

Dependencies & License Audit

Loading dependencies...

Similar Packages

controlkeelControl plane for governed AI coding: validate agent changes, enforce policy, track findings, and ship with proof.v0.2.41
kibiRepo-local, per-git-branch, queryable knowledge base for LLM Agents.kibi-opencode@0.8.0
JobForgeAI-powered job search automation — evaluate offers, generate ATS-optimized CVs, scan portals, negotiate, and track applications. One config drives OpenCode, Cursor, Claude Code, and Codex. Free end-tov2.14.4
SageFsSage Mode for F# development — REPL with solution or project loading, Live Testing for FREE, Hot Reload, and session management.v0.6.243
trace-mcpMCP server for Claude Code and Codex. One tool call replaces ~42 minutes of agent explorationv1.28.0