MCPhoenix logo

MCPhoenix

Community
jmanhype

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

Publisherjmanhype
RepositoryMCPhoenix
LanguageElixir
Forks
5
Stars
67
Available tools
0
Transport typestreamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    MCPhoenix exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    67 stars and 5 forks from the linked repository.

MCPhoenix

MCP server built on Phoenix Framework (Elixir). Exposes Server-Sent Events and JSON-RPC endpoints for MCP clients, with support for managing multiple child MCP servers through JSON configuration.

Note: the module and directory names use the spelling "MCPheonix" (without the 'o') throughout the codebase.

What It Does

Runs a Phoenix web server on port 4001 that:

  1. Accepts MCP JSON-RPC requests at POST /mcp/rpc
  2. Streams events to clients via SSE at GET /mcp/stream
  3. Manages child MCP servers (Flux image generation, Dart task management, etc.) as supervised processes
  4. Routes tool calls to the appropriate child server over stdio

Child servers are defined in priv/config/mcp_servers.json and started automatically at boot.

Status

AreaState
TransportHTTP (SSE + JSON-RPC)
FrameworkPhoenix 1.7, Elixir >= 1.14, Erlang >= 25
Child MCP serversFlux (image generation), Dart (task management)
OTP supervisionYes — child servers are supervised processes
Cloudflare integrationDurable Objects client (experimental, uses custom hex package)
Event systemBroadway + GenStage for processing pipelines
TestsExUnit, 2 test files (Cloudflare DO client, mock websocket)
LicenseMIT

Architecture

lib/
  mcpheonix/
    application.ex         — OTP application, supervision tree
    mcp/
      server.ex            — Core MCP server logic
      server_manager.ex    — Manages child MCP server processes
      server_process.ex    — GenServer wrapping a child stdio process
      supervisor.ex        — Supervisor for MCP server processes
      config.ex            — Reads mcp_servers.json
      connection.ex        — Client connection state
      json_rpc_protocol.ex — JSON-RPC 2.0 parsing
      jsonrpc_client.ex    — Client for calling child servers
      flux_server.ex       — Flux-specific server config
      features/
        resources.ex       — Resource listing
        tools.ex           — Tool listing and dispatch
    events/
      broker.ex            — Pub/sub event broker
    cloud/
      durable_objects/
        client.ex          — Cloudflare Durable Objects HTTP client
    resources/
      message.ex, registry.ex, user.ex — Domain resources (Ash framework)
  mcpheonix_web/
    endpoint.ex            — Phoenix endpoint
    router.ex              — Routes: /mcp/stream (SSE), /mcp/rpc (JSON-RPC)
    controllers/
      mcp_controller.ex    — SSE stream and RPC handler
      page_controller.ex   — Default page
    plugs/
      mcp_rpc_plug.ex      — Parses JSON-RPC body
      raw_body_*.ex        — Raw body reading for RPC

Adding MCP Servers

Edit priv/config/mcp_servers.json:

json
{
  "mcpServers": {
    "your_server": {
      "command": "/path/to/executable",
      "args": ["arg1"],
      "env": { "API_KEY": "value" },
      "tools": {
        "tool_name": {
          "description": "What it does",
          "parameters": [
            { "name": "param1", "type": "string", "description": "..." }
          ]
        }
      }
    }
  }
}

Servers are started as child processes under OTP supervision and restarted on failure.

Setup

bash
git clone https://github.com/jmanhype/MCPhoenix.git
cd MCPhoenix       # note: the repo name uses correct spelling
mix deps.get
mix phx.server     # starts on port 4001

Requirements

DependencyVersion
Elixir>= 1.14
Erlang/OTP>= 25
Phoenix~> 1.7.0
Node.js>= 18 (for child MCP servers)
Python>= 3.9 (for Flux/Dart integration)

Optional Integrations

IntegrationWhat's Needed
Flux image generationPython 3.9+, Flux CLI, BFL_API_KEY
Dart task managementNode.js 18+, DART_TOKEN
Cloudflare Durable ObjectsWorker deployment, CLOUDFLARE_WORKER_URL, CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN

MCP Endpoints

EndpointMethodPurpose
/mcp/streamGETSSE stream; returns x-mcp-client-id header
/mcp/rpcPOSTJSON-RPC 2.0; pass x-mcp-client-id header

Key Dependencies

PackageVersionPurpose
phoenix~> 1.7.0Web framework
phoenix_live_view~> 0.19.0LiveView (included but not primary interface)
ash~> 2.9Resource framework
broadway~> 1.0Event processing
gen_stage~> 1.2Event streams
finch~> 0.16HTTP client
mint_web_socket~> 1.0WebSocket support
jason~> 1.4JSON encoding

Limitations

  • The Cloudflare Durable Objects integration depends on a custom GitHub hex package (cloudflare_durable_ex) that may not be publicly available
  • No authentication on the MCP endpoints
  • SSE connections are not persisted across server restarts
  • The Ash framework resources (User, Message, Registry) appear scaffolded but not fully integrated
  • LiveView and LiveDashboard are included but not used for the MCP interface
  • Log files (dev.log, phoenix_server.log) and temporary files are committed to the repo

License

MIT

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "jmanhype-mcphoenix": {
      "command": "",
      "args": []
    }
  }
}

Use MCPhoenix MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCPhoenix is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP connects through a hosted MCP server URL in TypingMind.

Add an MCP server URL

Use this when MCPhoenix is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter your server URL in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste your server URL into the Server URL field.
  2. Enter a connection name for MCPhoenix.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the MCPhoenix connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the MCPhoenix tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the MCPhoenix tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCPhoenix to help me with this task?
MCPhoenix
Sure. I read it.
Here is what I found using MCPhoenix.

Frequently asked questions

What is the MCPhoenix MCP server used for?

MCPhoenix is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCPhoenix MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCPhoenix with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCPhoenix MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCPhoenix connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCPhoenix MCP to TypingMind?

MCPhoenix can be connected in TypingMind by adding its hosted MCP server URL. This is useful when you want a remote MCP connection that is available from your TypingMind workspace.

What tools does MCPhoenix MCP provide in TypingMind?

MCPhoenix exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCPhoenix MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCPhoenix requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