You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ai-plugin/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ The plugin assumes downstream **users of Cayenne** writing their own Java apps.
31
31
32
32
## Install
33
33
34
-
**Cayenne 5.0+ only.** The MCP server ships with Cayenne 5.0. Skills that depend on it (`cayenne-cgen`, `cayenne-modeler`, `cayenne-reverse-engineer`) will not work against earlier Cayenne versions. The XML-editing, runtime, and query skills also target 5.0 idioms — for older Cayenne, this plugin is not the right tool.
34
+
**Cayenne 5.0+ only.** The MCP server ships with Cayenne 5.0. Skills that depend on it (`cayenne-cgen`, `cayenne-modeler`, `cayenne-db-import`) will not work against earlier Cayenne versions. The XML-editing, runtime, and query skills also target 5.0 idioms — for older Cayenne, this plugin is not the right tool.
35
35
36
36
The plugin is distributed from the Apache Cayenne GitHub repository: **https://github.com/apache/cayenne**. Inside Claude Code:
37
37
@@ -58,7 +58,7 @@ ai-plugin/
58
58
├── README.md # this file
59
59
├── skills/ # auto-triggering workflows
60
60
│ ├── cayenne-modeling/ # edit *.map.xml and cayenne-*.xml
61
-
│ ├── cayenne-reverse-engineer/# import a DB schema (Modeler GUI)
61
+
│ ├── cayenne-db-import/ # import a DB schema (Modeler GUI)
62
62
│ ├── cayenne-cgen/ # regenerate Java classes via MCP
63
63
│ ├── cayenne-modeler/ # open the GUI on a project
64
64
│ ├── cayenne-runtime/ # bootstrap CayenneRuntime in an app
Copy file name to clipboardExpand all lines: ai-plugin/references/mcp-tools.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@
20
20
21
21
The Cayenne MCP server (`cayenne-mcp-server` module) exposes Cayenne operations to AI agents over stdio.
22
22
23
-
**Availability: Cayenne 5.0+ only.** The MCP server is a new component shipped alongside CayenneModeler starting with the 5.0 release. There is no MCP server for Cayenne 4.x or earlier — skills that depend on these tools (`cayenne-cgen`, `cayenne-modeler`, `cayenne-reverse-engineer`) cannot be used against pre-5.0 projects.
23
+
**Availability: Cayenne 5.0+ only.** The MCP server is a new component shipped alongside CayenneModeler starting with the 5.0 release. There is no MCP server for Cayenne 4.x or earlier — skills that depend on these tools (`cayenne-cgen`, `cayenne-modeler`, `cayenne-db-import`) cannot be used against pre-5.0 projects.
24
24
25
25
Setup is documented in `cayenne-mcp-server/README.md` at the repo root. Quick form for Claude Code:
Copy file name to clipboardExpand all lines: ai-plugin/skills/cayenne-db-import/SKILL.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
name: cayenne-reverse-engineer
2
+
name: cayenne-db-import
3
3
description: "Use this skill whenever the user wants to import database schema metadata into a Cayenne DataMap — full-schema sync from a live DB. Trigger on phrases like 'reverse engineer the database', 'import the schema', 'generate a DataMap from my DB', 'sync the model with the database', 'add the new tables from the DB', 'import the customer table', 'pick up the latest schema changes', 'create entities from these tables', or any request that involves reading database metadata to populate or update a DataMap. This is for *full schema* or *bulk table* import; one-off a-la-carte entity additions belong in the cayenne-modeling skill. The skill runs reverse engineering directly via the `mcp__cayenne__dbimport_run` MCP tool when a DBConnector is already configured; otherwise it opens the CayenneModeler GUI via `mcp__cayenne__open_project` to configure the connection first."
4
4
---
5
5
@@ -21,7 +21,7 @@ description: "Use this skill whenever the user wants to import database schema m
21
21
specific language governing permissions and limitations
22
22
under the License.
23
23
-->
24
-
# cayenne-reverse-engineer
24
+
# cayenne-db-import
25
25
26
26
Import a database schema into a Cayenne DataMap using the `mcp__cayenne__dbimport_run` MCP tool. If a DBConnector is already stored in preferences for the DataMap the import runs directly without any GUI interaction. When the connection has not been configured yet, the workflow launches CayenneModeler and walks the user through the dialog once to save the connection, then re-runs `dbimport_run`.
Copy file name to clipboardExpand all lines: ai-plugin/skills/cayenne-modeler/SKILL.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: cayenne-modeler
3
-
description: "Use this skill when the user explicitly wants to open CayenneModeler (the GUI) on a Cayenne project, or when the modeling task is inherently visual — reverse engineering (delegated to cayenne-reverse-engineer), bulk relationship layout, multi-entity visual refactoring. Trigger on phrases like 'open the Modeler', 'open in CayenneModeler', 'launch the GUI', 'edit visually', 'show me the project in the Modeler'. Do NOT trigger as a fallback for ordinary a-la-carte XML edits — those belong in the cayenne-modeling skill, which is faster and doesn't require the user to context-switch."
3
+
description: "Use this skill when the user explicitly wants to open CayenneModeler (the GUI) on a Cayenne project, or when the modeling task is inherently visual — reverse engineering (delegated to cayenne-db-import), bulk relationship layout, multi-entity visual refactoring. Trigger on phrases like 'open the Modeler', 'open in CayenneModeler', 'launch the GUI', 'edit visually', 'show me the project in the Modeler'. Do NOT trigger as a fallback for ordinary a-la-carte XML edits — those belong in the cayenne-modeling skill, which is faster and doesn't require the user to context-switch."
4
4
---
5
5
6
6
<!--
@@ -63,7 +63,7 @@ The tool spawns the Modeler asynchronously, then waits up to ~15 seconds for a s
63
63
64
64
Once `open_project` returns `ok`, the user is in the GUI. From here, depending on intent:
65
65
66
-
-**Reverse engineering**: that's the `cayenne-reverse-engineer` skill's job to walk them through. Do not duplicate that workflow here — just open and step out.
66
+
-**Reverse engineering**: that's the `cayenne-db-import` skill's job to walk them through. Do not duplicate that workflow here — just open and step out.
67
67
-**Visual layout / bulk editing**: tell the user what tab to navigate to (e.g., DataMap → ObjEntity for entity-level edits, DataMap → Class Generation for cgen config) and let them work. Don't try to script GUI actions.
68
68
-**Just wanted to see the project**: nothing more to do.
Copy file name to clipboardExpand all lines: ai-plugin/skills/cayenne-modeling/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ If anything fails, fix it before reporting done.
81
81
82
82
-**If you modified entities and the DataMap has a `<cgen>` block:** suggest invoking the `cayenne-cgen` skill to regenerate Java classes. Mention which entities are affected.
83
83
-**If the user added a new entity and there's no Java class yet:** same — recommend `cayenne-cgen`.
84
-
-**If the user is asking about a full DB sync** (importing many tables, syncing with a changed schema): hand off to `cayenne-reverse-engineer`. Do not try to script this via XML edits.
84
+
-**If the user is asking about a full DB sync** (importing many tables, syncing with a changed schema): hand off to `cayenne-db-import`. Do not try to script this via XML edits.
85
85
-**If the change is structurally messy** (bulk renaming relationships, visual graph rework): suggest the `cayenne-modeler` skill. Otherwise do not.
Copy file name to clipboardExpand all lines: docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part3/mcpTools.adoc
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,12 @@
14
14
15
15
=== MCP Tools
16
16
17
-
The server exposes three tools. Your agent will discover them on its own, but it is useful to understand the capabilities and possible prompts. All tools operate on a Cayenne project descriptor (a `cayenne-*.xml` file) and take absolute paths - agents should resolve relative paths against the current workspace before invoking.
17
+
The server exposes three tools. Your agent will discover them on its own, but it is useful to understand the
18
+
capabilities and possible prompts. All tools operate on a Cayenne project descriptor (a `cayenne-*.xml` file) and take
19
+
absolute paths — agents should resolve relative paths against the current workspace before invoking.
20
+
21
+
If you are using the `apache-cayenne` Claude Code plugin, its skills (`cayenne-cgen`, `cayenne-modeler`, `cayenne-db-import`)
22
+
call these tools automatically. You can verify the server is available with `claude mcp list` — look for an entry named `cayenne`.
18
23
19
24
==== open_project
20
25
@@ -70,12 +75,12 @@ ____
70
75
==== dbimport_run
71
76
72
77
Runs Cayenne reverse engineering (dbimport) for a single DataMap inside the project.
73
-
The tool reads the JDBC connection from the DBConnector that CayenneModeler stored in preferences when the user last ran the reverse-engineering dialog for this DataMap.
78
+
The tool reads the JDBC connection from CayenneModeler preferences on the local machine (the agent doesn't see the credentials).
74
79
If the DataMap has a `<reverse-engineering>` block its filters are applied; otherwise the full database schema is imported.
75
80
The DataMap XML is rewritten on disk with the merged schema, and a JSON summary of what changed is returned.
76
81
77
-
JDBC credentials are not passed as arguments — they come from CayenneModeler preferences.
78
-
If no connection has been saved yet (`dbconnector_not_configured` error), open the project in the Modeler with `open_project`, run the dialog once to save the connection, then call `dbimport_run` again.
82
+
If no connection has been saved yet (`dbconnector_not_configured` error), open the project in the Modeler with
83
+
`open_project`, run the dialog once to save the connection, then call `dbimport_run` again.
Copy file name to clipboardExpand all lines: docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part3/overview.adoc
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,4 +16,9 @@
16
16
17
17
AI coding agents such as Claude Code, Cursor, etc. can read and write Cayenne projects like any other Java codebase. For day-to-day API work — writing queries, manipulating an `ObjectContext`, etc. — you don't need anything Cayenne-specific. Prompt the agent the way you would for any other project.
18
18
19
-
The Cayenne MCP (Model Context Protocol) server is what makes the agent _Cayenne-aware_ beyond plain source editing. It is a small stdio-based process that the AI client launches on demand and exposes a focused set of tools for operating on a Cayenne project descriptor. This chapter walks you through installing the server and explains the available tools.
19
+
Two additional elements make the agent _Cayenne-aware_ beyond plain source editing:
20
+
21
+
* MCP server — a small stdio-based process the agent launches on demand, exposing tools for class generation, DB import, and opening CayenneModeler. Works with any MCP-compatible client (Claude Code, Cursor, Codex, etc.).
22
+
* `apache-cayenne` Claude Code plugin — a Claude Code-specific extension that bundles pre-built skills for DataMap editing, query writing, runtime setup, and more. The skills detect the MCP server at runtime;
23
+
24
+
Both elements are independent but work best together. This chapter walks you through installing both and explains the available MCP tools.
0 commit comments