Canonical Model Context Protocol client for the Elixir ecosystem with first-class transports, tooling, and documentation.
- Unified transports: WebSocket, SSE, and raw TCP adapters with shared backoff + tombstone semantics
- Declarative tools: Type-safe wrappers for tool declaration, invocation, and validation
- Observability-first: Telemetry events for every hop plus structured, redactable logging helpers
- Production ergonomics: Configurable retry windows, circuit breakers, and connection watchdogs
- Docs as product: ExDoc assets, architecture guides, and SVG branding ship with the library
Add mcp_client to your mix.exs dependencies:
def deps do
[
{:mcp_client, "~> 0.1.0"}
]
endThen fetch dependencies:
mix deps.get- Configure your MCP server credentials in
config/runtime.exs - Start a connection with
McpClient.start_link/1 - Declare tools with
McpClient.Tools.declare/1and register handlers - Stream responses with built-in supervision, telemetry, and retries
Full guides and API docs will be published on HexDocs as the project matures.
mix test
mix credo --strict
MIX_ENV=test mix coveralls.htmlDialyzer PLTs live in priv/plts (ignored in the Hex package) so shared CI nodes stay fast.
Issues and PRs are welcome! Please open a discussion first for sizeable protocol or API changes so we can align on design.