bifurcated mcp client-server implementation with unified api
Anubis MCP provides both client and server implementations within a single Elixir library, allowing developers to build MCP-enabled applications that can simultaneously act as clients connecting to external MCP servers and as servers exposing capabilities to AI assistants. The architecture centers on Anubis.Server and Anubis.Client modules with shared transport abstraction, enabling code reuse and consistent patterns across bidirectional communication. This dual-mode design leverages Elixir's concurrency primitives (Process.send_after/3 for timeouts, GenServer patterns) to manage request state and session lifecycle.
Unique: Unified client-server SDK in a single library with shared transport abstraction, leveraging Elixir's lightweight processes and fault tolerance for concurrent request handling — unlike Python/Node.js MCP SDKs that typically separate client and server concerns
vs alternatives: Provides native Elixir concurrency advantages (thousands of concurrent MCP connections per process) and integrated fault tolerance that Python/Node.js SDKs must layer on top of their runtimes
transport-agnostic protocol abstraction with behavior-based polymorphism
Anubis MCP abstracts transport mechanisms through Elixir behavior modules, allowing the same client and server code to operate over STDIO, StreamableHTTP, WebSocket, and SSE transports without code changes. Each transport implementation (e.g., Anubis.Server.Transport.StreamableHTTP.Plug for Phoenix/Plug integration) handles serialization, connection lifecycle, and message framing independently. The behavior-based design enables runtime transport selection and seamless integration with existing Elixir web frameworks via Plug middleware.
Unique: Behavior-based transport abstraction allowing zero-code-change transport switching, with native Phoenix/Plug integration via Anubis.Server.Transport.StreamableHTTP.Plug — most MCP SDKs hardcode transport choice at initialization
vs alternatives: Eliminates transport lock-in and enables seamless web framework integration that Python/Node.js MCP libraries require custom adapters to achieve
comprehensive documentation and example servers
Anubis MCP includes extensive documentation covering core concepts, architecture patterns, and step-by-step tutorials for building clients and servers. Example servers demonstrate common patterns and best practices, enabling developers to quickly understand MCP concepts and implement their own servers. The documentation is organized by use case (client building, server building, transport selection) and includes API reference material.
Unique: Comprehensive documentation with architecture-focused explanations and example servers covering multiple transport mechanisms, providing context beyond API reference — most MCP SDKs provide minimal documentation or API-only reference
vs alternatives: Architecture-focused documentation and example servers reduce learning curve compared to Python/Node.js SDKs with minimal documentation or community examples
elixir-native concurrency model for high-throughput mcp operations
Anubis MCP leverages Elixir's lightweight process model and OTP supervision trees to enable thousands of concurrent MCP operations with minimal resource overhead. Each MCP client connection, server session, or request can be managed by independent Elixir processes, enabling natural parallelism without explicit threading or async/await syntax. The OTP application framework provides fault tolerance, automatic process restart, and distributed deployment capabilities.
Unique: Native Elixir process model enabling thousands of concurrent MCP operations per VM with automatic fault recovery via OTP supervision trees — Python/Node.js SDKs require external infrastructure (thread pools, event loops, Kubernetes) for equivalent scalability
vs alternatives: Lightweight process overhead and built-in fault tolerance provide superior scalability and reliability compared to Python/Node.js SDKs that require external orchestration for high-concurrency scenarios
component-based capability definition with frame state management
Anubis MCP provides a component system (Tools, Resources, Prompts) that developers register with Anubis.Server.Frame, which maintains session state including registered components and pagination settings. Components are defined as Elixir modules implementing specific behaviors, enabling type-safe, composable capability definitions. The Frame state management handles component lifecycle, discovery, and pagination for large capability sets, abstracting the complexity of MCP's capability advertisement protocol.
Unique: Frame-based state management with integrated pagination and component lifecycle handling, using Elixir's module system for type-safe capability composition — most MCP SDKs require manual protocol message construction or lack built-in pagination support
vs alternatives: Provides compile-time type safety and runtime state management that Python/Node.js MCP SDKs achieve through runtime validation or manual boilerplate
schema dsl for type-safe tool and resource definitions
Anubis MCP includes a Schema DSL that enables developers to define tool parameters and resource schemas using Elixir syntax, generating MCP-compliant JSON Schema automatically. This DSL abstracts JSON Schema complexity, providing a higher-level interface for specifying input/output types, validation rules, and documentation. The schema definitions are compiled into MCP protocol messages, ensuring type consistency between Elixir code and AI assistant expectations.
Unique: Macro-based Schema DSL that compiles to JSON Schema at compile-time, eliminating runtime schema parsing overhead and enabling type-checking — Python/Node.js MCP SDKs typically use runtime schema builders or manual JSON Schema
vs alternatives: Compile-time schema validation and zero-runtime schema parsing overhead compared to Python/Node.js SDKs that validate schemas at request time
request-response lifecycle management with timeout handling
Anubis MCP's client implementation (Anubis.Client.State) manages pending requests using Anubis.Client.Request structs and handles timeout timers via Elixir's Process.send_after/3, enabling automatic request cleanup and timeout detection without external timer libraries. The state machine tracks request lifecycle from initiation through response receipt or timeout, supporting concurrent requests with independent timeout policies. This design leverages Elixir's lightweight process model to handle thousands of concurrent requests with minimal overhead.
Unique: Process.send_after/3-based timeout handling with automatic cleanup via Elixir's process model, enabling thousands of concurrent requests without external timer infrastructure — Python/Node.js SDKs typically use thread pools or event loop timers
vs alternatives: Native Elixir concurrency primitives provide lower-overhead request tracking than Python/Node.js SDKs that must manage thread/event loop overhead for timeout handling
plug middleware integration for http-based mcp servers
Anubis MCP integrates with Phoenix and Plug applications through Anubis.Server.Transport.StreamableHTTP.Plug, enabling MCP servers to be deployed as HTTP endpoints within existing web applications. The Plug middleware handles HTTP request/response serialization, streaming response bodies for long-running operations, and connection lifecycle management. This integration allows developers to expose MCP capabilities alongside traditional REST APIs in a single Phoenix application.
Unique: Native Plug middleware integration with streaming response support, allowing MCP servers to coexist with Phoenix routes without separate processes — most MCP SDKs require standalone HTTP servers or custom middleware
vs alternatives: Eliminates separate server process overhead and enables unified request handling with Phoenix routing compared to Python/Node.js SDKs that typically require separate Flask/Express servers
+4 more capabilities