Labsco
MCP SERVER

Tidewave Phoenix

by tidewave-ai

Give a coding agent an IEx session into your running Phoenix app — evaluate code against live state, query the dev database, read the logs, and look up docs pinned to your own lockfile.

Runtime Debugging & Crash Analysis
Summary
Runtime truth instead of a guess about the runtime.

An agent that can evaluate code against live state, query the dev database and read the log after a request stops speculating about what the app does — it checks, and the next step is grounded in what came back.

What it is

A plug you add to a Phoenix endpoint in development. It turns the running application into an MCP server, so the agent asks the process that is actually serving requests rather than reasoning from the source tree.

What you get
  • `project_eval` — evaluate Elixir inside the running application, with access to your runtime, dependencies and in-memory data. It is an IEx session for the agent, so it can run code rather than assume what a function returns
  • `execute_sql_query` — run SQL against your development database, which is how the agent verifies the result of something it just did
  • `get_logs` — read what the server wrote, including the request log and backtrace after something misbehaved
  • `get_docs` — documentation for a module or function, consulted at the exact versions locked in your `mix.lock` rather than whatever the model remembers
  • `get_source_location` — the file and line where a module or function is defined, across your app and its hex dependencies
Requirements

Add `{:tidewave, "~> 0.6", only: :dev}` to `mix.exs` and `plug Tidewave` to your endpoint above the code-reloading block, guarded by `Mix.env() == :dev`; `mix igniter.install tidewave` does it for you. Then register an HTTP (streamable) MCP server in your editor pointing at `/tidewave/mcp` on your app's port, for example `http://localhost:4000/tidewave/mcp`. Requests are accepted from localhost only unless `:allow_remote_access` is set, and `:allowed_origins` guards against cross-origin and DNS rebinding. It works best with Phoenix LiveView v1.1 or later with `debug_heex_annotations` and `debug_attributes` enabled — defaults for Phoenix v1.8+ apps. In umbrella projects, apply the steps in the application that defines the endpoint.

Setup effort

One command — mix igniter.install tidewave