Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inspired an article in today's Elixir Radar email.
What was set up
Three files were changed:
mix.exs — added
{:tidewave, "~> 0.5", only: :dev}. The:only :devensures it never runs in production (it would expose raw code evaluation and DB access).endpoint.ex — added the Tidewave plug before the code-reloading block:
The
Code.ensure_loaded?guard means in test/prod (where the dep doesn't exist) this is a no-op.dev.exs — added:
This enriches LiveView components with source location metadata that Tidewave surfaces to agents.
When you run
mix phx.server, Tidewave starts an MCP server athttp://localhost:4000/mcp. That's the endpoint you point AI agents at.Integrating with AI tools
GitHub Copilot (VS Code)
Add to
.vscode/mcp.jsonin this workspace (create it if it doesn't exist):{ "servers": { "revstack": { "type": "sse", "url": "http://localhost:4000/mcp" } } }Then in VS Code settings enable MCP. Copilot will automatically list Tidewave's tools (
project_eval,execute_sql_query,get_logs,get_docs, etc.) when you open Copilot Chat.Claude Desktop
Open Settings → Developer → Edit Config (
claude_desktop_config.json) and add:{ "mcpServers": { "revstack": { "command": "npx", "args": ["-y", "mcp-remote", "http://localhost:4000/mcp"] } } }Restart Claude Desktop — the Tidewave tools will appear in the tool panel.
ChatGPT (Custom GPT / Operator API)
ChatGPT does not support SSE-based MCP directly yet. Use a bridge like mcp-proxy to expose it as an OpenAPI spec, then add it as a Custom GPT action.
Codex (OpenAI Codex CLI)
Codex CLI supports MCP natively. Add to
~/.codex/config.toml:Then use
codex --approval-mode full-autoso it can drive the full observe→hypothesize→act loop.Load test + observe workflow
Start your server (
mix phx.server), run wrk or k6 in one terminal, then prompt the agent:The agent will autonomously execute expressions like:
via the
project_evaltool — no copy-pasting required. It can then follow up withexecute_sql_queryto checkpg_stat_statementsfor slow queries andget_logsto correlate log output, all in one conversation loop.