Commit Graph

65 Commits

Author SHA1 Message Date
Dominik Jain
c9d9e493e7 🎉 Prepare npm package for MCP server (#8473)
* 🎉 Prepare npm package for MCP server

* 🐛 Re-establish Windows compatibility of MCP server build script

Use node instead of cp to copy files

*  Set version for MCP npm tarball based on git tag

* Add scripts/set-version to set the version in package.json
  based on git describe information
* Add scripts/pack to perform the packaging
2026-03-04 08:41:28 +01:00
Dominik Jain
b587e2e8ec MCP: Improve Streamable HTTP session handling & logging (#8493)
*  Reintroduce proper session management for /mcp endpoint

Reuse transport and server instance based on session ID in header

*  Periodically clean up stale streamable HTTP sessions

Add class StreamableSession to improve type clarity

*  Avoid recreation of objects when instantiating McpServer instances

Precompute the initial instructions and all tool-related data

*  Improve logging of tool executions
2026-03-02 11:27:13 +01:00
Dominik Jain
8882f18db4 🚑 Fix multi-user mode MCP connections
Previously, only the latest streamable HTTP connection was operational
2026-02-26 17:39:33 +01:00
Luis de Dios
b5874b365b Merge pull request #8414 from oraios/mcp-dev-latest
 Update MCP server to account for recent API changes & general improvements
2026-02-26 13:18:19 +01:00
alonso.torres
701443c3d7 Add disconnect to MCP plugin 2026-02-25 13:16:56 +01:00
Dominik Jain
0974bca2c0 Improve instructions on writable shape properties 2026-02-25 12:49:26 +01:00
Dominik Jain
927455926f 📎 Update Serena project file 2026-02-25 12:48:38 +01:00
Dominik Jain
4e577d37b8 Add information on the usage of component variants 2026-02-23 21:37:55 +01:00
Dominik Jain
40fb4edc4a PenpotUtils: Update isContainedIn to use textBounds, adding getBounds
Follow-up to https://github.com/penpot/penpot-mcp/issues/30
2026-02-23 17:27:25 +01:00
Dominik Jain
e305ad1fa8 Update MCP instructions to mention new textBounds property
Follow-up to https://github.com/penpot/penpot-mcp/issues/30
2026-02-23 17:25:27 +01:00
Dominik Jain
f43de05d3d Remove workaround for atob function being unavailable
Follow-up to https://github.com/penpot/penpot-mcp/issues/17
2026-02-19 17:06:36 +01:00
Dominik Jain
d019972bca Account for Token.resolvedValue now being implemented
Update MCP instructions, removing workaround for #8341
2026-02-19 17:06:36 +01:00
Dominik Jain
7fceb92673 Apply naturalChildOrdering, removing workarounds
Set the flag to true during code execution, resetting it to the
original value afterwards.

If the flag is unavailable, issue an error message, which is passed
on to the user via the LLM.

Remove instructions that served to work around the corresponding
issues:
 * https://github.com/penpot/penpot-mcp/issues/28
 * https://github.com/penpot/penpot-mcp/issues/32
2026-02-19 17:06:36 +01:00
Dominik Jain
426053ac17 Update API type information for the MCP server
This resolves https://github.com/penpot/penpot-mcp/issues/31
2026-02-19 16:22:10 +01:00
Dominik Jain
a5da7ceb2f Update TokenProperty values in system prompt
Update based on changes to camelCase.
See https://github.com/penpot/penpot-mcp/issues/38
2026-02-19 16:21:58 +01:00
Dominik Jain
a7e3e78e0c Update Serena overview memory and initial instructions 2026-02-19 16:21:49 +01:00
Luis de Dios
a82cf34d35 Merge pull request #8415 from oraios/mcp-prod
 MCP changes to improve handling of use cases 2 & 3
2026-02-19 16:01:10 +01:00
Luis de Dios
21a1320f16 Revert " MCP changes to improve handling of use cases 2 & 3 (#8369)"
This reverts commit 0a54d25d5a.
2026-02-19 14:46:44 +01:00
Dominik Jain
0a54d25d5a MCP changes to improve handling of use cases 2 & 3 (#8369)
* 📎 Fix spelling errors

* 🚧 Temporary workaround for sizing options not working

Add instructions explaining that FlexLayout sizing options do not work.
Relates to https://github.com/penpot/penpot-mcp/issues/39

* 🚧 Temporary workaround for Token resolvedValue not working

Instruct LLM to not use this property.
To be reverted once #8341 is fixed.

*  Improve description of token values

*  Make clear that ExecuteCodeTool serialises automatically

LLMs sometimes decide to apply serialisation themselves, which is unnecessary,
and which this seeks to prevent.

* 🚧 Temporary workaround for fills/strokes being read-only

Add instructions to make the limintations.
Once #8357 is resolved, this can be reverted.

* ♻️ Move high-level instructions to the end

In this way, they can reasonably reference the more low-level concepts

* 📚 Add instructions on cloning and the branch to use

* 📚 Revise instructions on prerequisites

* Do not state that pnpm must be available after Node.js installation
  (it is installed by corepack)
* Do not state that caddy is required; it is required only when
  rebuilding the API documentation for the server, which is not
  a task relevant to regular users.
* Do not strongly suggest that MCP users should be using the devenv.
* Windows: Add pointer to use Git Bash

* 📚 Remove unnecessary details on what the boostrap script does

* 📚 Update information on repository structure

* 📚 Add section on 'Development' to README
2026-02-19 14:29:07 +01:00
alonso.torres
03d0c62de1 🐛 Send a keep alive message in websocket connection 2026-02-19 10:26:51 +01:00
Dominik Jain
7cf88359fa 📚 Add section on 'Development' to README 2026-02-18 20:22:34 +01:00
Dominik Jain
ea4c6c3998 📚 Update information on repository structure 2026-02-18 20:17:05 +01:00
Dominik Jain
f8dd02169c 📚 Remove unnecessary details on what the boostrap script does 2026-02-18 11:14:21 +01:00
Dominik Jain
ebdae2cf65 📚 Revise instructions on prerequisites
* Do not state that pnpm must be available after Node.js installation
  (it is installed by corepack)
* Do not state that caddy is required; it is required only when
  rebuilding the API documentation for the server, which is not
  a task relevant to regular users.
* Do not strongly suggest that MCP users should be using the devenv.
* Windows: Add pointer to use Git Bash
2026-02-18 11:11:25 +01:00
Dominik Jain
79d3469f36 📚 Add instructions on cloning and the branch to use 2026-02-18 10:56:21 +01:00
Andrey Antukh
942da56e78 Merge branch 'staging-render' into develop 2026-02-17 21:56:54 +01:00
Andrey Antukh
8eb5bd3dd8 🔧 Add minor adjustments to mcp build-types script 2026-02-17 17:42:39 +01:00
Andrey Antukh
5718698bff Update mcp api_types.yml file with latest plugins doc updates 2026-02-17 17:42:39 +01:00
Dominik Jain
6a49b5df8c ♻️ Move high-level instructions to the end
In this way, they can reasonably reference the more low-level concepts
2026-02-17 13:16:21 +01:00
Dominik Jain
141847585e 🚧 Temporary workaround for fills/strokes being read-only
Add instructions to make the limintations.
Once #8357 is resolved, this can be reverted.
2026-02-17 12:51:48 +01:00
Alonso Torres
c32a336c50 🎉 Add MCP plugin embedded execution (#8368)
*  Add core changes for mcp server

*  Changes to plugins-runtime to add mcp extensions

*  Changes to MCP plugin

*  Changes post-review and ci fixes
2026-02-17 09:18:46 +01:00
Dominik Jain
7a52550889 Make clear that ExecuteCodeTool serialises automatically
LLMs sometimes decide to apply serialisation themselves, which is unnecessary,
and which this seeks to prevent.
2026-02-15 22:20:38 +01:00
Dominik Jain
08fc6fe917 Improve description of token values 2026-02-12 17:45:50 +01:00
Dominik Jain
926d573d3e 🚧 Temporary workaround for Token resolvedValue not working
Instruct LLM to not use this property.
To be reverted once #8341 is fixed.
2026-02-12 17:24:44 +01:00
Dominik Jain
bac04f8a73 🚧 Temporary workaround for sizing options not working
Add instructions explaining that FlexLayout sizing options do not work.
Relates to https://github.com/penpot/penpot-mcp/issues/39
2026-02-12 12:37:24 +01:00
Dominik Jain
b4e815e787 📎 Fix spelling errors 2026-02-12 12:36:51 +01:00
Dominik Jain
7eb9a207f5 Change PenpotUtils.findShapes to search on all pages by default
This matches the behaviour of findShape, more closely aligning with
the LLM's expectations (given the lack of concrete information in
the instructions)
2026-02-11 11:35:10 +01:00
Dominik Jain
8ac17604fd Improve information on component instances
* Add information on detachment
* Add information on remove behaviour in component instances
2026-02-11 11:35:10 +01:00
Dominik Jain
f5afcde0de Improve shapeStructure
* Add information on component instance (component id, name; main instance id)
* Improve JSON result order (children should come last)
2026-02-11 10:45:22 +01:00
Dominik Jain
b6dfdc23cd Update information on TokenProperty 2026-02-11 10:45:22 +01:00
Dominik Jain
a5a084cf0f Update API type information based on current repo state 2026-02-11 10:45:22 +01:00
Dominik Jain
1546025814 Avoid certain <ul> elements with single <li> generating bullets 2026-02-11 10:45:22 +01:00
Dominik Jain
8de510d1c6 🐛 Fix PenpotAPIDocsProcessor not requiring the url parameter
* Add additional constant for the PROD url
* Adapt the debug function to use a URL
* Improve logging
2026-02-11 10:45:10 +01:00
Dominik Jain
76289df32c Establish compatibility with new member anchors (h3 instead of a tag) 2026-02-10 14:03:40 +01:00
Dominik Jain
a674b5f914 📚 Add instructions on running only the docs server 2026-02-10 12:53:20 +01:00
Dominik Jain
71507fb9b7 ♻️ Adjust ConfigurationLoader to use markdown file instead of yml 2026-02-10 12:35:44 +01:00
Dominik Jain
024aedc3ca ♻️ Convert prompt content to markdown format 2026-02-10 12:35:44 +01:00
Dominik Jain
44657c95df ♻️ Rename prompts.yml -> initial_instructions.md 2026-02-10 12:35:44 +01:00
Dominik Jain
d4d5009a3d Improve prompts on token application 2026-02-10 12:35:44 +01:00
Dominik Jain
bb4d0322d8 🚧 Temporarily add ts-ignore statements
This shall be reverted once the new API types are published
2026-02-10 12:35:44 +01:00