mps-project-management
Skill1.7k starsChanged 2 months agoApache-2.0View on GitHub
Open an MPS project in a running or freshly started MPS instance when MCP tools fail because no project is open (welcome screen), close an open project with `mps_mcp_close_project`, or create a new empty MPS project headlessly. Covers MPS built from sources vs a standalone install, detecting which case you are in, macOS/Linux/Windows CLI activation, close timeout / force-close recovery, and empty project creation file templates. Use when `mps_mcp_*` is rejected with empty `Currently open projects`, when MPS shows the welcome screen, when an agent must open a project via the command line, when creating a new empty MPS project, or when closing a project.
Trending
Quiet since October.thin dataabout the whole repository
Who's talking about JetBrains/MPS
- mbeddr/mps-gradle-plugin“Null pointer exception on generate”GitHub · May 18, 2020 · 1 reactions
- nebojsa-vuksic/skill-atlas“Scan every repository of an organization or user”GitHub · Oct 1, 2026
- modelix/modelix.editor“Implement MPS shortcuts”GitHub · Feb 21, 2023
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
In this repository83 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- actionsSkill
- bugfix-workflowSkill
- code-styleSkill
- commitsSkill
- debuggingSkill
- mps-aspect-accessoriesSkill
- mps-aspect-actionsSkill
- mps-aspect-behaviorSkill
- mps-aspect-constraintsSkill
- mps-aspect-dataflowSkill
- mps-aspect-editor-menus-and-keymapsSkill
- mps-aspect-editorSkill
- mps-aspect-generation-planSkill
- mps-aspect-generatorSkill
- mps-aspect-intentionsSkill
- mps-aspect-migrationsSkill
- mps-aspect-structure-conceptsSkill
- mps-aspect-textgenSkill
- mps-aspect-typesystemSkill
- mps-baselanguageSkill
- mps-build-languageSkill
- mps-consoleSkill
- mps-distribution-buildSkill
- mps-dsl-memorySkill
- mps-ide-pluginSkill
- mps-lang-core-xmlSkill
- mps-language-analysisSkill
- mps-language-aspects-overviewSkill
- mps-language-inheritanceSkill
- mps-language-modularitySkill
- mps-mcp-workflowSkill
- mps-model-manipulationSkill
- mps-node-editingSkill
- mps-quotationsSkill
- mps-run-configurationsSkill
- mps-testsSkill
- registrySkill
- skill-optimization-studySkill
- ssrSkill
- teamcity-cliSkill
- actionsSkill
- bugfix-workflowSkill
- code-styleSkill
- commitsSkill
- debuggingSkill
- mps-aspect-accessoriesSkill
- mps-aspect-actionsSkill
- mps-aspect-behaviorSkill
- mps-aspect-constraintsSkill
- mps-aspect-dataflowSkill
- mps-aspect-editor-menus-and-keymapsSkill
- mps-aspect-editorSkill
- mps-aspect-generation-planSkill
- mps-aspect-generatorSkill
- mps-aspect-intentionsSkill
- mps-aspect-migrationsSkill
- mps-aspect-structure-conceptsSkill
- mps-aspect-textgenSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 0 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
A
MODAL_BLOCKEDclose is not a closed project: Ask the user to dismiss the MPS dialog, then retry mps_mcp_close_project. - Very specific: line 35
Use mps_mcp_close_project to close the project selected by the host's projectPath.
- Very specific: line 39
Do not wait past 20 seconds: If the tool returns ok:false with code: MODAL_BLOCKED, a modal dialog is likely open in MPS (Save, …
- Very specific: line 43
If several projects are open, list them and pass the intended mpsProjectBaseDirectory as projectPath.
- Very specific: line 44
Call mps_mcp_close_project with the default force=false.
- Very specific: line 46
If the close was cancelled (the project remains open): ask the user to complete the dialog, or retry with force=true.
- Very specific: line 47
If code: MODAL_BLOCKED: ask the user to close the blocking dialog, then retry.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Opening and closing an MPS project for MCP
Loading companion skills
Companion names in this skill are lazy dependencies: load only those relevant to the current task. If this skill came from an MCP server, use the host's skill loader to resolve the companion's unique discovered entry URI on the same host-assigned originating server. If the host has no server-backed skill loader, stop and report that limitation; do not silently fall back to a filesystem copy. If this skill came from a filesystem catalog, load the named sibling from that same catalog at <skills-root>/<skill-name>/SKILL.md, even if remote skill loaders are also available. Do not invent a tool name or server endpoint.
There is no MCP tool that can open a project. The IntelliJ MCP server rejects every tool call — including mps_mcp_list_open_projects — before dispatch unless some already-open IDE Project matches projectPath. On the welcome screen that set is empty, so MCP cannot help. The workaround is the platform CLI: pass the project directory to a second MPS process that shares the first instance's config/system directories. DirectoryLock activates the running IDE; the second process should exit in a few seconds.
Critical Directives
- Empty
Currently open projects: {"projects":[]}means the welcome screen, not a bad path. Do not retry MCP with a guessedprojectPath. Open the project via CLI first. - Detect source-vs-standalone before choosing a command.
open -a MPS.appwill not talk to an MPS started asjetbrains.mps.Launcherfrom a checkout. Reconstructing a JVM command is the wrong move for a standalone.app/mps.sh/mps64.exe. - Match
idea.paths.selector(and any explicit config/system dirs).MPS (2nd inst.)uses a different selector and starts a real second IDE. Seereferences/detect-source-vs-standalone.md. - Do not split process command lines on spaces. Classpaths often contain
IntelliJ IDEA.apporProgram Files. Preferjcmd PID VM.command_line(or/proc/PID/cmdlineon Linux). When activating an already-running instance, strip-agentlib:jdwpand the IntelliJidea_rt.jarjavaagent. java_commandfromjcmd VM.command_lineis"<main-class> [args]". Use only the first token as the main class. If MPS was itself started with a project path, the field isjetbrains.mps.Launcher /path/to/previous/project; passing it whole dies withClassNotFoundException.- Do not write helper scripts or
jcmddumps into the checkout. Use$TMPDIR/%TEMP%only. - A
MODAL_BLOCKEDclose is not a closed project. Ask the user to dismiss the MPS dialog, then retrymps_mcp_close_project. Useforce=trueonly after a timed-out or cancelled close.
Workflow
- Confirm the rejection is the empty-project gate — open
references/why-mcp-cannot-open.mdif the error text is unfamiliar. - Find the running MPS process and classify it (from sources vs standalone). Open
references/detect-source-vs-standalone.md. If nothing is running, start MPS with the project path instead of activating. - Open the project with the matching recipe in
references/open-via-cli.md, then the OS file:references/examples-macos.md,references/examples-linux.md, orreferences/examples-windows.md. - The second process must exit. A few seconds is normal; if it stays up, you started a new IDE — stop and re-check the selector.
- Retry
mps_mcp_list_open_projectswithprojectPathset to the directory you opened. Then use that path on every latermps_mcp_*call.
Closing a project
Use mps_mcp_close_project to close the project selected by the host's projectPath. Opening still has no MCP tool — after the last project closes, MPS typically returns to the Welcome screen and you must reopen via CLI (the workflow above).
- Select the target project. The path must be at or inside that open project, never an ancestor such as the repository root. When several projects are open, call
mps_mcp_list_open_projectsfirst and pass the intended project'smpsProjectBaseDirectoryasprojectPath. - A normal close may show dialogs. It saves documents and runs can-close checks. Save / confirmation dialogs block the call until they are dismissed.
- Do not wait past 20 seconds. If the tool returns
ok:falsewithcode: MODAL_BLOCKED, a modal dialog is likely open in MPS (Save, confirmation, Find Usages, Search, etc.). Ask the user to close that dialog manually, then retry. Do not assume the project closed. - Prefer
force=false. Passforce=trueonly after a previous close timed out or was cancelled on a confirmation dialog. Force-close skips the save/can-close dialogs this close would show (unsaved editor changes are discarded) and does not wait for an already-open unrelated modal. - Shut down MPS with
shutdownWithLastProject=true. When asking MPS to close a project, it can also be instructed in the same MCP call to shut down, if MPS sees no other open projects (it checks for open projects itself, no need to check yourself). When MPS is displaying the welcome screen (no projects are open), it cannot be shut down via MCP. A modal confirmation dialog may (if configured) prevent MPS from shutting down.
- If several projects are open, list them and pass the intended
mpsProjectBaseDirectoryasprojectPath. - Call
mps_mcp_close_projectwith the defaultforce=false. - On
{ok:true, data.closed:true}, stop. Closing the last project is expected to leave the Welcome screen. - If the close was cancelled (the project remains open): ask the user to complete the dialog, or retry with
force=true. - If
code: MODAL_BLOCKED: ask the user to close the blocking dialog, then retry. Useforce=trueonly to skip save/confirmation dialogs that this close itself would show.
Creating a new empty project
There is no MCP tool to create a new MPS project. To create a new empty project headlessly, write the minimal project descriptor files directly on disk: create the project root directory containing .mps/modules.xml (empty MPSProject), .mps/.gitignore, and .mps/migration.xml. Then open the directory in MPS via the CLI activation workflow above. migration.xml is the one file whose content is MPS-version-specific: generate it from the MPS installation that will open the project — never hardcode migration ids from memory and never reuse a file written for another MPS version, or the modal Migration Assistant blocks every mps_mcp_* call on first open.
See references/create-empty-project.md for file templates and instructions.
Scripts
scripts/new_project_migration_xml.py — builds the .mps/migration.xml of a new empty project from
the MPS that will open it (install directory, macOS .app, or source checkout), offline: no running
MPS and no existing project to copy from. Needed for every MPS other than 2026.2, whose file
references/create-empty-project.md gives verbatim.
python3 scripts/new_project_migration_xml.py "/Applications/MPS 2025.3.app" /path/to/new/project
baseline 253 from MPS-253.29346.537 (/Applications/MPS 2025.3.app/Contents/Resources/build.txt)
243 jetbrains.mps.ide.mpsmigration.v_2024_3.LangResourceImport4Migration -
<?xml version="1.0" encoding="UTF-8"?>
...Related Skills
mps-mcp-workflow— once a project is open, this is the entry point for model and language work.mps-run-configurations— running DSL roots inside an already-open project, not launching MPS itself.
Reference Index
- Open
references/why-mcp-cannot-open.mdwhen diagnosing welcome-screen MCP rejections. - Open
references/detect-source-vs-standalone.mdto classify the running process. - Open
references/open-via-cli.mdfor the activation protocol (what to keep, what to strip, success criteria). - Open
references/examples-macos.md,references/examples-linux.md, orreferences/examples-windows.mdfor copy-paste commands. - Open
references/create-empty-project.mdfor file templates and instructions on creating a new empty MPS project. - Open
references/derive-migration-xml.mdwhen that project will be opened by an MPS other than 2026.2, to generate.mps/migration.xmlfor that release.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

