MCPhoenix

MCPheonix is an Elixir Phoenix-based server implementing the Model Context Protocol for AI model interaction, featuring real-time notifications, a resource system, and a self-healing distributed architecture using Cloudflare.

61
3

MCPheonix

A simplified implementation of the Model Context Protocol (MCP) server using Elixir's Phoenix Framework.

Overview

MCPheonix is an intelligent, self-healing, distributed AI event system leveraging the Model Context Protocol and Elixir's Phoenix Framework. It offers a server that implements the MCP, enabling AI models to interact with application data and functionality through a unified interface.

Features

  • Server-Sent Events (SSE) stream for real-time notifications.
  • JSON-RPC endpoint for client requests.
  • Simple resource system.
  • Event publish/subscribe mechanism.
  • Basic tool invocation.
  • Flux image generation and Dart task management integrations.
  • Extensible MCP server architecture.
  • Self-healing distributed architecture via Cloudflare Durable Objects and edge computing capabilities through Cloudflare Workers.

Self-Healing Distributed Architecture

MCPheonix utilizes Cloudflare Durable Objects and Workers for a resilient architecture. Durable Objects maintain state consistency across failures, while edge distribution ensures availability. Automatic recovery recreates instances with consistent state, and WebSocket support enables real-time coordination. The event-driven architecture allows self-healing and adaptation.

Getting Started

Requires Elixir 1.14+, Erlang 25+, Phoenix 1.7.0+, Python 3.9+, Node.js 18+, and a Cloudflare account. Installation involves cloning the repository, installing dependencies, configuring Cloudflare, Flux, and Dart integrations, and starting the server using mix phx.server. Custom MCP servers can be integrated using JSON configuration.

MCP Endpoints

  • SSE Stream: GET /mcp/stream for real-time notifications.
  • JSON-RPC: POST /mcp/rpc for JSON-RPC 2.0 requests.

Repository

JM
jmanhype

jmanhype/MCPhoenix

Created

March 9, 2025

Updated

March 23, 2025

Language

Elixir

Category

AI