Repository navigation
Generate Excel file? #5171
Replies: 5 comments 23 replies
|
Any news on this ? |
|
Any news on this ? |
|
You can try: https://github.com/dvejsada/mcp-ms-office-documents |
|
Hi everyone, I have been working on the same use case discussed here: allowing LibreChat users to generate Word, Excel, PowerPoint, and other files through an MCP server. The I implemented a prototype that integrates the MCP server directly with LibreChat’s file storage. Proposed functionalityAn MCP tool can generate a file on behalf of the current LibreChat user, upload it to LibreChat, and return it as a native downloadable attachment in the chat. The flow is: From the user’s perspective, it works similarly to generated files in ChatGPT: the document appears directly in the conversation and can be downloaded without exposing a separate file server. Security and user isolationThe implementation includes:
LibreChat passes the user context to the MCP server through headers such as: headers:
X-User-Id: "{{LIBRECHAT_USER_ID}}"
X-User-Email: "{{LIBRECHAT_USER_EMAIL}}"The MCP server then uploads the generated file to an internal LibreChat endpoint using a separate service token. MCP artifact responseThe MCP tool returns structured file metadata: {
"result": {
"message": "Document created successfully.",
"file": {
"file_id": "uuid-string",
"filename": "report.xlsx",
"mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"bytes": 12345,
"source": "local"
}
}
}LibreChat recognizes this response and attaches the file to the corresponding assistant message. Why this may be useful upstreamThis would not be limited to Microsoft Office documents. The same mechanism could support any MCP server that generates files, including:
It would provide a standard output path: This is complementary to proposals that allow MCP servers to access files uploaded by users. Together, these capabilities would provide bidirectional file exchange between LibreChat and MCP tools. I already have a working implementation across both LibreChat and the MCP Office Documents server. I would be happy to prepare the changes as an upstream pull request if the maintainers are interested in this approach. Would this architecture be acceptable for LibreChat, or would you prefer generated MCP files to be returned through a different artifact protocol? |
Uh oh!
There was an error while loading. Please reload this page.
On chatgpt.com I can generate Excel files, but when I am trying to do the same in LibreChat I get error:
I can't directly create or send files, including Excel files. However, I can guide you on how to create an Excel file using various tools like Microsoft Excel, Google Sheets, or programming languages like Python. Let me know which method you prefer, and I can provide you with the steps or code to do so.
Currently it is not supported?
All reactions