{
  "markdown": "# Tidewave Rails\n\nTidewave Rails is an MCP server that provides runtime-level tools for developing Ruby on Rails apps using coding agents.\n\nYour agent will be able to use this MCP server to talk to your running Rails app in development to:\n\n- execute code in the context of the running app (like a Rails console for agents)\n- read the app's live logs\n- query your development database\n- get source locations of classes and methods\n- read documentation pinned to the exact gem versions your app depends on\n\nThis MCP server is an open-source component of [Tidewave](https://tidewave.ai), the agentic development environment for Rails and Phoenix.\n\nYou can use this project as a standalone MCP server or integrated with the [Tidewave product](https://tidewave.ai) by following the instructions below.\n\n## Installation\n\n### 1. Add the Tidewave gem to your app\n\nYou can add Tidewave Rails to your app by running:\n\n```shell\nbundle add tidewave --group development\n```\n\nor by manually adding the `tidewave` gem to the development group in your Gemfile:\n\n```ruby\ngem \"tidewave\", group: :development\n```\n\n### 2. Add the Tidewave MCP to your agent/editor\n\nAdd 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`.\n\nWe also have specific instructions for:\n\n- [Claude Code](https://tidewave.hexdocs.pm/mcp_claude_code.html)\n- [Codex](https://tidewave.hexdocs.pm/mcp_codex.html)\n- [Cursor](https://tidewave.hexdocs.pm/mcp_cursor.html)\n- [Neovim](https://tidewave.hexdocs.pm/mcp_neovim.html)\n- [OpenCode](https://tidewave.hexdocs.pm/mcp_opencode.html)\n- [VS Code](https://tidewave.hexdocs.pm/mcp_vscode.html)\n- [Others](https://tidewave.hexdocs.pm/mcp.html)\n\n## Usage\n\nAs 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.\n\n## Available MCP tools\n\n### `project_eval`\n\nEvaluates 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.\n\n[![project_eval demo](docs/assets/project_eval-poster.png)](https://asciinema.org/a/v0Bs9WtOUARzewC3)\n\nYour 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.\n\n### `execute_sql_query`\n\nRuns a SQL query against your app's development database and returns the rows to the agent.\n\n[![execute_sql_query demo](docs/assets/execute_sql_query-poster.png)](https://asciinema.org/a/qJtkEDf2YAPqjBHI)\n\nYour 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.\n\n### `get_docs`\n\nLooks up the documentation for a class, method, or constant, reading from the exact gem versions locked in your app's Gemfile.lock.\n\n[![get_docs demo](docs/assets/get_docs-poster.png)](https://asciinema.org/a/Aa0u915syzncFYH8)\n\nYour 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.\n\n### `get_logs`\n\nReturns output from your running server's log.\n\n[![get_logs demo](docs/assets/get_logs-poster.png)](https://asciinema.org/a/1260413)\n\nYour agent can use it to see what happened after a request. For example, reading the request log and backtrace when something misbehaves, or checking the log after an action to confirm the request came in with the expected params.\n\n### `get_source_location`\n\nReturns the file and line where a class, module, or method is defined, across both your app and its dependencies.\n\n[![get_source_location demo](docs/assets/get_source_location-poster.png)](https://asciinema.org/a/1260415)\n\nYour 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.\n\nAlso, 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.\n\n> [!NOTE]\n> #### Why no tools for routes, associations, etc?\n>\n> Tidewave does not include tools for listing your routes, associations, etc. because\n> agents are better off reading their respective source files, which gives agents more\n> context and enables them to perform any necessary edit without additional tool calls.\n>\n> Instead, Tidewave aims to fill in missing gaps, such as evaluating code inside your\n> Rails app (without starting new instances) and finding source location, which can be\n> tricky, even with grepping, due to metaprogramming and the different places Bundler\n> can install your dependencies.\n\n## Troubleshooting\n\n### The Tidewave toolbar is missing\n\nThis 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.\n\n### Using multiple hosts/subdomains\n\nIf 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`:\n\n```ruby\nconfig.session_store :cookie_store,\n  key: \"__your_app_session\",\n  same_site: :none,\n  secure: true,\n  assume_ssl: true\n```\n\nAnd make sure you are using `rack-session` version `2.1.0` or later.\n\nThe 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).\n\n### Content security policy\n\nIf 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).\n\n### Production Environment\n\nTidewave 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.\n\nTidewave will raise an error if it is used in any environment where code reloading is disabled (which typically includes production).\n\n## Configuration\n\nYou may configure `tidewave` using the following syntax:\n\n```ruby\n  config.tidewave.team = { id: \"my-company\" }\n```\n\nThe following config is available:\n\n  * `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)\n\n  * `logger_middleware` - The logger middleware Tidewave should wrap to silence its own logs\n\n  * `preferred_orm` - which ORM to use, either `:active_record` (default) or `:sequel`\n\n  * `team` - set your Tidewave Team configuration, such as `config.tidewave.team = { id: \"my-company\" }`\n\n  * `toolbar` - controls whether the Tidewave toolbar is injected into HTML pages. Defaults to `true`\n\n## Acknowledgements\n\nA thank you to Yorick Jacquin for the initial version of this project.\n\n## Development\n\nRun the Minitest suite with:\n\n```shell\nbundle exec ruby -Itest test/all_test.rb\n```\n\n## License\n\nCopyright (c) 2025 Dashbit\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
  "bytes": 8704,
  "sha": "b09c98dafe50cd37d4943aa9ad2d5de2a29d5377430e54776f52291ce305a891",
  "repo_slug": "tidewave-ai/tidewave_rails",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_tidewave_ai_tidewave_rails_5e811cb4/readme"
}