article
README
🚀 mcp-excel-server
mcp-excel-server 是一个基于 Spring AI MCP 框架开发的项目。它借助 MCP 协议,为大语言模型(LLM)赋予了对本地 Excel 文件进行读取和写入的能力。这使得 AI 能够像人类一样调用本地工具,突破静态知识库的限制,实现动态交互。
🚀 快速开始
mcp-excel-server 借助 MCP 协议,让大语言模型能够对本地 Excel 文件进行读写操作,实现与本地工具的动态交互。
✨ 主要特性
- Excel 文件读取:能够读取本地 Excel 文件(支持 .xlsx 和 .xls 格式),并将内容以 JSON 格式返回。
- Excel 文件写入:可以把 JSON 数据写入到指定的本地 Excel 文件中。
- 与 LLM 集成:可与支持 MCP 协议的 LLM 客户端集成,如 Claude、Cursor 和 Cherry Studio 等。
📦 安装指南
环境要求
Java 17 及以上
安装步骤
第一步:执行下列命令打包:
mvn clean package -Dmaven.test.skip=true
第二步:配置 MCP Server
{
"mcpServers": {
"AUM5itYnoMcxPiU2vFa3Z": {
"name": "Excel操作",
"type": "stdio",
"description": "",
"isActive": true,
"command": "java",
"args": [
"-Dspring.ai.mcp.server.stdio=true",
"-Dspring.main.web-application-type=none",
"-Dfile.encoding=UTF-8",
"-jar",
"{your_path}/mcp-excel-server-0.0.1-SNAPSHOT.jar"
]
}
}
}
💻 使用示例
功能演示
order.xlsx:
生成的结果:

扫码加入微信群