ExMCP.Transport.Beam (ex_mcp v0.1.0)
View SourceBEAM message passing transport for MCP.
This transport uses native Erlang message passing for communication between MCP clients and servers running on the same BEAM VM or distributed across Erlang nodes.
Benefits:
- Zero serialization overhead for local connections
- Built-in supervision and fault tolerance
- Native distributed support (connect to remote BEAM nodes)
- Better performance for Elixir-based MCP tools
- Maintains supervision tree integrity
Supports both:
- Local connections (same VM): Uses direct process references
- Distributed connections (remote nodes): Uses {name, node} tuples
Summary
Functions
Discovers BEAM transport servers across the cluster.
Discovers BEAM transport servers on the current node.
Registers a server on the current node for discovery.
Starts a BEAM transport server that can accept connections.
Types
Functions
@spec discover_cluster_servers() :: [map()]
Discovers BEAM transport servers across the cluster.
@spec discover_local_servers() :: [map()]
Discovers BEAM transport servers on the current node.
Registers a server on the current node for discovery.
This allows the server to be found by clients using ExMCP.Discovery functions.
Starts a BEAM transport server that can accept connections.
This creates a named process that MCP clients can connect to using the BEAM transport.