Commit Graph
58 Commits
Author SHA1 Message Date
Scott Friedmanandyctimlin fe4bf8e787 Fix: Batch endpoint now respects element IDs from MCP server
The batch creation endpoint was always generating new IDs, ignoring IDs
passed from the MCP server. This caused sync issues where the MCP server
would think elements were created with specific IDs, but the canvas had
different IDs.

This fix makes the batch endpoint behave like the single element endpoint:
it now respects passed IDs (for MCP sync) or generates new ones if not provided.

Fixes the 'MCP tool registration issues' mentioned in the roadmap.
2026-01-25 00:29:37 +08:00
yctimlin 381bc98bff refactor: improve type safety in Mermaid integration
- Replace all `any` types with proper Excalidraw types
- Add proper type imports from @excalidraw/excalidraw
- Improve MermaidConversionResult interface with ExcalidrawElement[] and BinaryFiles
- Add mermaidDiagram and config fields to WebSocketMessage interface
- Remove unused ElementBinding interface
- Remove all `as any` type casts throughout App.tsx
- Fix Vite security vulnerability (1 of 6 moderate vulns)

Changes:
- frontend/src/App.tsx: Restored proper TypeScript types, removed 12+ `as any` casts
- frontend/src/utils/mermaidConverter.ts: Added proper return types
- package-lock.json: Updated vite to fix security issue

Remaining security issues:
- 5 moderate vulnerabilities from @excalidraw/mermaid-to-excalidraw dependencies
- These are upstream issues in dompurify, nanoid, and mermaid packages
- No fixes available without major version upgrades
- Risk is acceptable for this use case (diagram rendering)
2025-11-08 00:34:25 +08:00
yctimlinandGitHub 27a7c65b55 Merge pull request #31 from frNNcs/feature/mermaid-integration
Add Mermaid Diagram Integration to MCP Excalidraw
2025-11-07 23:02:26 +08:00
francisco b8e2de76f1 feat: implement WebSocket-based Mermaid conversion with auto-sync
- Add WebSocket message handler for mermaid_convert type
- Make handleWebSocketMessage async to support conversion
- Add automatic backend sync after diagram generation
- Integrate convertMermaidToExcalidraw utility
- Remove test button and handleMermaidTest function
- Fix: Add missing Excalidraw CSS import for proper UI rendering
- Enhance server endpoint with WebSocket broadcast support
- Add mermaid_convert to WebSocketMessageType union
2025-11-01 13:58:23 -03:00
francisco dce247f4d6 fix: resolve TypeScript compilation errors in App.tsx and complete Mermaid test function 2025-11-01 13:58:22 -03:00
francisco 98b7c6ec69 docs: add Mermaid diagram support documentation to README 2025-11-01 13:58:22 -03:00
francisco f8c003db71 feat: add create_from_mermaid MCP tool and frontend integration with test button 2025-11-01 13:58:22 -03:00
francisco c1cecf282c feat: add POST /api/elements/from-mermaid endpoint for Mermaid conversion 2025-11-01 13:58:22 -03:00
francisco daa4431098 feat: add Mermaid conversion types to types.ts 2025-11-01 13:58:22 -03:00
francisco f8c0c85491 feat: add Mermaid to Excalidraw converter utility in frontend 2025-11-01 13:58:22 -03:00
francisco 95e4478d1f feat: install @excalidraw/mermaid-to-excalidraw and mermaid dependencies 2025-11-01 13:58:22 -03:00
yctimlinandGitHub cfb2ada4f4 Merge pull request #30 from yctimlin/docker-update
Docker update
2025-11-01 17:21:12 +08:00
yctimlin 7bb804945b Update Vite configuration to set project root and adjust build output directory 2025-11-01 08:51:35 +00:00
yctimlin 2c510c500d Refactor GitHub Actions workflow to always push Docker images and improve tag handling for pull requests 2025-11-01 07:06:01 +00:00
yctimlin 5fdfed92b6 update ci pipeline 2025-10-31 17:40:52 +00:00
yctimlin 6b0aa01ab0 update pipeline 2025-10-31 17:35:31 +00:00
yctimlin 5d6b8d0033 Add comprehensive GitHub Actions CI/CD workflows and update documentation 2025-10-31 17:00:48 +00:00
yctimlin 4cfe5ce1fc update readme 2025-10-31 16:47:43 +00:00
yctimlin 07f7b20be0 update readme 2025-10-31 16:21:19 +00:00
yctimlin e72dc1e3e0 update docker files 2025-10-31 16:07:51 +00:00
yctimlinandGitHub 5d28ec4256 Merge pull request #28 from kweinmeister/main
feat: add configuration option for log file path
2025-10-20 00:57:44 +08:00
yctimlin 8f8c395858 Fix group_elements to append instead of replace groups 2025-10-18 22:59:31 +08:00
yctimlin cb70a5cc6d Fix group_elements and ungroup_elements operations 2025-10-18 22:23:40 +08:00
Karl Weinmeister b5297cb947 feat: add configuration option for log file path 2025-10-18 07:31:20 -05:00
Gianluca Venturini 4215fffb78 Log metadata in log file 2025-10-12 22:30:28 -07:00
Gianluca Venturini 7411414e42 Fix group_elements and ungroup_elements operations 2025-10-12 22:30:08 -07:00
yctimlinandGitHub 0ac96964fc Merge pull request #25 from ctchen222/docs/readme-figure
docs: set figure aligned
2025-09-22 01:16:22 +08:00
CHENG-TING CHEN 71e94307da fix: set figure aligned 2025-09-19 15:16:21 +08:00
yctimlinandGitHub 2fb5d4686d Merge pull request #21 from yctimlin/dev
Dev
2025-08-20 23:45:47 +08:00
yctimlin 5043a67385 Refactor project structure and enhance TypeScript support
- Updated package.json to point to compiled TypeScript files in the dist directory.
- Improved TypeScript configuration with stricter type checks and removed JavaScript support.
- Migrated frontend entry point to TypeScript and added a new App component with enhanced functionality.
- Implemented a new server structure with TypeScript, including WebSocket support and improved element management.
- Updated README to reflect changes in architecture and usage instructions.
- Added comprehensive type definitions for Excalidraw elements and server responses.
2025-08-20 15:31:42 +00:00
yctimlin fcd3cc077a add docs 2025-08-20 15:04:16 +00:00
yctimlin a07a53c22a update logging messages 2025-08-07 16:11:22 +00:00
songmd b1f2aacfad fix: 优化元素处理逻辑,移除本地存储,直接通过HTTP服务器进行元素的创建、更新和删除操作。更新了前端与后端的同步机制,增强了错误处理和日志记录,确保操作的成功反馈。 2025-08-07 20:34:51 +08:00
songmd 60c8af9ca8 Fix MCP delete/update methods and add frontend sync functionality
- Fix MCP server update_element method parameter parsing issue
- Add comprehensive delete operation debugging and validation
- Implement frontend sync button with real-time status feedback
- Add elements sync API endpoint (/api/elements/sync) for manual synchronization
- Enhance WebSocket message handling with proper element validation
- Add binding validation and cleanup for Excalidraw elements
- Improve error handling and logging throughout the sync process
- Add sync status tracking and user feedback in the UI
2025-08-06 19:55:25 +08:00
yctimlinandGitHub 1831a621ac Merge pull request #13 from PhantomPayne/patch-1
Support windows
2025-07-16 14:23:19 +08:00
Thomas PayneandGitHub 03a381274a Support windows
This fix made it work on windows for me.

