Model Context Protocol (MCP) server framework for Elixir/BEAM
A complete, production-ready implementation of the Model Context Protocol that enables Elixir applications to integrate with Claude Code and other MCP clients.
-
✅ Complete JSON-RPC 2.0 protocol implementation
-
✅ stdio transport (MCP standard)
-
✅ Tool registration and execution
-
✅ Resource serving (planned)
-
✅ Prompt templates (planned)
-
✅ Server capabilities negotiation
-
✅ Type-safe tool definitions via behaviors
-
✅ OTP supervision for reliability
Add elixir_mcp_server to your mix.exs dependencies:
def deps do
[
{:elixir_mcp_server, "~> 0.1.0"}
]
enddefmodule MyApp.Tools.Echo do
use ElixirMcpServer.Tool
@impl true
def name, do: "echo"
@impl true
def description, do: "Echoes back the input message"
@impl true
def input_schema do
%{
type: "object",
properties: %{
message: %{type: "string", description: "Message to echo"}
},
required: ["message"]
}
end
@impl true
def execute(%{"message" => msg}, _context) do
{:ok, [%{type: "text", text: "Echo: #{msg}"}]}
end
endElixirMcpServer.start_link(
name: "my-app",
version: "1.0.0",
tools: [MyApp.Tools.Echo]
)This framework is useful for:
-
feedback-o-tron - Automated feedback submission with network verification
-
Observatory - GitHub intelligence and issue management
-
NeuroPhone - Elixir/Phoenix applications
-
Any Elixir service that wants Claude Code integration
┌─────────────────────────────────────┐
│ MCP Client (Claude Code, etc.) │
└─────────────────┬───────────────────┘
│ JSON-RPC 2.0 / stdio
┌─────────────────▼───────────────────┐
│ ElixirMcpServer.Server │
│ (GenServer, protocol handling) │
└─────────────────┬───────────────────┘
│
┌─────────────┼─────────────┐
│ │ │
┌───▼───┐ ┌───▼────┐ ┌───▼──────┐
│ Tools │ │Resources│ │ Prompts │
│(your) │ │ (your) │ │ (your) │
└───────┘ └─────────┘ └──────────┘PMPL-1.0-or-later - see LICENSE file for details