{"slug":"tidewave-integration","title":"tidewave-integration","summary":"Tidewave MCP runtime tools — debugging, smoke testing, live state inspection, SQL queries, hex docs. Use when evaluating code in a running Phoenix app.","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-10-04T15:14:16.992899Z","repo":{"url":"https://github.com/oliver-kriska/claude-elixir-phoenix","stars":560,"forks":44,"license":"MIT","updatedAt":"2026-10-02T04:11:38Z"},"bodyHtml":"<hr>\n<h2>name: tidewave-integration\ndescription: \"Tidewave MCP runtime tools — debugging, smoke testing, live state inspection, SQL queries, hex docs. Use when evaluating code in a running Phoenix app.\"\neffort: low\nuser-invocable: false</h2>\n<h1>Tidewave MCP Integration</h1>\n<p>Runtime intelligence for Phoenix apps via MCP. Prefer Tidewave tools over Bash when available.</p>\n<h2>Iron Laws — Never Violate These</h2>\n<ol>\n<li><strong>DEV ONLY</strong> — Never use Tidewave tools in production contexts. Avoid on shared dev servers with production data copies</li>\n<li><strong>PREFER TIDEWAVE OVER BASH</strong> — <code>mcp__tidewave__get_docs</code> &gt; <code>web_fetch</code>, <code>execute_sql_query</code> &gt; <code>psql</code></li>\n<li><strong>CHECK AVAILABILITY FIRST</strong> — Call Tidewave only when matching <code>mcp__tidewave__*</code> tools are present</li>\n<li><strong>SQL IS READ-HEAVY</strong> — Use <code>execute_sql_query</code> for SELECT, be careful with mutations</li>\n<li><strong>EXACT VERSIONS</strong> — <code>get_docs</code> returns docs for YOUR mix.lock versions, not latest</li>\n</ol>\n<h2>Quick Reference</h2>\n<table>\n<thead>\n<tr>\n<th>Task</th>\n<th>Tidewave Tool</th>\n<th>Fallback</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Get docs</td>\n<td><code>mcp__tidewave__get_docs Module.func/3</code></td>\n<td><code>web_fetch hexdocs.pm/...</code></td>\n</tr>\n<tr>\n<td>Run code</td>\n<td><code>mcp__tidewave__project_eval</code></td>\n<td><code>mix run -e \"code\"</code></td>\n</tr>\n<tr>\n<td>SQL query</td>\n<td><code>mcp__tidewave__execute_sql_query</code></td>\n<td><code>psql $DATABASE_URL</code></td>\n</tr>\n<tr>\n<td>Find source</td>\n<td><code>mcp__tidewave__get_source_location</code></td>\n<td><code>grep -rn \"defmodule\"</code></td>\n</tr>\n<tr>\n<td>Inspect DOM</td>\n<td><code>mcp__Tidewave-Web__browser_eval</code></td>\n<td>Manual browser inspection</td>\n</tr>\n<tr>\n<td>List schemas</td>\n<td><code>mcp__tidewave__get_ecto_schemas</code></td>\n<td>Read <code>lib/*/schemas/</code></td>\n</tr>\n<tr>\n<td>Read logs</td>\n<td><code>mcp__tidewave__get_logs level: :error</code></td>\n<td><code>tail -f log/dev.log</code></td>\n</tr>\n</tbody>\n</table>\n<h2>Detection</h2>\n<pre><code># Check endpoint\ncurl -s http://localhost:4000/tidewave/mcp \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"ping\"}'\n</code></pre>\n<p>Or use <code>/mcp</code> in Claude Code to see connected servers.</p>\n<h2>Essential Patterns</h2>\n<h3>Test Function Immediately</h3>\n<pre><code># mcp__tidewave__project_eval\nMyApp.Accounts.create_user(%{email: \"test@example.com\"})\n</code></pre>\n<h3>Verify Migration</h3>\n<pre><code>-- mcp__tidewave__execute_sql_query\nSELECT column_name, data_type FROM information_schema.columns\nWHERE table_name = 'users';\n</code></pre>\n<h3>Debug LiveView (with PID from browser)</h3>\n<pre><code># mcp__tidewave__project_eval\npid = pid(\"0.1234.0\")\n:sys.get_state(pid) |&gt; Map.get(:socket) |&gt; Map.get(:assigns) |&gt; Map.keys()\n</code></pre>\n<h2>Setup Requirements</h2>\n<pre><code># mix.exs\n{:tidewave, \"~&gt; 0.6\", only: :dev}\n\n# endpoint.ex (in dev block)\nplug Tidewave\n\n# config/dev.exs (for LiveView source mapping)\nconfig :phoenix_live_view,\n  debug_heex_annotations: true,\n  debug_attributes: true\n</code></pre>\n<p>The dependency and endpoint plug expose Tidewave's streamable HTTP server; they\ndo not register it with an MCP client. Configure the current runtime separately\nwith <code>http://localhost:&lt;port&gt;/tidewave/mcp</code>, then verify that Tidewave tools are\navailable before relying on this skill.</p>\n<h2>Reliability Guards</h2>\n<p><strong>Worktree/port check (FIRST, in multi-worktree setups)</strong>: multiple\nworktrees = multiple dev servers on different ports. Before trusting any\nTidewave result, confirm the endpoint belongs to THIS checkout: grep\n<code>config/dev.exs</code> for the configured port, and verify with\n<code>project_eval File.cwd!()</code> — if it returns a different worktree path,\nyou're debugging the wrong server.</p>\n<p><strong>Schema introspection BEFORE SQL</strong>: never guess column names. Run\n<code>get_ecto_schemas</code> (or query <code>information_schema.columns</code>) before writing\nSQL against a table you haven't already introspected this session. A\nguessed-column error costs more than the introspection.</p>\n<p><strong>Output-size guard</strong>: runtime output is unbounded. Always cap it —\n<code>LIMIT 20</code> in SQL, <code>Enum.take(20)</code> in evals, <code>inspect(x, limit: 50, printable_limit: 500)</code> for large structs. Re-query narrower rather than\ndumping wide.</p>\n<p><strong>browser_eval fallback</strong>: if <code>mcp__Tidewave-Web__browser_eval</code> is absent\nor errors, don't stall — inspect the same state server-side: LiveView\nassigns via <code>:sys.get_state(pid)</code> in <code>project_eval</code>, rendered HTML via\n<code>Phoenix.LiveViewTest</code>, or read the template source directly.</p>\n<p><strong>QA walkthrough pattern</strong>: after a feature completes, run a short\nchecklist through <code>project_eval</code>/<code>browser_eval</code>: create the record, fetch\nit back, exercise the main event, check <code>get_logs level: :error</code> is clean.\nReport each step's pass/fail — not just \"smoke test passed\".</p>\n<h2>Proactive Runtime Checks</h2>\n<p><strong>Query runtime state at workflow checkpoints</strong> without waiting\nto be asked:</p>\n<ul>\n<li><strong>After code edits</strong>: <code>get_logs level: :error</code> (catch runtime crashes)</li>\n<li><strong>After features complete</strong>: <code>project_eval</code> smoke test (behavioral check)</li>\n<li><strong>Before planning</strong>: <code>get_ecto_schemas</code> + routes eval (concrete context)</li>\n<li><strong>When investigating</strong>: Auto-capture errors before asking user</li>\n<li><strong>LiveView UI bugs</strong>: <code>browser_eval</code> to inspect DOM state before editing components</li>\n</ul>\n<p>See <code>${CLAUDE_SKILL_DIR}/references/proactive-patterns.md</code> for full integration points.</p>\n<h2>References</h2>\n<p>For detailed patterns, see:</p>\n<ul>\n<li><code>${CLAUDE_SKILL_DIR}/references/proactive-patterns.md</code> - Push-like runtime patterns at workflow checkpoints</li>\n<li><code>${CLAUDE_SKILL_DIR}/references/tool-examples.md</code> - Complete tool usage examples</li>\n<li><code>${CLAUDE_SKILL_DIR}/references/validation-checklist.md</code> - Runtime validation patterns</li>\n</ul>\n","files":[{"path":"references/proactive-patterns.md","sizeBytes":3848,"isText":true},{"path":"references/tool-examples.md","sizeBytes":4015,"isText":true},{"path":"references/validation-checklist.md","sizeBytes":3493,"isText":true},{"path":"SKILL.md","sizeBytes":5179,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-10-04T15:15:30.527999Z","sha256":"CEE105F6AD712A6E21BC2AA297C155302140069660555C6E3BB0648C92DFD491","sizeBytes":8003},"review":null,"source":{"repositoryUrl":"https://github.com/oliver-kriska/claude-elixir-phoenix","path":"plugins/elixir-phoenix/skills/tidewave-integration","license":"MIT","commit":"9767a82d24ddddad553e85f88efc2869a7fd7d88","subtreeSha":"AC874A9F7B67D06C82CE35945CF9497201DB0BCC327B5F71AF97AFAEE4210C75","lastSyncedAt":"2026-10-04T15:14:09.139242Z"},"reviewedAt":"2026-10-04T15:17:18.337265Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/oliver-kriska/claude-elixir-phoenix/tree/main/plugins/elixir-phoenix/skills/tidewave-integration"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install oliver-kriska-claude-elixir-phoenix@llmmart"},{"target":"git","command":"git clone https://github.com/oliver-kriska/claude-elixir-phoenix.git"}]}