Corex MCP
View SourceIntroduction
You expose Corex component metadata to AI tools (Cursor, Claude Desktop, VS Code) from your running app. The MCP server is self-hosted—no external SaaS.
Built on Tidewave Phoenix (Apache-2.0).
Do not enable MCP in production. The tools are read-only, but the endpoint still widens your attack surface. Use it only while developing locally (or in :test when generated apps include it for CI).
Before you start
| Requirement | Notes |
|---|---|
{:corex, "~> 0.1.0"} | In mix.exs |
| Running HTTP server | Phoenix endpoint or Tableau Bandit child |
Phoenix endpoint
Add plug Corex.MCP in lib/my_app_web/endpoint.ex after Plug.Static and before the code reloader block:
if Mix.env() == :dev do
plug Corex.MCP
endStart the app. MCP is available at http://localhost:4000/corex/mcp (adjust host and port).
Cursor — .cursor/mcp.json:
{
"mcpServers": {
"corex": {
"url": "http://localhost:4000/corex/mcp"
}
}
}Claude Desktop — claude_desktop_config.json:
{
"mcpServers": {
"corex": {
"transport": {
"type": "http",
"url": "http://localhost:4000/corex/mcp"
}
}
}
}Tableau Bandit
Tableau has no Phoenix endpoint. Run MCP on a separate Bandit port—see Tableau (MCP section).
Point your client at http://localhost:4004 when using the default MCP port there.
Tools
All tools are read-only.
| Tool | Purpose |
|---|---|
list_components | All component ids (accordion, date_picker, …) |
get_component | Module, slots, docs, source_path for one id |
installation_guide | Install steps for new or existing projects (scenario: new_project, existing_project, all) |
Call list_components before get_component when you need a valid id.
Related
- Installation —
mix corex.newenables MCP in dev by default - Tableau — Bandit MCP for static sites