MCP + Claude Plugin
Andrus Adamchik <[email protected]> Sun, 24 May 2026 17:44:57 -0400
| Newsgroups | gmane.comp.java.cayenne.devel |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_0D73B66A-03F4-4F2A-9102-AB6D440567CB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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: =E2=9D=AF rerun db import =E2=8F=BA Skill(apache-cayenne:cayenne-reverse-engineer) =E2=8E=BF Successfully loaded skill =E2=8F=BA Let me locate the Cayenne project file first. =E2=8F=BA Import succeeded. One entity was added to the datamap DataMap. = Want me to regenerate the Java classes with cgen now? > yes =E2=8F=BA Skill(apache-cayenne:cayenne-cgen) =E2=8E=BF Successfully loaded skill =E2=8F=BA All 96 files are already up to date =E2=80=94 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=E2=80=AFPM, Andrus Adamchik = <[email protected]> wrote: >=20 > [moving this to dev] >=20 > 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. >=20 > I also added "Agentic Coding" chapter to the docs that should help = with installation and sample prompts: >=20 > = https://github.com/apache/cayenne/tree/master/docs/asciidoc/cayenne-guide/= src/docs/asciidoc/_cayenne-guide/part3 >=20 >=20 > 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.=20 >=20 > 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. >=20 > Thanks, > Andrus >=20 >=20 >> On May 12, 2026, at 5:16=E2=80=AFPM, Andrus Adamchik = <[email protected]> wrote: >>=20 >> Hi, >>=20 >> 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): >>=20 >> = https://github.com/apache/cayenne/blob/master/cayenne-mcp-server/README.md= >>=20 >> Of course, the prompt is just "generate java classes from the Cayenne = mapping" :)=20 >>=20 >> Stay tuned for more tools and send feedback! >>=20 >> Andrus >=20 --Apple-Mail=_0D73B66A-03F4-4F2A-9102-AB6D440567CB--