AI
Mishka Chelekom is AI-native. It ships a built-in MCP server that exposes every component, its documentation, and the mix tasks directly to AI agents, plus comprehensive LLM usage rules for every component and JavaScript hook. This page shows how to wire both into the assistant you already code with.
Usage Rules for LLM Agents
Mishka Chelekom ships verified usage rules for every component and every
JavaScript hook - the exact attributes, slots, allowed values, and gotchas
an agent needs. The library supports the
usage_rules
package, which syncs those rules straight into your agent file
(
CLAUDE.md
,
AGENTS.md
, and friends).
Setup
Add the package to your project and sync the rules:
# mix.exs {:usage_rules, "~> 0.2"} # then sync Mishka Chelekom's rules into your agent file mix usage_rules.sync
Then tell
usage_rules
which agent file to write and to include the Mishka Chelekom package:
# config/config.exs config :usage_rules, output_file: "CLAUDE.md", packages: [:mishka_chelekom]
Once synced, your agent reads the rules automatically. If it still needs
something the rules don't cover, they instruct it to fetch the live docs
from https://mishka.tools/chelekom/docs/{component-name}
(use hyphens, and the /forms/
prefix for form components) instead of guessing.
The MCP Server
The MCP (Model Context Protocol) server exposes the whole library - every component, its documentation, and all the mix tasks - directly to AI tools like Claude Code, Cursor, and Claude Desktop. Instead of guessing an attribute or hallucinating an API, the agent asks Mishka and gets the real answer, through 11 tools and 9 resources.
Setup inside your Phoenix app
One command wires it up. The default HTTP transport patches your Phoenix
router with a dev-only
forward "/mcp"
route, while
--stdio
writes a
.mcp.json
and changes nothing in Phoenix:
# HTTP transport (default) — patches your Phoenix router mix mishka.mcp.setup # Stdio transport — writes .mcp.json, no router changes mix mishka.mcp.setup --stdio
With the default HTTP setup, the endpoint runs on your Phoenix port
(default
4000
) - not a separate
one. Start
mix phx.server
and connect your tool:
# after `mix phx.server`, the endpoint runs on your Phoenix port claude mcp add --transport http mishka-chelekom http://localhost:4000/mcp
For Cursor
or VSCode, add a
.mcp.json
at your project root instead:
{ "mcpServers": { "mishka-chelekom": { "type": "http", "url": "http://localhost:4000/mcp" } } }
Running the server without Phoenix
You can also run the server on its own - a standalone HTTP listener on port
4003
, or over stdio, which an MCP
client spawns for you from a shared
.mcp.json
:
# standalone HTTP server on port 4003 mix mishka.mcp.server # stdio (the MCP client spawns it; used in .mcp.json) mix mishka.mcp.server --transport stdio