IntelliJ Junie Configuration¶
This guide explains how to configure JetBrains Junie (the autonomous coding agent) to use the RIDDL MCP Server for AI-assisted domain modeling.
What is Junie?¶
Junie is JetBrains' autonomous AI coding agent that can understand your codebase, execute tasks, and make changes across multiple files. With the RIDDL MCP Server connected, Junie gains specialized capabilities for working with RIDDL domain models.
Prerequisites¶
- IntelliJ IDEA with Junie support (MCP requires a recent version)
- Junie enabled in your JetBrains account
riddlginstalled and on yourPATH(see Installation):
Configuration¶
Junie launches MCP servers as local processes (stdio transport).
Settings UI Method¶
- Open Settings (Cmd+, or Ctrl+Alt+S)
- Navigate to Tools > Junie > MCP (or Model Context Protocol)
- Click Add Server and configure:
| Field | Value |
|---|---|
| Name | riddl |
| Command | riddlg |
| Arguments | mcp |
JSON Method¶
Where Junie accepts a JSON server definition, use the standard stdio form:
No URL and no API key are involved. If riddlg isn't on the system PATH,
use its absolute path as the command.
Restart IntelliJ¶
After configuration:
- Close IntelliJ IDEA
- Relaunch IntelliJ IDEA
- Open Junie to verify the RIDDL tools are available
Junie Capabilities with RIDDL¶
Autonomous Tasks¶
Junie can autonomously:
- Validate all RIDDL files in your project
- Fix validation errors across multiple files
- Generate new entities, contexts, or domains
- Refactor RIDDL structures
- Add missing documentation
Example Autonomous Tasks¶
"Validate and fix my RIDDL model" — Junie scans all .riddl files, runs
validation, fixes resolvable errors, and reports issues needing a human
decision.
"Make this model simulation-ready" — Junie runs check-simulability,
identifies missing handlers and state definitions, adds placeholders, and
re-validates until the model is simulation-ready.
Usage Examples¶
Project-Wide Validation¶
Validate all RIDDL files in this project and create a report of any issues
Generate from Requirements¶
Create RIDDL definitions for a subscription management system with monthly and annual plans, automatic renewal, cancellation handling, and usage tracking
Refactoring¶
Move the Payment entity from the Orders context to a new Payments context, updating all references
Error Resolution¶
The validation shows 15 undefined reference errors. Fix them by adding the missing type definitions
Best Practices¶
- Start small: Test Junie with simple RIDDL tasks first
- Review diffs: Always review changes before applying
- Use version control: Commit before running autonomous tasks
- Provide context: Include relevant requirements in your prompts
- Iterate: Break large tasks into smaller, verifiable steps
Troubleshooting¶
Junie Not Available¶
- Verify Junie is enabled in your JetBrains account
- Update to a version with MCP support
MCP Tools Not Working¶
- Restart IntelliJ after configuration
- Verify
riddlg mcpstarts from a terminal (it waits on stdin) - If
riddlgisn't found, use its absolute path as the command - Check Junie logs: View > Tool Windows > Junie > Logs
Available RIDDL Tools¶
| Tool | Use For |
|---|---|
riddl_validate |
Check RIDDL source for errors |
riddl_outline |
Summarize a model's definitions |
validate-partial |
Check incomplete models |
check-completeness |
Find missing elements |
check-simulability |
Verify simulation readiness |
map-domain-to-riddl |
Convert descriptions to RIDDL |
explain-error |
Understand validation errors |
suggest-next |
Get recommendations |
See MCP Tools for the full catalog of 13.