get_file
Retrieve the content of a specific file.
How to use it
get_file is exposed by the Rails MCP Server MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the get_file tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Rails MCP Server
npx mcp-remote http://localhost:6029/mcp/sseOther tools in Rails MCP Server (17)
'introspection', 'static', or 'full' (includes Prism AST analysis)
Analyze controller-view relationships with optional Prism static analysis.
Analyze environment configurations for inconsistencies and security issues.
Analyze Active Record models with associations, validations, and optional Prism static analysis.
(String, optional) Filter by category: models, database, routing, controllers, files, project, guides
(String, optional) Output detail: 'names', 'summary', or 'full' (default: 'summary')
Retrieve Rails routes with optional filtering.
Retrieve database schema information.
List files matching a pattern in a directory.
Load documentation guides from Rails, Turbo, Stimulus, Kamal, or Custom.
Specific model to analyze
Array of models to analyze
(Hash, optional) Parameters for the analyzer
Retrieve comprehensive project information including Rails version, directory structure, and organization.
(String, required) Name of the project as defined in projects.yml
(String, optional) Search term (e.g., 'routes', 'model', 'schema')
(String, required) Name of the analyzer (e.g., 'getroutes', 'analyzemodels')