GitHub Copilot CLI Configuration¶
This guide explains how to configure GitHub Copilot CLI to use the RIDDL MCP Server for AI-assisted domain modeling.
Prerequisites¶
- GitHub Copilot CLI installed (
gh extension install github/gh-copilot) - GitHub Copilot subscription (Individual, Business, or Enterprise)
riddlginstalled and on yourPATH(see Installation):
Installation¶
Install GitHub CLI¶
If you don't have the GitHub CLI installed:
Install Copilot Extension¶
Authenticate¶
Configuration¶
GitHub Copilot CLI launches MCP servers as local processes (stdio transport) via a JSON configuration file.
Configuration File Location¶
| Platform | Path |
|---|---|
| macOS | ~/.config/gh-copilot/mcp-servers.json |
| Windows | %APPDATA%\gh-copilot\mcp-servers.json |
| Linux | ~/.config/gh-copilot/mcp-servers.json |
Adding the RIDDL MCP Server¶
Create or edit the configuration file:
No URL and no API key — Copilot runs riddlg mcp for you. If riddlg isn't
on the system PATH, use its absolute path as the command.
Verify Connection¶
Test the connection with a simple RIDDL validation:
Or in explain mode:
Usage¶
Command Modes¶
| Command | Description |
|---|---|
gh copilot suggest |
Get command or code suggestions |
gh copilot explain |
Explain code, errors, or concepts |
RIDDL-Specific Examples¶
Validate a file:
Explain an error:
Generate from a description:
Pre-Commit Validation¶
Since riddlg is installed, the most reliable pre-commit check calls it
directly rather than going through the assistant:
#!/bin/bash
# .git/hooks/pre-commit
for file in $(git diff --cached --name-only | grep '\.riddl$'); do
echo "Validating $file..."
riddlg validate "$file" || exit 1
done
Troubleshooting¶
MCP Server Not Connecting¶
- Verify
riddlg mcpstarts from a terminal (it waits on stdin) - Check JSON syntax in the configuration file
- If
riddlgisn't found, use its absolute path ascommand
Extension Issues¶
Debug Mode¶
Available RIDDL Tools¶
When connected, Copilot can use these RIDDL tools:
| Tool | Use For |
|---|---|
riddl_validate |
Check RIDDL source for syntax/semantic errors |
riddl_outline |
Summarize a model's definitions |
validate-partial |
Check incomplete models (ignore missing refs) |
check-completeness |
Find missing elements and get suggestions |
check-simulability |
Verify a model is simulation-ready |
map-domain-to-riddl |
Convert natural language to RIDDL |
explain-error |
Get detailed error explanations |
suggest-next |
Get recommendations for next steps |
See MCP Tools for the full catalog of 13.
Related Resources¶
- GitHub Copilot CLI Documentation
- VS Code Copilot Integration - For IDE-based usage
- RIDDL Language Reference