Skip to content

Commit 314d30c

Browse files
Merge pull request #4 from phillip-kruger/skills-and-instructions
Add extension skills, server instructions, and CLAUDE.md generation
2 parents 5130961 + 3ee521b commit 314d30c

File tree

12 files changed

+1456
-138
lines changed

12 files changed

+1456
-138
lines changed

README.md

Lines changed: 73 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Quarkus Agent MCP
22

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.
44

55
Part of the [DevStar](https://github.com/quarkusio/quarkus/discussions/53093) working group.
66

@@ -88,84 +88,109 @@ If the MCP server is working, the agent will use `quarkus/searchDocs` and return
8888

8989
## Usage
9090

91-
### Creating and developing a Quarkus app
91+
### Creating a new Quarkus app
9292

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.
9494

9595
**Example conversation:**
9696

9797
> **You:** Create a Quarkus REST API with a greeting endpoint and a PostgreSQL database
9898
>
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)_
100102
>
101103
> **You:** Add a `Greeting` entity and a REST endpoint that stores and retrieves greetings
102104
>
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`)_
104106
105107
### Development workflow
106108

107109
The MCP server guides the agent through the optimal Quarkus development workflow:
108110

109111
```
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
127131
```
128132

129133
**Key points:**
130134

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.
135140

136141
### What the agent can do with a running app
137142

138143
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:
139144

140145
| Capability | How to discover | Example |
141146
|-----------|----------------|---------|
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 |
143148
| Configuration | `quarkus/searchTools` query: `config` | View and change config properties |
144149
| Extensions | `quarkus/searchTools` query: `extension` | Add or remove extensions at runtime |
145150
| Endpoints | `quarkus/searchTools` query: `endpoint` | List all REST endpoints and their URLs |
146151
| Dev Services | `quarkus/searchTools` query: `dev-services` | View database URLs, container info |
147152
| Log levels | `quarkus/searchTools` query: `log` | Change log levels at runtime |
148153

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+
149160
### Documentation search
150161

151162
The agent can search Quarkus documentation at any time using `quarkus/searchDocs`. This uses semantic search (BGE embeddings + pgvector) over the full Quarkus documentation.
152163

153164
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.
154165

155-
**Examples of what to ask:**
166+
### Update checking
156167

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
161174

162175
## MCP Tools Reference
163176

164177
### App Creation
165178

166179
| Tool | Description | Parameters |
167180
|------|-------------|------------|
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` |
169194

170195
### Lifecycle Management
171196

@@ -200,17 +225,20 @@ AI Coding Agent (Claude Code, Copilot, Cursor...)
200225
+------------------------------------------+
201226
| Quarkus Agent MCP (always running) |
202227
| |
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 |
206234
| 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)
214242
```
215243

216244
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
245273
## Related Projects
246274

247275
- [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
248278
- [chappie-docling-rag](https://github.com/chappie-bot/chappie-docling-rag) — Builds the pgvector Docker images with pre-indexed Quarkus docs
249279
- [quarkus-mcp-server](https://github.com/quarkiverse/quarkus-mcp-server) — Quarkiverse MCP Server extension used by this project
250280

pom.xml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1414
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1515
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
16-
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
17-
<quarkus.platform.version>3.32.3</quarkus.platform.version>
16+
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
17+
<quarkus.platform.version>999-SNAPSHOT</quarkus.platform.version>
18+
<quarkus-mcp-server.version>1.10.2</quarkus-mcp-server.version>
19+
<langchain4j.version>1.11.0-beta19</langchain4j.version>
1820
<skipITs>true</skipITs>
1921
<surefire-plugin.version>3.5.4</surefire-plugin.version>
2022
<testcontainers.version>1.21.3</testcontainers.version>
@@ -29,38 +31,27 @@
2931
<type>pom</type>
3032
<scope>import</scope>
3133
</dependency>
32-
<dependency>
33-
<groupId>${quarkus.platform.group-id}</groupId>
34-
<artifactId>quarkus-langchain4j-bom</artifactId>
35-
<version>${quarkus.platform.version}</version>
36-
<type>pom</type>
37-
<scope>import</scope>
38-
</dependency>
39-
<dependency>
40-
<groupId>${quarkus.platform.group-id}</groupId>
41-
<artifactId>quarkus-mcp-server-bom</artifactId>
42-
<version>${quarkus.platform.version}</version>
43-
<type>pom</type>
44-
<scope>import</scope>
45-
</dependency>
4634
</dependencies>
4735
</dependencyManagement>
4836

4937
<dependencies>
5038
<dependency>
5139
<groupId>io.quarkiverse.mcp</groupId>
5240
<artifactId>quarkus-mcp-server-stdio</artifactId>
41+
<version>${quarkus-mcp-server.version}</version>
5342
</dependency>
5443
<!-- pgvector embedding store - used directly (not via Quarkus extension)
5544
because the container port is dynamic (Testcontainers) -->
5645
<dependency>
5746
<groupId>dev.langchain4j</groupId>
5847
<artifactId>langchain4j-pgvector</artifactId>
48+
<version>${langchain4j.version}</version>
5949
</dependency>
6050
<!-- BGE Small EN v1.5 embedding model - must match chappie-docling-rag -->
6151
<dependency>
6252
<groupId>dev.langchain4j</groupId>
6353
<artifactId>langchain4j-embeddings-bge-small-en-v15-q</artifactId>
54+
<version>${langchain4j.version}</version>
6455
</dependency>
6556
<dependency>
6657
<groupId>io.quarkus</groupId>

0 commit comments

Comments
 (0)