Loading a project in headless mode

Hello!

I’m working on exposing some functionality of IDEA through MCP protocol. I would like to support headless mode as UI is not really needed in some server-side use-cases.

I have everything working when I start with idea <project path> .

However, if I enable headless mode the project does not seem to be loaded. What steps do I need to take to make it happen?

Thank you in advance