codebyai-mcp-server
Version:
MCP server for converting design files to frontend code
46 lines (29 loc) • 1.12 kB
Markdown
# CodeByAI MCP Server
A Model Context Protocol (MCP) server for converting Sketch and Figma design files to frontend code.
## Tools
### designToCode
Converts Sketch (.sketch) or Figma (.fig) design files to frontend code.
**Parameters:**
- `filePath` (string, required): Local path to the design file
**Returns:**
- Refactored page source code in text format
### openApiFilter
Filter OpenAPI/Swagger interface document and save to new file'
**Parameters:**
- `filePath` (string, required): Local path to the origin openapi file
- `targetPath` (string, required): Local path to the target openapi file after filter
## Logging
The server logs all activities to `logs/codebyai-mcp-YYYY-MM-DD.log`, including:
- Design file upload attempts
- Browser opening success/failure
- Conversion results
- Error details
- Execution times
## Error Handling
The server handles various error scenarios:
- Missing or invalid file paths
- Unsupported file formats
- Network connectivity issues
- Browser opening failures
- Conversion timeouts (5 minutes)
All errors are logged and returned to the calling application.