Dominik Jain
3dc2411130
Extend ExportShapeTool to support the export of image fill content
...
Add new tool parameter `mode` ("shape" or "fill") to support this
Since the fill's format is not guaranteed to be PNG, include dependency
`sharp` to handle image format conversion
Because the export logic has become more complex, introduce
PenpotUtils.exportImage utility function for minimal code to be
sent to the plugin for execution
Resolves #12
2026-01-14 16:15:36 +01:00
Dominik Jain
ec798e0363
Improve docstrings
2026-01-13 21:09:44 +01:00
Dominik Jain
28cad04e50
Remove test code
2026-01-13 20:55:56 +01:00
Dominik Jain
c40fd3aefd
Make MCP server listen address configurable, using localhost by default
2026-01-13 18:13:04 +01:00
Dominik Jain
055f717207
Standardise configuration with environment variables
...
Replace CLI parameters with environment variables, keeping only --multi-user and --help
Environment variables:
- PENPOT_MCP_SERVER_PORT (new, replaces CLI param)
- PENPOT_MCP_WEBSOCKET_PORT (new)
- PENPOT_MCP_REPL_PORT (new)
- PENPOT_MCP_SERVER_ADDRESS (new)
- PENPOT_MCP_REMOTE_MODE (existing)
- PENPOT_MCP_LOG_LEVEL (renamed from LOG_LEVEL, replaces CLI param)
- PENPOT_MCP_LOG_DIR (renamed from LOG_DIR, replaces CLI param)
- PENPOT_MCP_PLUGIN_SERVER_LISTEN_ADDRESS (renamed from PENPOT_MCP_PLUGIN_SERVER_ALLOWED_HOSTS)
Additional changes:
- Plugin now constructs WebSocket URL from server address and port (replaces PENPOT_MCP_WEBSOCKET_URL)
- Use configured server address in all startup log messages
- Document all configuration options in README.md
2026-01-12 22:55:17 +01:00
Dominik Jain
2598a57080
Add new concept of 'remote mode' (configurable via env var)
...
In particular, remote mode disables file system access
2026-01-12 20:51:32 +01:00
Dominik Jain
445cf728b8
In multi-user mode, disable file system access in tools #20
2025-12-16 22:50:10 +01:00
Dominik Jain
3766124961
Introduce MCP server launch argument --multi-user and adjust NPM scripts
...
(adding :multi-user variants) #20
2025-12-16 22:28:02 +01:00
Dominik Jain
66af0d6b72
PluginBridge: Support multi-user mode via user tokens #20
2025-12-16 22:28:02 +01:00
Dominik Jain
df7245cb9d
Support passing a user-specific token to MCP server requests
...
which can subsequently be accessed by downstream calls #20
2025-12-15 13:18:43 +01:00
Dominik Jain
81d6c70f39
Improve logging of tool arguments
2025-11-29 23:02:37 +01:00
Dominik Jain
60acaec396
Enable file logging (writing to mcp-server/logs at info level by default)
2025-11-29 22:38:52 +01:00
Dominik Jain
24ffeac2bf
Move image import code to PenpotUtils
2025-11-14 12:58:04 +01:00
Dominik Jain
f8f440c7dd
Add ImportImageTool
...
Add PenpotUtils.atob to support base64 conversion
(regular atob not available in plugin context)
Resolves #10
2025-11-13 19:09:27 +01:00
Dominik Jain
ef060c4da6
Improve description of ExecuteCodeTool
2025-10-19 23:03:22 +02:00
Dominik Jain
670b0d6b07
Disallow multiple plugin instances being connected in parallel
2025-10-16 19:20:17 +02:00
Dominik Jain
e3a9771f9c
ExecuteCodeTool: Remove redundant preamble for success results
2025-10-16 16:17:00 +02:00
Dominik Jain
6c6204806f
ExportShapeTool: Fix SVG export
2025-10-16 16:17:00 +02:00
Dominik Jain
bc5936365a
REPL: Reuse last input
2025-10-15 17:45:47 +02:00
Dominik Jain
6daede99b2
REPL: Improve style for output number
2025-10-15 17:31:40 +02:00
Dominik Jain
0b9404e2a2
Remove obsolete tool: PrintTextTool
2025-10-11 22:56:57 +02:00
Dominik Jain
4cbce1e009
Remove obsolete tool: HelloWorldTool
2025-10-11 22:56:57 +02:00
Dominik Jain
1bc309fc5a
Provide list of all API types in initial instructions
2025-10-08 00:10:26 +02:00
Dominik Jain
cf5231db66
Improve prompts
2025-10-08 00:10:25 +02:00
Dominik Jain
649506cc9e
Improve ExportShapeTool
...
* Add support for SVG
* Add support for shape identifiers
* Add support for writing result to file
2025-10-08 00:10:25 +02:00
Dominik Jain
afb00f6033
Switch WebSocket port from 8080 to 4402
2025-10-08 00:10:25 +02:00
Dominik Jain
3da2065a18
Establish proper REPL behaviour with history of inputs and outputs
2025-10-08 00:10:25 +02:00
Dominik Jain
3a1494e18c
Move REPL server HTML content to a separate file
2025-10-08 00:10:25 +02:00
Dominik Jain
8552bb4183
Add REPL server
2025-10-08 00:10:25 +02:00
Dominik Jain
ad771ee92f
Add ExportShapeTool
2025-10-08 00:10:25 +02:00
Dominik Jain
223d6d50b0
Improve return type definition of ExecuteCodePluginTask
2025-10-08 00:10:25 +02:00
Dominik Jain
77f4a978be
Add support for image-based tool responses
2025-10-08 00:10:25 +02:00
Dominik Jain
74ff6a12df
Add PenpotApiInfoTool
2025-10-08 00:10:25 +02:00
Dominik Jain
d972e1ed71
Add structured info on Penpot API types and class ApiDocs for its representation
2025-10-08 00:10:25 +02:00
Dominik Jain
5ab14ffb9e
Allow code execution to use the console, returning the full log
2025-10-08 00:10:25 +02:00
Dominik Jain
3d29e42251
Improve prompts
2025-10-08 00:10:25 +02:00
Dominik Jain
bc28e116c8
Add HighLevelOverviewTool
2025-10-08 00:10:25 +02:00
Dominik Jain
b94f29fcf1
Switch from low-level Server to McpServer
2025-10-08 00:10:25 +02:00
Dominik Jain
e0efe2b110
Add initial instructions (loaded from yml file)
2025-10-08 00:10:25 +02:00
Dominik Jain
5ffaabd728
Add code execution tool
2025-10-08 00:09:42 +02:00
Dominik Jain
82bd77c9bc
Replace console logging with a proper logging system (Pino)
2025-09-17 20:07:26 +02:00
Dominik Jain
ee1ee5317e
Fix type parameter issue
2025-09-17 19:52:28 +02:00
Dominik Jain
93e98f5e08
Refactor task handling (adding Task abstraction)
2025-09-17 19:43:21 +02:00
Dominik Jain
23d2270df0
Improve error handling in PluginTask execution
2025-09-12 18:36:13 +02:00
Dominik Jain
736c25ecc2
Refactoring: Separate the plugin bridge (WebSocket server abstraction) from the MCP server
2025-09-12 17:01:32 +02:00
Dominik Jain
48955b67a9
Apply formatter
2025-09-12 16:58:17 +02:00
Dominik Jain
139f77edb2
Split history src/PenpotMcpServer.ts to src/PluginBridge.ts - restore name of source-file
2025-09-12 16:50:11 +02:00
Dominik Jain
8961f90cc9
Split history src/PenpotMcpServer.ts to src/PluginBridge.ts - rename file to target-name
2025-09-12 16:50:10 +02:00
Dominik Jain
b7d1171654
Establish return channel when executing plugin tasks
...
and package 'common' for representations used in both subprojects
2025-09-12 16:42:13 +02:00
Dominik Jain
283f01b0ac
Refactoring: Move every concrete plugin task to a separate source file
2025-09-12 13:41:31 +02:00