based on https://stackoverflow.com/questions/34842738/if-name-main-equivalent-in-javascript-es6-modules/63193714#63193714
2025-07-15 23:33:39 -04:00
yctimlinandGitHub a91a108a0d Merge pull request #11 from yctimlin/dev
Dev
2025-07-12 18:43:16 +08:00
yctimlin 661d343b18 update readme 2025-07-12 10:36:24 +00:00
yctimlin aa605b3bed fix bug of text element 2025-07-12 09:54:18 +00:00
yctimlin 86232d9c94 fix text label bugs 2025-07-12 09:01:51 +00:00
yctimlin afa145bd73 update readme 2025-07-12 07:56:06 +00:00
yctimlin 542e3f149f update dockerfile 2025-07-12 07:38:35 +00:00
yctimlin 898952e359 update version 2025-07-12 06:20:34 +00:00
yctimlin 4f9546de76 Improve frontend error handling in server.js 2025-07-12 05:32:12 +00:00
yctimlin 4acb2e67f8 Enhance build process and add TypeScript configuration
- Update package.json to include separate build scripts for frontend and types, and add a build server script.
- Introduce tsconfig.json for TypeScript configuration, enabling declaration files and source maps.
- Add TypeScript and Node types as development dependencies.
- Include TypeScript declaration files in the package distribution.
2025-07-12 05:18:01 +00:00
yctimlin cb743c6a1e Add MIT License, update project name and description in package.json, enhance README.md with installation instructions, and modify index.js for CLI support
- Introduce LICENSE file with MIT License details.
- Change project name to 'mcp-excalidraw-server' and update description in package.json for clarity on features.
- Revise README.md to include new installation options and usage instructions for the npm package.
- Add shebang to index.js for direct CLI execution.
2025-07-11 19:52:18 +00:00
ycsahara cee3b775bf Update README.md and remove unused files for Excalidraw MCP Canvas
- Revise README.md to reflect the new project name and features, emphasizing real-time diagramming and AI integration.
- Remove outdated public HTML files and CLI script as they are no longer needed.
- Streamline installation and setup instructions for better clarity.
- Enhance architecture overview and key features sections to provide a comprehensive understanding of the system.
2025-07-11 19:31:22 +00:00
ycsahara 11309c731b Refactor project structure and update configurations
- Update .gitignore to include additional build artifacts, logs, and editor files
- Modify package.json scripts for improved development workflow and remove unused scripts
- Change Vite output directory to 'dist' for consistency
- Simplify App.jsx by removing unused state and functions, enhancing readability
- Adjust server.js to serve static files from the new 'dist' directory
2025-07-11 19:31:22 +00:00
ycsahara c5ba87db6e Simplify frontend UI and build system 2025-07-11 19:31:11 +00:00
ycsahara 1be9f3b47b Add frontend React app and server components
- Add React frontend with Excalidraw integration (App.jsx, main.jsx)
- Add Express server with MCP protocol support (server.js)
- Update CLI with new functionality (cli.js)
- Add Vite configuration for frontend build
- Update package.json with new dependencies
- Add public assets and build files
- Update .gitignore to exclude build artifacts
2025-07-11 17:49:07 +00:00