What's the right way to start the server in an existing rails app? Do I just create the server and call start in an initializer or something?
Simply mount the engine in route.rb, define the tool and start it.
right I'm wondering where is the right place to start it! In an initializer?
https://github.com/modelcontextprotocol/specification/pull/2... https://spec.modelcontextprotocol.io/specification/2025-03-2...
Sorry super confused here. How can I do that while also booting up all the Rails stuff like the autoloader, db connections, etc?
1. mount the Engine and then `$ rails s` 2. `server.rb` to start the MCP server. `$ ruby path/to/server.rb`
`server = ActiveMcp::Server.new(name: "ActiveMcp DEMO", uri: 'https://your-app.example.com/mcp' );server.start`
Then, with an MCP client such as Claude Desktop, configure the following.
`{"mcpServers": {"active-mcp-demo": {"command": "/path/to/ruby", "args": ["/path/to/server.rb"]}}}`