Skip to content

Full-featured Elixir client for the Model Context Protocol (MCP) with multi-transport support, resources, prompts, tools, and telemetry.

License

Notifications You must be signed in to change notification settings

nshkrdotcom/mcp_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCP Client Logo

MCP Client for Elixir

Elixir OTP Hex.pm Documentation License

Canonical Model Context Protocol client for the Elixir ecosystem with first-class transports, tooling, and documentation.

✨ Highlights

  • 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

📦 Installation

Add mcp_client to your mix.exs dependencies:

def deps do
  [
    {:mcp_client, "~> 0.1.0"}
  ]
end

Then fetch dependencies:

mix deps.get

🚀 Quick Start

  1. Configure your MCP server credentials in config/runtime.exs
  2. Start a connection with McpClient.start_link/1
  3. Declare tools with McpClient.Tools.declare/1 and register handlers
  4. Stream responses with built-in supervision, telemetry, and retries

Full guides and API docs will be published on HexDocs as the project matures.

🧪 Development

mix test
mix credo --strict
MIX_ENV=test mix coveralls.html

Dialyzer PLTs live in priv/plts (ignored in the Hex package) so shared CI nodes stay fast.

🤝 Contributing

Issues and PRs are welcome! Please open a discussion first for sizeable protocol or API changes so we can align on design.

Releases

No releases published

Packages

No packages published

Languages