Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new rolemodel:mcp generator intended to bootstrap an MCP server endpoint in a Rails app with Doorkeeper-based OAuth (including dynamic client registration and well-known OAuth metadata endpoints).
Changes:
- Introduces an
Rolemodel::MCPGeneratorthat installs/configuresmcp+doorkeeper, adds routes, and updates inflections for theMCPacronym. - Adds generator templates for MCP + OAuth controllers, Doorkeeper layout/views/styles, and request specs.
- Adds
doorkeeperas a development dependency and updates the lockfile.
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/generators/rolemodel/mcp_generator_spec.rb | Adds generator spec assertions for created files/routes and Gemfile updates |
| rolemodel-rails.gemspec | Adds doorkeeper as a development dependency |
| lib/rolemodel-rails.rb | Adds an MCP inflection acronym at gem load time |
| lib/generators/rolemodel/mcp/USAGE | Adds generator help text (currently appears to be copied from mailers) |
| lib/generators/rolemodel/mcp/README.md | Documents the MCP generator at a high level |
| lib/generators/rolemodel/mcp/mcp_generator.rb | Implements the MCP generator (bundler add, doorkeeper install/config, routes, inflections) |
| lib/generators/rolemodel/all_generator.rb | Runs rolemodel:mcp as part of rolemodel:all |
| lib/generators/rolemodel/mcp/templates/app/controllers/mcp_controller.rb.tt | MCP controller template wiring MCP server transport + Doorkeeper auth |
| lib/generators/rolemodel/mcp/templates/app/controllers/oauth_registrations_controller.rb | Dynamic OAuth client registration controller template |
| lib/generators/rolemodel/mcp/templates/app/controllers/well_known_controller.rb | Well-known OAuth metadata controller template |
| lib/generators/rolemodel/mcp/templates/app/controllers/doorkeeper/base_controller.rb | Doorkeeper base controller template |
| lib/generators/rolemodel/mcp/templates/config/initializers/doorkeeper.rb | Doorkeeper initializer template (opinionated config) |
| lib/generators/rolemodel/mcp/templates/app/views/layouts/doorkeeper.html.slim | Doorkeeper layout template |
| lib/generators/rolemodel/mcp/templates/app/views/doorkeeper/authorizations/new.html.slim.tt | Doorkeeper authorize view template |
| lib/generators/rolemodel/mcp/templates/app/views/doorkeeper/authorizations/error.html.slim.tt | Doorkeeper authorization error view template |
| lib/generators/rolemodel/mcp/templates/app/assets/stylesheets/components/doorkeeper.css | Doorkeeper UI styling (Optics token-based) |
| lib/generators/rolemodel/mcp/templates/spec/requests/mcp_controller_spec.rb | Request spec template for /mcp |
| lib/generators/rolemodel/mcp/templates/spec/requests/oauth_registrations_controller_spec.rb | Request spec template for dynamic registration |
| lib/generators/rolemodel/mcp/templates/spec/requests/well_known_controller_spec.rb | Request spec template for well-known endpoints |
| Gemfile.lock | Adds doorkeeper + updates platforms / nokogiri resolution |
lib/generators/rolemodel/mcp/templates/spec/requests/mcp_controller_spec.rb
Outdated
Show resolved
Hide resolved
lib/generators/rolemodel/mcp/templates/spec/requests/mcp_controller_spec.rb
Outdated
Show resolved
Hide resolved
lib/generators/rolemodel/mcp/templates/app/views/layouts/doorkeeper.html.slim
Outdated
Show resolved
Hide resolved
lib/generators/rolemodel/mcp/templates/app/controllers/doorkeeper/base_controller.rb
Show resolved
Hide resolved
…eeper.html.slim Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
OutlawAndy
approved these changes
Apr 3, 2026
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.
Why?
We want to be able to quickly spin up an MCP server with built-in oauth
What Changed
What changed in this PR?
Pre-merge checklist
bin/bump_versionorbin/bump_version --patch