Tidewave Rails

io.github.tidewave-ai由 GitHub 帳號 tidewave-ai 發布v0.8.0更新於 Oct 24, 2026

Runtime-level MCP server for Rails development: run code, read logs, query the DB, read docs.

發布方自己的服務:Job Bot by Agent Rails

已驗證STDIO僅桌面資料庫開發者工具

概覽

AI 產生的概覽

針對 Ruby on Rails 開發的執行階段 MCP 伺服器,讓助理在執行中的應用程式裡執行程式碼、讀取日誌、查詢開發資料庫,並查閱文件與原始碼位置。

可以做什麼
在執行中的 Rails 應用程式內執行 Ruby 程式碼,回傳結果與標準輸出,等同給助理的 Rails 主控台。讀取應用程式的即時日誌。對開發資料庫執行 SQL 查詢並回傳結果列。依 Gemfile.lock 鎖定的確切 gem 版本查詢類別、方法與常數的文件。找出類別、模組或方法定義所在的檔案與行號,包含 gem 相依套件中的定義與執行階段產生的方法。
適用情境
適合助理開發 Rails 應用程式時,讓變更立基於真實的執行階段行為:針對即時狀態重現錯誤、在建立動作後核對資料,或依鎖定版本確認某個 gem 方法的行為,而不是依賴可能過時的訓練資料。
執行需求
本機 Ruby on Rails 應用程式,並在 development 群組加入 tidewave gem,應用程式需以開發模式執行。MCP 用戶端透過可串流 HTTP 連線到應用程式的 /tidewave/mcp 路徑與連接埠,例如 localhost:3000。僅支援桌面版 MCP 用戶端。
安裝前請注意
助理可在應用程式中執行任意 Ruby 程式碼,並對開發資料庫執行任意 SQL,包括插入等寫入操作。預設只允許來自 localhost 的請求,allow_remote_access 只應在明確了解風險時開啟。Tidewave 不適用於正式環境,在停用程式碼重載的環境中會報錯。它也會在載入的環境中放寬內容安全政策(unsafe-eval、frame-ancestors)。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Tidewave Rails,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Tidewave Rails

Tidewave Rails is an MCP server that provides runtime-level tools for developing Ruby on Rails apps using coding agents.

Your agent will be able to use this MCP server to talk to your running Rails app in development to:

  • execute code in the context of the running app (like a Rails console for agents)
  • read the app's live logs
  • query your development database
  • get source locations of classes and methods
  • read documentation pinned to the exact gem versions your app depends on

This MCP server is an open-source component of Tidewave, the agentic development environment for Rails and Phoenix.

You can use this project as a standalone MCP server or integrated with the Tidewave product by following the instructions below.

Installation

1. Add the Tidewave gem to your app

You can add Tidewave Rails to your app by running:

shell
bundle add tidewave --group development

or by manually adding the tidewave gem to the development group in your Gemfile:

ruby
gem "tidewave", group: :development

2. Add the Tidewave MCP to your agent/editor

Add the Tidewave MCP server to your editor or MCP client configuration as the type "http" (streamable), pointing to the /tidewave/mcp path and port your web application is running at. For example, http://localhost:3000/tidewave/mcp.

We also have specific instructions for:

Usage

As with any other MCP server, your agent will call the tools exposed by the Tidewave MCP whenever it sees fit. But you can also prompt it to call them explicitly.

Available MCP tools

project_eval

Evaluates Ruby code in the context of your running application, with access to its runtime, loaded dependencies, and in-memory data, returning the result plus anything printed to standard output. It's like a Rails console for the agent.

[project_eval demo]

Your agent can use it when it would rather run code than assume behavior, grounding its next step in what the running app actually does. For example, calling a method to see what comes back or reproducing a failing code path against live app state to debug it.

execute_sql_query

Runs a SQL query against your app's development database and returns the rows to the agent.

[execute_sql_query demo]

Your agent can use it to run any SQL against your development database. For example, ask it to insert some test records to see how a page looks with realistic data. Or, after a create action, the agent can verify whether the record was saved with the expected values.

get_docs

Looks up the documentation for a class, method, or constant, reading from the exact gem versions locked in your app's Gemfile.lock.

[get_docs demo]

Your agent can use it when it's unsure how a class or method works, so the code it generates is grounded in the docs for the exact versions of the gems your app uses, rather than training data that may be stale or a generic docs lookup that can't guarantee it matches the version your app depends on.

get_source_location

Returns the file and line where a class, module, or method is defined, across both your app and its dependencies.

[get_source_location demo]

Your agent can use it to jump straight to where a class or method is defined, by file and line, instead of grepping for it, including when the definition lives in a gem dependency.

Also, because it resolves the location from your running app instead of parsing source text, it handles metaprogramming, where a method is generated at runtime and does not appear as a literal def for grep to find.

[!NOTE]

Why no tools for routes, associations, etc?

Tidewave does not include tools for listing your routes, associations, etc. because agents are better off reading their respective source files, which gives agents more context and enables them to perform any necessary edit without additional tool calls.

Instead, Tidewave aims to fill in missing gaps, such as evaluating code inside your Rails app (without starting new instances) and finding source location, which can be tricky, even with grepping, due to metaprogramming and the different places Bundler can install your dependencies.

Troubleshooting

The Tidewave toolbar is missing

This may happen if you are compressing your responses (gzip, brotli, etc) after the Tidewave middleware runs. Use bin/rails middleware and make sure Tidewave comes after Rack::Deflater or similar. Also look into your browser and terminal logs for any errors.

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 to config/initializers/development.rb:

ruby
config.session_store :cookie_store,  key: "__your_app_session",  same_site: :none,  secure: true,  assume_ssl: true

And make sure you are using rack-session version 2.1.0 or later.

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. This is done only in the environments that Tidewave is loadead (development by default).

Production Environment

Tidewave is a powerful tool that can help you develop your web application faster and more efficiently. However, it is important to note that Tidewave is not meant to be used in a production environment.

Tidewave will raise an error if it is used in any environment where code reloading is disabled (which typically includes production).

Configuration

You may configure tidewave using the following syntax:

ruby
  config.tidewave.team = { id: "my-company" }

The following config is 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)

  • logger_middleware - The logger middleware Tidewave should wrap to silence its own logs

  • preferred_orm - which ORM to use, either :active_record (default) or :sequel

  • team - set your Tidewave Team configuration, such as config.tidewave.team = { id: "my-company" }

  • toolbar - controls whether the Tidewave toolbar is injected into HTML pages. Defaults to true

Acknowledgements

A thank you to Yorick Jacquin for the initial version of this project.

Development

Run the Minitest suite with:

shell
bundle exec ruby -Itest test/all_test.rb

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.

來源:README.md,提交 420b171

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.8.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Rails 整合