This server is now a standards-compliant Model Context Protocol (MCP) server. It exposes document generation as an MCP tool, allowing integration with AI hosts (e.g., Copilot, Cursor, Claude Desktop) via the MCP protocol.
generateDocument
— Generate PDF, DOCX, PPTX, or XLSX files from a prompt.src/
app.js
server.js
config/
controllers/
middleware/
public/
routes/
services/
utils/
workers/
temp_image/
validation-screenshots/
test-output/
git clone <repository-url>
cd mcp-server
npm install
.env.example
to .env
and fill in the required values.npm start
npx jest src/services/fileCreation.test.js --runInBand
POST /documents/generate
— Request document generation (PDF, DOCX, PPTX, XLSX)GET /documents/generate/status/:jobId
— Check job statusGET /documents/generate/result/:jobId
— Download generated fileaiFileValidationService
).temp_image/
(e.g., temp_image/blackboard-with-camera-leaf.jpg
).{ name: 'addImage', arguments: { path: 'temp_image/blackboard-with-camera-leaf.jpg', options: { width: 150, height: 150 } } }
npm run build
npm start
Add to your host's mcp.json
(e.g., for Cursor, VS Code, Claude Desktop):
{
"mcpServers": {
"document-server": {
"command": "/usr/local/bin/node",
"args": ["/absolute/path/to/build/index.js"]
}
}
}
You can test this server using the official MCP Inspector:
npx @modelcontextprotocol/inspector node build/index.js
src/index.ts
using the MCP SDK.Contributions are welcome! Please open an issue or submit a pull request.
MIT
This project now follows the official MCP server standards for Node.js/Typescript.
{
"mcpServers": {
"document-server": {
"env": {},
"args": [
"index.js"
],
"command": "node"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.