Skip to content
Back to search

tidewave_rails

MCP server with runtime-level tools for Rails development

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/tidewave-ai--tidewave-rails/badge.svg)](/listings/tidewave-ai--tidewave-rails)

HTML

<a href="/listings/tidewave-ai--tidewave-rails"><img src="/api/listings/tidewave-ai--tidewave-rails/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Add the Tidewave gem to your app

You can add Tidewave Rails to your app by running:

bundle add tidewave --group development

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

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:

- [Claude Code](https://tidewave.hexdocs.pm/mcp_claude_code.html) - [Codex](https://tidewave.hexdocs.pm/mcp_codex.html) - [Cursor](https://tidewave.hexdocs.pm/mcp_cursor.html) - [Neovim](https://tidewave.hexdocs.pm/mcp_neovim.html) - [OpenCode](https://tidewave.hexdocs.pm/mcp_opencode.html) - [VS Code](https://tidewave.hexdocs.pm/mcp_vscode.html) - [Others](https://tidewave.hexdocs.pm/mcp.html)

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 175 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Tidewave Rails
  2. Tidewave Rails is an MCP server that provides runtime-level tools for developing Ruby on Rails apps using coding agents.
  3. Your agent will be able to use this MCP server to talk to your running Rails app in development to:
  4. - execute code in the context of the running app (like a Rails console for agents)
  5. - read the app's live logs
  6. - query your development database
  7. - get source locations of classes and methods
  8. - read documentation pinned to the exact gem versions your app depends on
  9. This MCP server is an open-source component of [Tidewave](https://tidewave.ai), the agentic development environment for Rails and Phoenix.
  10. You can use this project as a standalone MCP server or integrated with the [Tidewave product](https://tidewave.ai) by following the instructions below.
  11. ## Installation
  12. ### 1. Add the Tidewave gem to your app
  13. You can add Tidewave Rails to your app by running:
  14. ```shell
  15. bundle add tidewave --group development
  16. ```
  17. or by manually adding the `tidewave` gem to the development group in your Gemfile:
  18. ```ruby
  19. gem "tidewave", group: :development
  20. ```
  21. ### 2. Add the Tidewave MCP to your agent/editor
  22. 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`.
  23. We also have specific instructions for:
  24. - [Claude Code](https://tidewave.hexdocs.pm/mcp_claude_code.html)
  25. - [Codex](https://tidewave.hexdocs.pm/mcp_codex.html)
  26. - [Cursor](https://tidewave.hexdocs.pm/mcp_cursor.html)
  27. - [Neovim](https://tidewave.hexdocs.pm/mcp_neovim.html)
  28. - [OpenCode](https://tidewave.hexdocs.pm/mcp_opencode.html)
  29. - [VS Code](https://tidewave.hexdocs.pm/mcp_vscode.html)
  30. - [Others](https://tidewave.hexdocs.pm/mcp.html)
  31. ## Usage
  32. 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.
  33. ## Available MCP tools
  34. ### `project_eval`
  35. 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.
  36. [![project_eval demo](docs/assets/project_eval-poster.png)](https://asciinema.org/a/v0Bs9WtOUARzewC3)
  37. 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.
  38. ### `execute_sql_query`
  39. Runs a SQL query against your app's development database and returns the rows to the agent.
  40. [![execute_sql_query demo](docs/assets/execute_sql_query-poster.png)](https://asciinema.org/a/qJtkEDf2YAPqjBHI)
  41. 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.
  42. ### `get_docs`
  43. Looks up the documentation for a class, method, or constant, reading from the exact gem versions locked in your app's Gemfile.lock.
  44. [![get_docs demo](docs/assets/get_docs-poster.png)](https://asciinema.org/a/Aa0u915syzncFYH8)
  45. 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.
  46. ### `get_source_location`
  47. Returns the file and line where a class, module, or method is defined, across both your app and its dependencies.
  48. [![get_source_location demo](docs/assets/get_source_location-poster.png)](https://asciinema.org/a/1260415)
  49. 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.
  50. 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.
  51. > [!NOTE]
  52. > #### Why no tools for routes, associations, etc?
  53. >
  54. > Tidewave does not include tools for listing your routes, associations, etc. because
  55. > agents are better off reading their respective source files, which gives agents more
  56. > context and enables them to perform any necessary edit without additional tool calls.
  57. >
  58. > Instead, Tidewave aims to fill in missing gaps, such as evaluating code inside your
  59. > Rails app (without starting new instances) and finding source location, which can be
  60. > tricky, even with grepping, due to metaprogramming and the different places Bundler
  61. > can install your dependencies.
  62. ## Troubleshooting
  63. ### The Tidewave toolbar is missing
  64. 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.
  65. ### Using multiple hosts/subdomains
  66. 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`:
  67. ```ruby
  68. config.session_store :cookie_store,
  69. key: "__your_app_session",
  70. same_site: :none,
  71. secure: true,
  72. assume_ssl: true
  73. ```
  74. And make sure you are using `rack-session` version `2.1.0` or later.
  75. 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).
  76. ### Content security policy
  77. 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).
  78. ### Production Environment
  79. 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.
  80. Tidewave will raise an error if it is used in any environment where code reloading is disabled (which typically includes production).
  81. ## Configuration
  82. You may configure `tidewave` using the following syntax:
  83. ```ruby
  84. config.tidewave.team = { id: "my-company" }
  85. ```
  86. The following config is available:
  87. * `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](https://tidewave.hexdocs.pm/security.html) (if you know what you are doing)
  88. * `logger_middleware` - The logger middleware Tidewave should wrap to silence its own logs
  89. * `preferred_orm` - which ORM to use, either `:active_record` (default) or `:sequel`
  90. * `team` - set your Tidewave Team configuration, such as `config.tidewave.team = { id: "my-company" }`
  91. * `toolbar` - controls whether the Tidewave toolbar is injected into HTML pages. Defaults to `true`
  92. ## Acknowledgements
  93. A thank you to Yorick Jacquin for the initial version of this project.
  94. ## Development
  95. Run the Minitest suite with:
  96. ```shell
  97. bundle exec ruby -Itest test/all_test.rb
  98. ```
  99. ## License
  100. Copyright (c) 2025 Dashbit
  101. Licensed under the Apache License, Version 2.0 (the "License");
  102. you may not use this file except in compliance with the License.
  103. You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
  104. Unless required by applicable law or agreed to in writing, software
  105. distributed under the License is distributed on an "AS IS" BASIS,
  106. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  107. See the License for the specific language governing permissions and
  108. limitations under the License.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.