Noizu.MCP (Noizu MCP v0.1.0)

Copy Markdown View Source

Model Context Protocol (MCP) for Elixir — server and client.

Noizu.MCP implements the Model Context Protocol so Elixir applications can expose MCP servers (over stdio or Streamable HTTP) and consume MCP servers as a client.

Defining a server

defmodule MyApp.MCP do
  use Noizu.MCP.Server,
    name: "myapp",
    version: "1.0.0",
    instructions: "Tools for MyApp."

  tool MyApp.MCP.GetWeather
end

defmodule MyApp.MCP.GetWeather do
  use Noizu.MCP.Server.Tool,
    description: "Get current weather for a location",
    annotations: [read_only_hint: true]

  input do
    field :location, :string, required: true, description: "City name or zip code"
    field :units, :enum, values: [:celsius, :fahrenheit], default: :celsius
  end

  @impl true
  def call(%{location: location, units: units}, _ctx) do
    {:ok, "Weather in #{location}: 21 degrees #{units}"}
  end
end

Run it over stdio (e.g. for Claude Code / Claude Desktop):

children = [{MyApp.MCP, transport: :stdio}]

See Noizu.MCP.Server for the full server API and Noizu.MCP.Server.Tool for the tool definition DSL.

Summary

Functions

The newest protocol revision supported by this library.

Protocol revisions supported by this library, newest first.

Functions

latest_version()

The newest protocol revision supported by this library.

supported_versions()

Protocol revisions supported by this library, newest first.