HM

haris-musa/excel-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

4271 stars 478 forks 质量 95 趋势 50MIT

一个用于Excel文件操作的模型上下文协议服务器

概览

一款模型上下文协议(MCP)服务器,允许您在无需安装 Microsoft Excel 的情况下操作 Excel 文件。使用您的 AI 代理创建、阅读和修改 Excel 工作簿。 - 📊 : 创建、阅读、更新工作簿和工作表 - 📈 : 公式、格式、图表、透视表和 Excel 表格 - 🔍 : 内置范围、公式和数据完整性验证 - 🎨 : 字体样式、颜色、边框、对齐和条件格式 - 📋 : 创建和管理带有自定义样式的 Excel 表格 - 📊 : 生成多种图表类型(行、条形、饼、散点等) - 🔄 : 创建动态数据透视表用于数据分析 - 🔧 : 轻松复制、重命名、删除工作表 - 🔌 : stdio、SSE(已弃用)和可流式 HTTP - 🌐 : 本地和远程服务均可运行 服务器支持三种传输方式: 当服务器运行时,你 。该变量告诉服务器在哪里读写 Excel 文件。- 如果未设置,默认为 ./excel_files。

概述(AI 翻译)

一个开源的模型上下文协议(MCP)服务器,允许 Claude、Cursor、VS Code Copilot、Codex 及其他 AI 客户端可以创建、读取和编辑 Excel 文件: 图表、数据透视表、公式、表格等。它基于openpyxl构建,无需Microsoft Excel,并且能在Windows、macOS和Linux上运行。

安装并试用,可以到 excelmcpserver.com,或者看看 下面是快速入门。

特色

图表和透视表

  • 用AI创建Excel图表:柱、条、线、面积、饼、甜甜圈、雷达、散点和 气泡,包含组合、次要轴、趋势线和误差条
  • Excel 2016 图表类型:瀑布图、直方图、帕累托图、方框图、树状图、日落图 以及漏斗
  • Excel 会刷新的真实数据分析表(分组、计算字段、“显示值为”, 布局、筛选器),以及用于数据透视表和表格的切片器和时间线
  • 火花线(线、列、胜负)

公式与动态数组

  • 公式由内置引擎无需Excel计算(约260个函数,已检查) 对比于实际Excel中记录的2500多个公式),因此read_range返回数值 对于那些从未在Excel中打开过的文件

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Excel MCP Server

An open-source Model Context Protocol (MCP) server that lets Claude, Cursor, VS Code Copilot, Codex and other AI clients create, read and edit Excel files: charts, PivotTables, formulas, tables and more. It is built on openpyxl, needs no Microsoft Excel, and runs on Windows, macOS and Linux.

Install and try it at excelmcpserver.com, or see Quick start below.

Features

Charts and PivotTables

  • Create Excel charts with AI: column, bar, line, area, pie, doughnut, radar, scatter and bubble, with combos, secondary axes, trendlines and error bars
  • The Excel 2016 chart types: waterfall, histogram, Pareto, box and whisker, treemap, sunburst and funnel
  • Real PivotTables that Excel refreshes (grouping, calculated fields, “show values as”, layouts, filters), plus slicers and timelines for PivotTables and tables
  • Sparklines (line, column, win/loss)

Formulas and dynamic arrays

  • Formulas are calculated without Excel by a built-in engine (about 260 functions, checked against more than 2,500 formulas recorded from real Excel), so read_range returns values for files that were never opened in Excel
  • Dynamic arrays (FILTER, SORT, UNIQUE, SEQUENCE, LET) are stored as Excel stores them and spill into the cells next to them
  • Find out why a number is wrong: trace precedents and dependents across sheets, names and tables, and evaluate a formula step by step as Excel’s Evaluate Formula does
在 GitHub 查看完整 README

安装

uvx excel-mcp-server stdio --allow-dir /path/to/workbooks
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "excel": { "command": "uvx", "args": ["excel-mcp-server", "stdio", "--allow-dir", "/path/to/workbooks"] } } }