Documents
Welcome
Introducing
Why Misaki Studio
Compare
Start Here
Learn
Workflows
Export & Ship
AI & MCP
What MCP means in Misaki Studio
Connect an agent
Select a project safely
Target files, folders, and elements
Build with prompts
Combine UI and agent work
Review agent activity
Verify agent work
Undo agent changes
UI-to-MCP capability map
Example prompts
MCP limitations
Questions & Answers
Reference
Troubleshooting
Examples

Select a project safely

Every MCP session starts without a selected Misaki Studio project. List the available projects, let the user choose, select the returned project ID, and read the project details before making a project-scoped change.

Why selection is explicit

The MCP server keeps one selected project context for each connection session. Project-scoped tools refuse to run without it and return:

No project selected. Call list-projects first, then select-project.

The MCP selection is independent of the project visible in the desktop editor. Switching the editor window does not silently retarget the agent, and selecting a project through MCP does not navigate the visible UI to it.

This separation prevents ordinary UI navigation from redirecting an in-progress agent task, but it makes the project name and ID part of every safe prompt.

The read-first sequence

1. List projects

Call list-projects. It uses the currently selected local profile, or the first local profile when none is marked selected, and returns project names with their IDs.

If there is no local profile, create or sign in to one in the desktop application. If there are no projects, create one deliberately in the UI or through create-project; a missing project is not permission to create one automatically.

2. Let the user choose

Do not infer the intended project from whichever project is open on screen, a recently used file name, or a similar project name. Show the returned choices when the user has not already named an unambiguous project.

3. Select the returned ID

Call select-project with the project ID returned by list-projects. A successful result names the selected project.

Selecting a different project in the same MCP session replaces the previous context and shuts down that session's previous project model. References for the old project must not be reused against the new selection.

4. Confirm the project tree

Call get-project-details. It returns the selected project's name, description, and full folder/file tree, including UUIDs for both files and folders.

This read is the best confirmation before a file operation because it reveals the actual current paths and distinguishes a file from a folder. For visual Pages, Components, and Mockups, list-design-files provides a shorter editable-design list with UUID, name, and path.

A safe prompt

Connect to Misaki Studio and call list-projects. Select the project named Website only if that exact project is present; otherwise stop and show me the choices. After selecting it, call get-project-details and summarize the tree. Do not create, rename, move, duplicate, convert, export, publish, or delete anything.

The stopping condition matters. It prevents a convenient but incorrect fallback to a similarly named project.

Session changes and recovery

Project selection belongs to the MCP session, not permanently to the project or client configuration.

Re-list and reselect when:

  • the MCP client reconnects or starts a new session;

  • the server restarts or hot reloads;

  • a project-specific tool reports that no project is selected;

  • the selected project was deleted or is no longer available;

  • a pasted reference names a different project;

  • you intentionally move the task to another project.

If a write fails after a session interruption, reselect the project and read the target again before retrying. Do not assume the failed call was rolled back or that a repeated call is safe.

Project references do not auto-switch context

A copied file or element reference can contain a project name, for example:

Project(Website)→File(components/molecules/FeatureCard)

The server checks that name against the selected project. If they differ, it refuses the reference and tells the caller to select the correct project. It does not silently switch projects, because silently retargeting a write would be unsafe.

A Project(...) segment by itself is not a target and cannot replace list-projects plus select-project.

UI and MCP relationship

Coverage: UI + MCP for choosing project data; different session state.

The Dashboard and project menu choose what the person sees. select-project chooses what one MCP session addresses. They may intentionally differ, so use the project name shown in MCP results when checking the agent's work.

On this page
Select a project safely
Why selection is explicit
The read-first sequence
1. List projects
2. Let the user choose
3. Select the returned ID
4. Confirm the project tree
A safe prompt
Session changes and recovery
Project references do not auto-switch context
UI and MCP relationship