A simplified implementation of the Model Context Protocol (MCP) server using Elixir's Phoenix Framework.
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.
MCPheonix implements a sophisticated 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.
For detailed information on the implementation, see the Cloudflare Integration documentation.
git clone https://github.com/yourusername/mcpheonix.git
cd mcpheonix
mix deps.get
Configure the Cloudflare integration
cloudflare/durable-objects-worker.js
CLOUDFLARE_WORKER_URL
: URL of your deployed workerCLOUDFLARE_ACCOUNT_ID
: Your Cloudflare account IDCLOUDFLARE_API_TOKEN
: API token with Workers and DO permissionsConfigure the Flux integration (if using image generation)
Configure the Dart integration (if using task management)
Start the server
mix phx.server
The server will be available at http://localhost:4001.
MCPheonix is designed to work with multiple MCP servers. This system includes a flexible infrastructure for integrating custom MCP servers through:
priv/config/mcp_servers.json
:{
"mcpServers": {
"your_server_id": {
"command": "/path/to/executable",
"args": ["arg1", "arg2"],
"env": {
"ENV_VAR1": "value1",
"ENV_VAR2": "value2"
},
"tools": {
"your_tool": {
"description": "Description of your tool",
"parameters": [
{ "name": "param1", "type": "string", "description": "Parameter description" }
]
}
}
}
}
}
For comprehensive implementation details, including the Elixir architecture, server lifecycle management, and protocol handling, see the Adding MCP Servers documentation.
SSE Stream: GET /mcp/stream
JSON-RPC: POST /mcp/rpc
x-mcp-client-id
header or will be generated if missingSeamless access to top MCP servers powering the future of AI integration.