Tidewave Phoenix

Tidewave Phoenix

Better agentic Elixir Phoenix development, runtime-level tools for your agent to talk to your running app.

Category
访问服务器

README

Tidewave

Tidewave is the coding agent for full-stack web app development, deeply integrated with Phoenix, from the database to the UI. See our website for more information.

This project can also be used as a standalone Model Context Protocol server.

Installation

Manually

Add the tidewave package to your mix.exs:

def deps do
  [
    {:tidewave, "~> 0.5", only: :dev},
    {:phoenix, ...},
  ]
end

Then, for Phoenix applications, go to your lib/my_app_web/endpoint.ex and right above the if code_reloading? do block, add:

+  if Mix.env() == :dev do
+    plug Tidewave
+  end

   if code_reloading? do

Now make sure Tidewave is installed and you are ready to connect Tidewave to your app.

Tidewave Web works best with Phoenix LiveView v1.1 or later. Once you update it, make sure to enable the following options in your config/dev.exs:

config :phoenix_live_view,
  debug_heex_annotations: true,
  debug_attributes: true

Those are enabled by default for Phoenix v1.8+ apps.

Using Igniter

Alternatively, you can use igniter to automatically install it into an existing Phoenix application:

# install igniter_new if you haven't already
mix archive.install hex igniter_new

# install tidewave
mix igniter.install tidewave

Now make sure Tidewave is installed and you are ready to connect Tidewave to your app.

Umbrella projects

For umbrella projects, you can follow the manual steps above in the application that defines your Phoenix endpoint (typically apps/your_app_web).

Usage in non-Phoenix applications

Tidewave can be used as a MCP in any Elixir project. For example, you can use bandit (and tidewave) in dev mode in your mix.exs:

{:tidewave, "~> 0.4", only: :dev},
{:bandit, "~> 1.0", only: :dev},

And then adding an alias in your mix.exs:

aliases: [
  tidewave:
    "run --no-halt -e 'Agent.start(fn -> Bandit.start_link(plug: Tidewave, port: 4000) end)'"
]

Now run mix tidewave and configure Tidewave as a MCP.

Troubleshooting

Using multiple hosts/subdomains

If you are using multiple hosts/subdomains during development, you must use *.localhost, as such domains are considered secure by browsers. Additionally, add the following immediately @session_options definition in your lib/your_app_web/endpoint.ex:

@session_options [
  # ... your configuration
]

if code_reloading? do
  @session_options Keyword.merge(@session_options, same_site: "None", secure: true)
end

The above will allow your application to run embedded within Tidewave across multiple subdomains, as long as it is using a secure context (such as admin.localhost, www.foobar.localhost, etc).

Content security policy

If you have enabled Content-Security-Policy, Tidewave will automatically enable "unsafe-eval" under script-src in order for contextual browser testing to work correctly. It also disables the frame-ancestors directive.

Configuration

You may configure the Tidewave plug using the following syntax:

  plug Tidewave, options

The following options are available:

  • :allow_remote_access - Tidewave only allows requests from localhost by default, even if your server listens on other interfaces, for security purposes. Read our security guidelines for more information and when to allow remote access (if you know what you are doing)

  • :inspect_opts - Custom options passed to Kernel.inspect/2 when formatting some tool results. Defaults to: [charlists: :as_lists, limit: 50, pretty: true]

  • :team - set your Tidewave Team configuration, such as team: [id: "my-company"]

Available tools

  • execute_sql_query - executes a SQL query within your application database, useful for the agent to verify the result of an action

  • get_docs - get the documentation for a given module/function. It consults the exact versions used by the project, ensuring you always get correct information

  • get_logs - reads logs written by the server

  • get_models - lists all modules in the application and their location for quick discovery

  • get_source_location - get the source location for a given module/function, so an agent can directly read the source skipping search

  • project_eval - evaluates code within the your application itself, giving the agent access to your runtime, dependencies, and in-memory data

get_ecto_schemas and get_ash_resources is also available if you are using Ecto and Ash respectively.

License

Copyright (c) 2025 Dashbit

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选