MCPheonix logo

MCPheonix

by jmanhype

MCPheonix is a simplified implementation of the Model Context Protocol (MCP) server using Elixir's Phoenix Framework. It provides a server that allows AI models to interact with your application data and functionality through a unified interface.

View on GitHub

Last updated: N/A

What is MCPheonix?

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

How to use MCPheonix?

To use MCPheonix, you need to clone the repository, install the dependencies, configure the Cloudflare, Flux, and Dart integrations (if needed), and then start the server using mix phx.server. You can then interact with the server using SSE stream at /mcp/stream and JSON-RPC endpoint at /mcp/rpc.

Key features of MCPheonix

  • 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 integration

  • Dart task management integration

  • Extensible MCP server architecture

  • Self-healing distributed architecture via Cloudflare Durable Objects

  • Edge computing capabilities through Cloudflare Workers

Use cases of MCPheonix

  • Integrating AI models with application data

  • Building real-time AI event systems

  • Creating self-healing and distributed AI applications

  • Enabling edge computing capabilities for AI models

FAQ from MCPheonix

What are the prerequisites for using MCPheonix?

Elixir 1.14 or higher, Erlang 25 or higher, Phoenix 1.7.0 or higher, Python 3.9+ (for Flux and Dart integration), Node.js 18+ (for Dart MCP server), and a Cloudflare account (for Durable Objects integration).

How do I configure the Cloudflare integration?

Create a Cloudflare Worker using the template in cloudflare/durable-objects-worker.js, deploy it to your Cloudflare account, and set the environment variables: CLOUDFLARE_WORKER_URL, CLOUDFLARE_ACCOUNT_ID, and CLOUDFLARE_API_TOKEN.

How do I add custom MCP servers?

Define your server settings in priv/config/mcp_servers.json with the command, arguments, environment variables, and tools for your server. The servers are automatically loaded and managed during application startup.

What are the MCP endpoints?

The server provides an SSE stream at GET /mcp/stream for real-time notifications and a JSON-RPC endpoint at POST /mcp/rpc for client requests.

What is the self-healing architecture?

MCPheonix implements a self-healing system through its integration with Cloudflare Durable Objects and Workers, creating a distributed, resilient architecture that can withstand failures and ensure continuous operation. Critical application state is replicated across Cloudflare's global network.