Skip to content

feat: MCP project methods and connecting from the project manager - #2340

Merged
kpal81xd merged 5 commits into
mainfrom
feat/mcp-project-tools
Oct 13, 2026
Merged

kpal81xd merged 5 commits into
mainfrom
feat/mcp-project-tools

Conversation

@kpal81xd

@kpal81xd kpal81xd commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Refs playcanvas/editor-mcp-server#119

What's Changed

  • MCP project methods: project:list, project:get, project:create, project:update and project:open. They run with the tab's signed-in session, through the existing REST helpers.
  • Only name, description, private and owner (a username) can be set. Any other field is rejected by name. New projects get the same defaults as the New Project dialog. REST errors are passed back as the method's error.
  • project:create waits for the project.create messenger event before it returns. If the event hasn't arrived within 30s, it returns meta.initializing.
  • project:open replies before navigating to /editor/project/:id. The connection has a new flushed(), so the reply isn't lost when the page unloads. It keeps use_local_frontend and use_local_engine, like the Launch button, and the Editor then reconnects on load.
  • The MCP register frame now includes project (the open project id, or null on the blank page). The server uses it to say "no project is open".
  • The blank /editor page has an MCP button in the project manager header, between NEW PROJECT and the user avatar. It loads only the project methods. The connect popover moved out of the toolbar into shared createMcpButton(placement) code.
  • The blank page now loads the localStorage methods, so the connected flag survives navigation.

Server side: playcanvas/editor-mcp-server#120.

Tested end to end

I ran this against playcanvas.com in headless Chrome, using a signed-in test account, use_local_frontend with this branch, and the server branch acting as the agent:

  • The project manager header button connects, and the popover opens below it showing Connected.
  • list_projects returns real projects. On the blank page, get_project and scene tools say that no project is open.
  • create_project returns in about 0.6s and the project appears in the list. update_project and get_project reflect the change.
  • open_project moves the tab into the project and the Editor reconnects with no click (about 1.4s). Scene tools then work, and opening the same project again does nothing.
  • create_project with open: true from inside a project returns in about 1.4s. The project.create event does reach project pages.
  • Going back to /editor, the page reconnects from the saved flag.
  • Errors come through: an unknown owner gives Not Found, the private-project plan limit gives Project limit exceeded, and a missing project gives Not Found.

Manual smoke test

  1. Start with no MCP connection ever saved: clear site data for playcanvas.com. Open playcanvas.com/editor. Expected: an MCP button appears between NEW PROJECT and your avatar.
  2. Click it and press CONNECT with an MCP server running. Expected: the popover opens below the button and shows Connected, and the button turns green.
  3. Ask the agent to list your projects. Expected: it returns your projects.
  4. Ask the agent to open one of them. Expected: the tab moves into that project and the toolbar MCP button shows Connected without a click.
  5. Ask the agent to create a project called "Spinning Cube Demo" and open it. Expected: the project appears in your list and the tab opens it, still connected.
  6. Ask the agent to rename that project. Expected: the new name shows in the project manager.
  7. Ask the agent to set a fork_from or settings field on create. Expected: it is refused, naming the field.
  8. In a project, open the toolbar MCP popover. Expected: it behaves as before: it opens to the right and shows the status, port and CONNECT/DISCONNECT.

Checks

@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
editor Ready Ready Preview Oct 13, 2026 11:07am UTC

Request Review

@kpal81xd
kpal81xd marked this pull request as ready for review October 13, 2026 11:09
@kpal81xd
kpal81xd merged commit 35aed81 into main Oct 13, 2026
9 checks passed
@kpal81xd
kpal81xd deleted the feat/mcp-project-tools branch October 13, 2026 11:21

This branch was successfully deployed

1 active deployment
Preview — 66d2a5d1 Deployed Oct 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: dashboard area: editor interface enhancement New feature or request release: next minor Ticket marked for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant