DB Import tool is in. Without bells and whistles yet: all the DB config, and picking a data source for your DataMap should be done in the Modeler. Also, I created a Claude "plugin" for typical Cayenne workflow. It is worth installing (see https://github.com/apache/cayenne/tree/master/ai-plugin), as it knows everything about the MCP and can orchestrate all the steps:
❯ rerun db import ⏺ Skill(apache-cayenne:cayenne-reverse-engineer) ⎿ Successfully loaded skill ⏺ Let me locate the Cayenne project file first. ⏺ Import succeeded. One entity was added to the datamap DataMap. Want me to regenerate the Java classes with cgen now? > yes ⏺ Skill(apache-cayenne:cayenne-cgen) ⎿ Successfully loaded skill ⏺ All 96 files are already up to date — nothing needed to be written. The newly imported entity may have merged into an existing class, or its Java class was already current. No changes to the source tree. Andrus > On May 19, 2026, at 5:28 PM, Andrus Adamchik <[email protected]> wrote: > > [moving this to dev] > > 2. "open_project" tool is committed. If anyone has a Windows machine handy, > appreciate if you could build Modeler from master ("mvn clean verify > -Passembly,windows") and see if project opening works there. > > I also added "Agentic Coding" chapter to the docs that should help with > installation and sample prompts: > > https://github.com/apache/cayenne/tree/master/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part3 > > > 3. Next is the hardest tool - DB Import. It requires linking XML import > config with a Modeler-defined DataSource. So will likely need to share > Modeler preferences with the MCP Server and make the agent steer the user to > "open_project" to create new datasources and link the project to one of them. > > Also, an interesting bit that I haven't fully thought through yet - smart > relationship naming. Our current naming algorithm can do simple English > plurals and that's about it. E.g., when 2 entities have more than one > relationship between them based on multiple FKs, you'd often get meaningless > names like "targets1", "targets2" (specifically for the to-many part). A > model should be able to inspect FKs and create proper phrases ("manager" -> > "managedBy"). And this can go further - we (or the users) can provide naming > "skills" for a particular style, etc. Fun stuff. > > Thanks, > Andrus > > >> On May 12, 2026, at 5:16 PM, Andrus Adamchik <[email protected]> wrote: >> >> Hi, >> >> A heads up... We are building an MCP server to integrate Modeler with >> agentic coding flows. It will be released with 5.0-M2. If you feel like >> compiling Cayenne and trying it right away, the code is sitting on the >> "master" branch (Cayenne 5.0). At the moment it provides the "cgen" tool. >> For a sample session and install instructions, follow this link >> ("Development build" section will be the most relevant): >> >> https://github.com/apache/cayenne/blob/master/cayenne-mcp-server/README.md >> >> Of course, the prompt is just "generate java classes from the Cayenne >> mapping" :) >> >> Stay tuned for more tools and send feedback! >> >> Andrus >
