|
1 | 1 | # Quarkus Agent MCP |
2 | 2 |
|
3 | | -A standalone MCP server that enables AI coding agents to create, manage, and interact with Quarkus applications. It runs as a separate process that survives app crashes, giving agents the ability to create projects, control application lifecycle (start/stop/restart), proxy Dev MCP tools, and search Quarkus documentation. |
| 3 | +A standalone MCP server that enables AI coding agents to create, manage, and interact with Quarkus applications. It runs as a separate process that survives app crashes, giving agents the ability to create projects, check for updates, read extension skills, control application lifecycle, proxy Dev MCP tools, and search Quarkus documentation. |
4 | 4 |
|
5 | 5 | Part of the [DevStar](https://github.com/quarkusio/quarkus/discussions/53093) working group. |
6 | 6 |
|
@@ -88,84 +88,109 @@ If the MCP server is working, the agent will use `quarkus/searchDocs` and return |
88 | 88 |
|
89 | 89 | ## Usage |
90 | 90 |
|
91 | | -### Creating and developing a Quarkus app |
| 91 | +### Creating a new Quarkus app |
92 | 92 |
|
93 | | -Once the MCP server is registered with your coding agent, you can ask the agent to build Quarkus applications using natural language. The agent uses the MCP tools automatically. |
| 93 | +Ask your agent to build a Quarkus application using natural language. The agent uses the MCP tools automatically. |
94 | 94 |
|
95 | 95 | **Example conversation:** |
96 | 96 |
|
97 | 97 | > **You:** Create a Quarkus REST API with a greeting endpoint and a PostgreSQL database |
98 | 98 | > |
99 | | -> **Agent:** _(uses `quarkus/searchDocs` to look up REST and datasource configuration, then `quarkus/create` to scaffold the project with `rest-jackson,jdbc-postgresql,hibernate-orm-panache` extensions — the app starts automatically in dev mode)_ |
| 99 | +> **Agent:** _(uses `quarkus/create` to scaffold the project with `rest-jackson,jdbc-postgresql,hibernate-orm-panache` extensions — the app starts automatically in dev mode, and a `CLAUDE.md` is generated with project-specific workflow instructions)_ |
| 100 | +> |
| 101 | +> **Agent:** _(calls `quarkus/skills` to learn the correct patterns for Panache, REST, and other extensions before writing any code)_ |
100 | 102 | > |
101 | 103 | > **You:** Add a `Greeting` entity and a REST endpoint that stores and retrieves greetings |
102 | 104 | > |
103 | | -> **Agent:** _(uses `quarkus/searchDocs` to look up Panache entity patterns, writes the code, then uses `quarkus/searchTools` to find continuous testing tools, resumes testing, checks `quarkus/logs` for test results)_ |
| 105 | +> **Agent:** _(writes the code following patterns from skills, then runs tests via a subagent using `quarkus/callTool`)_ |
104 | 106 |
|
105 | 107 | ### Development workflow |
106 | 108 |
|
107 | 109 | The MCP server guides the agent through the optimal Quarkus development workflow: |
108 | 110 |
|
109 | 111 | ``` |
110 | | -1. CREATE quarkus/create → project scaffolded + auto-started in dev mode |
111 | | - │ |
112 | | -2. SEARCH DOCS quarkus/searchDocs → look up APIs, config, best practices |
113 | | - │ |
114 | | -3. DISCOVER TOOLS quarkus/searchTools → find testing, config, endpoint tools |
115 | | - │ |
116 | | -4. DEVELOP ┌─────────────────────────────────────────────┐ |
117 | | - (repeat) │ a) Pause continuous testing │ |
118 | | - │ b) Write code + tests │ |
119 | | - │ c) Save all files │ |
120 | | - │ d) Resume continuous testing │ |
121 | | - │ → triggers hot reload + runs tests │ |
122 | | - │ e) Check quarkus/logs for test results │ |
123 | | - │ f) Fix any failures, repeat │ |
124 | | - └─────────────────────────────────────────────┘ |
125 | | - │ |
126 | | -5. MONITOR quarkus/status, quarkus/logs → check app health |
| 112 | +NEW PROJECT EXISTING PROJECT |
| 113 | +
|
| 114 | +1. quarkus/create 1. quarkus/update (via subagent) |
| 115 | + → scaffolds + auto-starts → checks version, suggests upgrades |
| 116 | + → generates CLAUDE.md |
| 117 | + 2. quarkus/start |
| 118 | +2. quarkus/skills → starts dev mode |
| 119 | + → learn extension patterns |
| 120 | + 3. quarkus/skills |
| 121 | +3. quarkus/searchDocs → learn extension patterns |
| 122 | + → look up APIs, config |
| 123 | + 4. quarkus/searchDocs |
| 124 | +4. Write code + tests → look up APIs, config |
| 125 | +
|
| 126 | +5. Run tests (via subagent) 5. Write code + tests |
| 127 | + → quarkus/callTool |
| 128 | + → devui-testing_runTests 6. Run tests (via subagent) |
| 129 | + → quarkus/callTool |
| 130 | +6. Iterate → devui-testing_runTests |
127 | 131 | ``` |
128 | 132 |
|
129 | 133 | **Key points:** |
130 | 134 |
|
131 | | -- **Hot reload** is automatic in Quarkus dev mode, but is triggered on the next access (HTTP request or test run), not on file save. Resuming continuous testing triggers hot reload. |
132 | | -- **Pause before editing** — the agent pauses continuous testing before making changes so that tests don't fail on partially-applied code. |
133 | | -- **Doc search first** — the agent searches Quarkus documentation before writing code to ensure it uses the correct APIs and patterns. |
134 | | -- **The MCP server survives crashes** — if the app crashes due to a code error, the agent can check `quarkus/logs` to see what went wrong and fix it. The app is still managed and can be restarted. |
| 135 | +- **Hot reload** is automatic in Quarkus dev mode — triggered on the next access (HTTP request or test run), not on file save. |
| 136 | +- **Skills before code** — the agent reads extension-specific skills to learn correct patterns, testing approaches, and common pitfalls before writing any code. |
| 137 | +- **Tests via subagents** — test execution is dispatched to a subagent so the main conversation stays responsive. |
| 138 | +- **The MCP server survives crashes** — if the app crashes due to a code error, the agent can check `quarkus/logs` to see what went wrong and fix it. |
| 139 | +- **CLAUDE.md** — every new project gets a `CLAUDE.md` with Quarkus-specific workflow instructions that guide the agent. |
135 | 140 |
|
136 | 141 | ### What the agent can do with a running app |
137 | 142 |
|
138 | 143 | Once a Quarkus app is running in dev mode, the agent can discover and use all Dev MCP tools via `quarkus/searchTools` and `quarkus/callTool`. These typically include: |
139 | 144 |
|
140 | 145 | | Capability | How to discover | Example | |
141 | 146 | |-----------|----------------|---------| |
142 | | -| Continuous testing | `quarkus/searchTools` query: `test` | Start, stop, pause, resume tests | |
| 147 | +| Testing | `quarkus/searchTools` query: `test` | Run all tests, run a specific test class | |
143 | 148 | | Configuration | `quarkus/searchTools` query: `config` | View and change config properties | |
144 | 149 | | Extensions | `quarkus/searchTools` query: `extension` | Add or remove extensions at runtime | |
145 | 150 | | Endpoints | `quarkus/searchTools` query: `endpoint` | List all REST endpoints and their URLs | |
146 | 151 | | Dev Services | `quarkus/searchTools` query: `dev-services` | View database URLs, container info | |
147 | 152 | | Log levels | `quarkus/searchTools` query: `log` | Change log levels at runtime | |
148 | 153 |
|
| 154 | +### Extension skills |
| 155 | + |
| 156 | +The agent can read extension-specific coding skills using `quarkus/skills`. These are read from the `quarkus-extension-skills` JAR, which is automatically downloaded from Maven Central (or a configured mirror) for the project's Quarkus version. |
| 157 | + |
| 158 | +Skills contain patterns, testing guidelines, and common pitfalls for each extension — things like "always use `@Transactional` for write operations with Panache" or "don't create REST clients manually, let CDI inject them." |
| 159 | + |
149 | 160 | ### Documentation search |
150 | 161 |
|
151 | 162 | The agent can search Quarkus documentation at any time using `quarkus/searchDocs`. This uses semantic search (BGE embeddings + pgvector) over the full Quarkus documentation. |
152 | 163 |
|
153 | 164 | On first use, a Docker/Podman container with the pre-indexed documentation is started automatically. If a project directory is provided, the documentation version matches the project's Quarkus version. |
154 | 165 |
|
155 | | -**Examples of what to ask:** |
| 166 | +### Update checking |
156 | 167 |
|
157 | | -- "Search the docs for how to configure a datasource" |
158 | | -- "Look up CDI dependency injection" |
159 | | -- "Find the docs on native image configuration" |
160 | | -- "How do I write tests in Quarkus?" |
| 168 | +For existing projects, `quarkus/update` checks if the Quarkus version is current and provides a full upgrade report: |
| 169 | + |
| 170 | +- Compares build files against [reference projects](https://github.com/quarkusio/code-with-quarkus-compare) |
| 171 | +- Runs `quarkus update --dry-run` (if CLI available) to preview automated migrations |
| 172 | +- Links to the structural diff between versions |
| 173 | +- Recommends manual actions for changes that automated migration doesn't cover |
161 | 174 |
|
162 | 175 | ## MCP Tools Reference |
163 | 176 |
|
164 | 177 | ### App Creation |
165 | 178 |
|
166 | 179 | | Tool | Description | Parameters | |
167 | 180 | |------|-------------|------------| |
168 | | -| `quarkus/create` | Create a new Quarkus app and auto-start it in dev mode | `outputDir` (required), `groupId`, `artifactId`, `extensions`, `buildTool` | |
| 181 | +| `quarkus/create` | Create a new Quarkus app, auto-start in dev mode, generate CLAUDE.md | `outputDir` (required), `groupId`, `artifactId`, `extensions`, `buildTool`, `quarkusVersion` | |
| 182 | + |
| 183 | +### Update Checking |
| 184 | + |
| 185 | +| Tool | Description | Parameters | |
| 186 | +|------|-------------|------------| |
| 187 | +| `quarkus/update` | Check if project is up-to-date, provide upgrade report | `projectDir` (required) | |
| 188 | + |
| 189 | +### Extension Skills |
| 190 | + |
| 191 | +| Tool | Description | Parameters | |
| 192 | +|------|-------------|------------| |
| 193 | +| `quarkus/skills` | Get coding patterns, testing guidelines, and pitfalls for project extensions | `projectDir` (required), `query` | |
169 | 194 |
|
170 | 195 | ### Lifecycle Management |
171 | 196 |
|
@@ -200,17 +225,20 @@ AI Coding Agent (Claude Code, Copilot, Cursor...) |
200 | 225 | +------------------------------------------+ |
201 | 226 | | Quarkus Agent MCP (always running) | |
202 | 227 | | | |
203 | | -| create --- quarkus create app / mvn | |
204 | | -| start/stop/restart --- child process | |
205 | | -| searchTools/callTool -- HTTP proxy | |
| 228 | +| create ------- quarkus create app | |
| 229 | +| update ------- version check + report | |
| 230 | +| skills ------- extension-skills JAR | |
| 231 | +| start/stop --- child process | |
| 232 | +| searchTools -- HTTP proxy to Dev MCP | |
| 233 | +| callTool ----- HTTP proxy to Dev MCP | |
206 | 234 | | searchDocs --- embeddings + pgvector | |
207 | | -+------+--------------+--------------+-----+ |
208 | | - | | | |
209 | | - v v v |
210 | | - quarkus dev /q/dev-mcp pgvector |
211 | | - (may crash (running (Testcontainers, |
212 | | - -- Agent MCP app's Dev pre-indexed |
213 | | - survives) MCP tools) Quarkus docs) |
| 235 | ++------+---------+---------+----------+----+ |
| 236 | + | | | | |
| 237 | + v v v v |
| 238 | + quarkus dev /q/dev-mcp pgvector Maven Central |
| 239 | + (may crash (running (pre- (extension- |
| 240 | + -- Agent app's Dev indexed skills JAR) |
| 241 | + survives) MCP tools) docs) |
214 | 242 | ``` |
215 | 243 |
|
216 | 244 | The MCP server wraps `quarkus dev` as a child process, so it stays alive when the app crashes. This is the key differentiator from the built-in Dev MCP server. |
@@ -245,6 +273,8 @@ claude mcp add quarkus-agent -- ./target/quarkus-agent-mcp-1.0.0-SNAPSHOT-runner |
245 | 273 | ## Related Projects |
246 | 274 |
|
247 | 275 | - [Quarkus Dev MCP](https://github.com/quarkusio/quarkus) — Built-in MCP server inside running Quarkus apps |
| 276 | +- [quarkus-skills](https://github.com/quarkusio/quarkus-skills) — Standalone skill files for Quarkus (Agent Skills specification) |
| 277 | +- [code-with-quarkus-compare](https://github.com/quarkusio/code-with-quarkus-compare) — Reference projects for build file comparison |
248 | 278 | - [chappie-docling-rag](https://github.com/chappie-bot/chappie-docling-rag) — Builds the pgvector Docker images with pre-indexed Quarkus docs |
249 | 279 | - [quarkus-mcp-server](https://github.com/quarkiverse/quarkus-mcp-server) — Quarkiverse MCP Server extension used by this project |
250 | 280 |
|
|
0 commit comments