mix mishka.mcp.setup (Mishka Chelekom v0.0.9-beta.1)

Copy Markdown View Source

Sets up the Mishka Chelekom MCP Server in your Phoenix application.

This task adds the necessary configuration to your Phoenix router to serve the MCP (Model Context Protocol) endpoint, allowing AI tools like Claude Code, Cursor, and Claude Desktop to interact with your Mishka Chelekom components.

Usage

# HTTP transport (default) — patches your Phoenix router
mix mishka.mcp.setup

# Stdio transport — writes .mcp.json so the client spawns the server itself
mix mishka.mcp.setup --stdio

Options

  • --path or -p - Custom MCP endpoint path (default: "/mcp", http only)
  • --dev-only - Only enable MCP in development (default: true, http only)
  • --yes - Skip confirmation prompts
  • --stdio or -s - Write .mcp.json with stdio entry instead of patching router

What This Task Does

Default (HTTP)

  1. Adds the MCP route to your Phoenix router
  2. Configures the route to use Anubis.Server.Transport.StreamableHTTP.Plug
  3. Wraps it in a dev_routes condition (unless --dev-only=false)

With --stdio

  1. Creates (or merges into) .mcp.json in the project root
  2. Adds a mishka-chelekom server entry that spawns mix mishka.mcp.server --transport stdio
  3. Sets MIX_QUIET=1 in the entry's env so Mix compile output never corrupts the protocol stream

No Phoenix changes are made in --stdio mode — stdio doesn't need a route.

After Setup

Start your Phoenix server and connect your AI tools:

Claude Code

claude mcp add --transport http mishka-chelekom http://localhost:4000/mcp

Cursor / VSCode

Create .mcp.json in your project root:

{
  "mcpServers": {
    "mishka-chelekom": {
      "type": "http",
      "url": "http://localhost:4000/mcp"
    }
  }
}

Summary

Functions

igniter(igniter)

Callback implementation for Igniter.Mix.Task.igniter/1.