A Model Context Protocol (MCP) server that allows AI agents to manage Rails development servers. Start, stop, and monitor your Rails app directly from Claude!
- start_dev_server: Start Rails development server on a specified port
- stop_dev_server: Stop the running Rails server
- dev_server_logs: View recent logs and notable events (errors, warnings, requests)
- dev_server_status: Check if the server is running and get connection details
gem install rails-dev-mcpgit clone https://github.com/obie/rails-dev-mcp.git
cd rails-dev-mcp
bundle install
rake installAdd to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"rails-dev": {
"command": "rails-dev-mcp",
"cwd": "/path/to/your/rails/project"
}
}
}The Rails Dev MCP integrates seamlessly with ClaudeOnRails. Add to your claude-swarm.yml:
mcps:
- name: rails-dev
type: stdio
command: rails-dev-mcp
args: []Starts the Rails development server.
Parameters:
port(optional): Port number (default: 3000)
Example:
Start the Rails server on port 3001
Stops the running Rails development server.
Example:
Stop the Rails server
Retrieves recent logs from the Rails server.
Parameters:
lines(optional): Number of log lines to retrieve (default: 50)notable_only(optional): Show only errors, warnings, and requests
Example:
Show me the last 100 lines from the Rails server logs
Show me only errors from the Rails logs
Checks the current status of the Rails development server.
Example:
Is the Rails server running?
- Process Management: Uses Ruby's Open3 to manage the Rails server process
- Log Capture: Redirects server output to a log file for later retrieval
- PID Tracking: Maintains PID files to track running processes
- Smart Log Filtering: Identifies notable events like errors, warnings, and HTTP requests
# Run tests
bundle exec rspec
# Run linter
bundle exec rubocop
# Build gem
gem build rails-dev-mcp.gemspecMIT License - see LICENSE file for details.