jhipster-mcp
v1.0.0
Published
MCP server that lets AI agents drive the JHipster CLI
Maintainers
Readme
jhipster-mcp
A Model Context Protocol (MCP) server that lets AI agents — Claude Code, Claude Desktop, Cursor, or any MCP-compatible host — drive the JHipster CLI to scaffold and evolve applications using JDL (JHipster Domain Language).
You describe the app or change you want; the agent translates it to JDL, validates it, and runs JHipster — while this server keeps every run non-interactive, sandboxed to a directory you name, and safe to preview before it writes.
📖 Documentation
Full user guide → docs/. If you know JHipster but are new to MCP, start there and read in order:
- Introduction — what an MCP server is, and the tools / resources / prompts model.
- Installation — connect it to your host.
- Getting started — your first guided session.
- Tools reference · 5. Resources · 6. Prompts
- How the server manages context
- Advanced usage & customization
- How it works (engine)
Roadmap: docs/ROADMAP.md.
Quick start
Prerequisites: Node.js 20+ and a working global jhipster CLI on your PATH (npm install -g generator-jhipster). The server spawns your existing jhipster binary — it does not bundle the generator. Full details in Installation.
Claude Code
claude mcp add jhipster -- npx -y jhipster-mcpClaude Desktop / Cursor / other hosts
Add this to your host's MCP config (e.g. claude_desktop_config.json), then restart:
{
"mcpServers": {
"jhipster": {
"command": "npx",
"args": ["-y", "jhipster-mcp"]
}
}
}Then ask your host something like "Create a JHipster monolith in /tmp/demo with a Product entity." See Getting started for a full walkthrough and more examples.
What's inside (at a glance)
- 13 tools —
validate_jdl,create_app_from_jdl,import_jdl,add_entity,add_relationship,set_option,info,project_commands,upgrade_advisor,preview_upgrade,generate_ci_cd,generate_deployment,run_jhipster. (reference) - Resources — the JDL grammar plus live project state (
yo-rc,entities, exportedjdl). (reference) - Prompts —
scaffold_crud_monolith,add_audit_fields,monolith_to_microservices. (reference) - Safe by design — directory scoping, empty-dir guard, no shell, JDL-injection guards, and isolated preview/
dryRun. (details)
Development
npm run dev # tsup --watch
npm run typecheck # tsc --noEmit
npm run build # tsup → dist/index.js
npm test # node --test + tsx
npm run test:watch # tests in watch modeCI runs typecheck, build, and tests on every push/PR to main via .github/workflows/ci.yml across Node 20/22/24 on Ubuntu and macOS. Architecture and conventions for contributors live in CLAUDE.md; the engine is also documented for users in docs/09-how-it-works.md.
Quick smoke test (lists tools over stdio):
(cat <<'EOF'
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}
{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
EOF
) | node dist/index.jsReleasing
The GitHub Release tag is the single source of truth for the version. Everything derives from it:
- The release workflow (.github/workflows/release.yml) reads the tag (e.g.
v0.0.3), strips thev, and setspackage.jsonto that version before building and publishing. - The MCP server reports
pkg.versionat runtime (src/index.ts importspackage.json, inlined at build) — so the published npm version, the tag, and the runtime version are always identical.
To cut a release:
- On GitHub, go to Releases → Draft a new release.
- Create a new tag named
vX.Y.Z(semver,v-prefixed) targetingmain, fill in the notes, and Publish release.
Publishing the release fires the release: published event, which triggers the workflow to:
- check out the release tag and set
package.jsontoX.Y.Z, - run build + test,
- publish to npm via Trusted Publishing (OIDC) — no
NPM_TOKENsecret; provenance is generated automatically (requires the Trusted Publisher to be configured on npmjs.com for this repo + workflow, and npm ≥ 11.5.1, which the workflow installs).
You don't need to bump package.json in a commit beforehand — the workflow forces it to match the tag. (Optionally keep main's package.json in step with npm version --no-git-tag-version X.Y.Z so local dev reports the right version, but it isn't required for publishing.)
License
Licensed under the Apache License, Version 2.0.
