# Repository Briefing: tidewave-ai/tidewave_phoenix
> Source: https://repoforai.com/repo/tidewave-ai/tidewave_phoenix (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/tidewave-ai/tidewave_phoenix
- **Official Docs / Website**: https://tidewave.ai/
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Elixir
- **License**: Apache-2.0
- **Engineering Health**: A (81/100 · Maintenance 35/35 · Adoption 15/25 · Releases 11/20 · License 20/20)
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: MCP, Self-Hosted
- **Momentum**: 868 ★ total (+0 24h / +2 7d) · 75 forks
- **When to Use**: Best for: Phoenix teams that want a coding agent to reproduce bugs in a local development app and verify behavior against logs, database state, and version-matched docs. Skip if: You only need source navigation, require read-only agent access, or need to inspect production or sensitive shared environments.

## Overview
```text
### Architecture & Core Mechanics
Tidewave Phoenix is an Elixir MCP server embedded in the application it inspects. The `Tidewave` plug is mounted in the Phoenix endpoint and serves `/tidewave/mcp` over streamable HTTP. A call follows the app’s own endpoint into a tool with access to the live development runtime. That makes it materially different from an MCP server that can only index a checkout: evaluation sees loaded dependencies and in-memory state.

The development-only `tidewave` Mix dependency supplies the integration. For worktrees running on separate ports, `mix tidewave.proxy` provides a STDIO entry point and adds a `port` parameter to every tool definition so a call can reach the intended Phoenix instance. The proxy adapts transport and routing; the selected application still supplies the runtime context.

### Key Capabilities & Differentiators
The strongest workflow is reproducing a failure and checking its effects without switching tools. An agent can evaluate an Elixir expression against live state, read the server logs and backtrace, then query the development database to see what persisted. Treat evaluation like an IEx session and SQL like a database login with the app’s effective permissions: neither is presented as a read-only interface.

Source lookup returns file and line locations for modules or functions in both application code and dependencies. Documentation lookup uses the exact package versions in `mix.lock`, which helps when a dependency’s current public docs describe a different API. LiveView 1.1 or later is recommended for the best integration, with `debug_heex_annotations` and `debug_attributes` enabled.

### Trade-offs & Limitations
Compared with editor-based navigation or a source-only MCP server, Tidewave lets an agent verify behavior instead of inferring it from files. Compared with a database-only connector, it can link stored state to the Elixir call and logs that produced it. Manual IEx and database tooling give engineers a more direct approval boundary. That matters because in-process evaluation and arbitrary SQL give the client more authority than source inspection requires.

Use a disposable development database and avoid loading production credentials or sensitive data into the connected app. The default localhost restriction narrows network exposure but does not make the tools read-only. If a Content Security Policy is present, Tidewave adds `unsafe-eval` to `script-src` and disables `frame-ancestors` in environments where it is loaded. Keep it out of production and other environments that depend on those controls.

### Hardware & Deployment Guide
Install `{:tidewave, "~> 0.9", only: :dev}` and add `plug Tidewave` before the `if code_reloading?` block in the Phoenix endpoint, guarded by `Mix.env() == :dev`. Alternatively, run `mix igniter.install tidewave` for an existing app. In an umbrella, configure the child application that owns the endpoint. Start Phoenix and point the MCP client to that app’s port, for example `http://localhost:4000/tidewave/mcp`.

Keep localhost access as the default. If `:allow_remote_access` is necessary, put an authentication proxy in front of the app and configure `:allowed_origins` for the required hosts. For embedded development across subdomains, use `*.localhost` in a secure context and set the development session cookie to `same_site: "None"` and `secure: true`. LiveView debug settings are enabled by default in Phoenix 1.8+ apps. `~> 0.9` is the installation constraint, not a verified latest release; no latest GitHub release is listed.
```

## Key Capabilities
```text
- Runtime integration: The `Tidewave` plug exposes MCP from the Phoenix endpoint at `/tidewave/mcp` over streamable HTTP.
- Live evaluation: The agent can evaluate Elixir against the running app’s dependencies and in-memory state.
- Debugging: Server logs and development SQL let the agent correlate a reproduced request with runtime output and persisted state.
- Dependency navigation: File-and-line locations cover app code and dependencies; docs match the versions in `mix.lock`.
- Worktree routing: `mix tidewave.proxy` supports STDIO clients and adds a target `port` to each tool definition.
- Access defaults: Requests are limited to localhost by default; configurable Origin and Host checks address cross-origin requests and DNS rebinding.
```

## Quick Start / Clone
```bash
# install igniter_new if you haven't already
mix archive.install hex igniter_new

# install tidewave
mix igniter.install tidewave
```
