@iflow-mcp/pxnt-chart-v2
v1.0.0
Published
A Model Context Protocol server for generating charts using recharts, with SVG output
Readme
MCP Chart Server v2 (Node v20.19.2 Fix)
This is a fixed version of the MCP Chart Server to work with Node.js v20.19.2. The original version had issues with ESM module loading in newer Node.js versions, causing an internal assertion error.
Fixed Issues
The following issues were fixed:
- Updated dynamic imports to use
file://URL protocol with absolute paths - Added
.jsextensions to all imports for proper ESM resolution - Added file path utilities (
fileURLToPath,dirname,resolve) for proper module resolution - Removed dynamic import in main index.ts file to avoid ESM loading issues
How to Use
Prerequisites
- Node.js v20.19.2 (as specified in package.json)
Installation
npm installBuild
npm run buildRun
npm run startTesting the Server
You can test the server using:
npm run simple-serverOr with the example:
npm run exampleIf You Still Encounter Issues
If you still encounter ESM module loading issues, you can run the fix script:
chmod +x fix-esm-imports.sh
./fix-esm-imports.sh
npm run buildUsing with LibreChat
This fixed version should now work correctly when integrated with LibreChat using Node.js v20.19.2.
