Excel Vision Mcp

io.github.VOYAGER-Inc由 GitHub 账号 VOYAGER-Inc 发布v1.2.1更新于 Oct 24, 2026

Excel MCP with image extraction and write support — AI agents see and edit xlsx files

已验证STDIO仅桌面文件与存储数据与分析

概览

AI 生成的概览

本地 MCP 服务器,让 AI 助手读取和编辑 Excel 工作簿,并把内嵌图片作为可查看的图像内容返回。

可以做什么
列出工作表并获取工作簿概览,包含尺寸和图片数量,并可在各工作表间搜索单元格,支持分页和可选读取隐藏行列。读取单元格数据并附带加粗、删除线、高亮和字体颜色等格式标记,或一次读取全部文本和内嵌图片。提取内嵌图片为图像内容,并映射到所在单元格位置。创建工作簿和工作表,更新单元格并写入公式,批量写入表格行数据。向工作簿插入本地图片,并设置格式、边框、数字格式和列宽。
适用场景
适合审阅或生成 .xlsx、.xlsm 文件,尤其是含义藏在粘贴的图表、截图或单元格格式中的需求文档、报告或带批注的表格。也适合需要创建或修改工作簿而不只是读取的助手。
运行要求
以 Python 包形式通过 stdio 在本地运行,可用 uvx 或 pip install 启动,也可用 Docker 并挂载文件目录。无需账号、API 密钥或网络访问。可选设置 EXCEL_VISION_MCP_ALLOWED_DIRS 限制可读写的目录。仅支持 .xlsx 和 .xlsm,不支持 .xls 和 .csv。
安装前请注意
默认情况下服务器可读写你的用户账号能访问的任何 Excel 文件,建议设置 EXCEL_VISION_MCP_ALLOWED_DIRS 加以限制。写入工具会创建、修改和覆盖文件,不过默认拒绝覆盖,且保存是原子操作。重新保存可能丢失数据透视表和部分复杂图表功能,新写入的公式在 Excel 中打开前不会显示计算结果。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Excel Vision Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

📊 Excel Vision MCP

Your AI reads the spreadsheet. It can't see the diagram in cell B12.

This fixes that. Other Excel MCP servers return cell values and silently drop every embedded image, so the flowchart your spec depends on never reaches the model. Excel Vision MCP returns them as native ImageContent your AI can actually look at — alongside the text, formatting, and formulas.

[Python 3.11+] [License: MIT] [MCP] [PyPI]

Installation · Tools · Configuration · How It Works · FAQ


🤔 The Problem

Ask your assistant to review a requirements spec. Half the meaning lives in screenshots, flowcharts, and annotated diagrams pasted into cells — and every Excel MCP server hands the model text only. The answer comes back confident and incomplete, because the model never knew the pictures existed.

The same blind spot applies to the other signals authors leave behind:

What the author didWhat other MCP servers reportWhat Excel Vision MCP reports
Pasted a flowchart in B12nothingThe image itself, mapped to B12
Struck through a cancelled rowLegacy exportLegacy export [S] — strikethrough
Highlighted a row for reviewPendingPending [HL:yellow]
Hid an internal-cost columnThe hidden values, as if normalSkipped — unless a formula needs it

Same file. One agent sees a table of strings; the other sees what the author actually meant.

✨ Key Features

FeatureDescription
🖼️ Image ExtractionExtracts all embedded images with cell-position mapping
📄 Full Content ReadingText + images in a single call — nothing is missed
🏷️ Format-Aware ReadingReports bold, strikethrough, highlights and font colors so agents read intent, not just text
🙈 Hidden-Content AwareSkips hidden rows/columns by default, keeping those formulas depend on
✍️ Write SupportCreate workbooks, update cells, write formulas, insert images
🎨 FormattingColors, fonts, borders, alignment, number formats, auto-fit columns
🛡️ Atomic SavesA failed write can never corrupt your original file
📊 Smart PaginationHandles massive spreadsheets without blowing up context
🔍 Text SearchFind content across all sheets instantly
🔒 100% LocalYour files never leave your machine
⚡ Fast16MB file with 40 images processed in ~4 seconds
🖥️ Cross-PlatformmacOS, Linux, Windows

Image Extraction — What Makes This Different

Most Excel MCP servers only read cell values. This server uses a dual extraction strategy:

  1. Cell-Position Mapping (primary) — Maps each image to its exact cell location using openpyxl-image-loader
  2. Archive Scanning (fallback) — Scans the xlsx ZIP archive's xl/media/ directory to catch any images missed by method 1

The result: zero images left behind, with position metadata when available.


👀 See It In Action

A requirements spec where the workflow lives in a pasted diagram and the status lives in cell colors:

You: Review this spec and tell me which features are still in scope, and how the dispatch flow works.

read_full_content returns the sheet as text with formatting markers, then the embedded diagram as an image:

Row 1: A1: Feature [B] [HL:blue] | B1: Status [B] [HL:blue]Row 2: A2: Vehicle dispatch  | B2: Approved [HL:green]Row 3: A3: Legacy CSV export [S] | B3: Cancelled [S]Row 4: A4: Driver roll call  | B4: Needs review [HL:yellow]
ℹ️ Skipped 3 hidden row(s) with content. Pass include_hidden=true to read them.
**[Image 1]** Sheet: `Spec` | Cell: `B12` | Original: 1180×840px[the actual flowchart, as ImageContent]

The model can now answer both halves of the question: "Legacy CSV export is struck through and marked cancelled, so three features remain in scope — and the flowchart in B12 shows dispatch requires roll-call confirmation before assignment."

Without image support, the second half is unanswerable. Without formatting, the cancelled row looks identical to the active ones.


🚀 Quick Start

Install via uvx (Recommended)

No installation needed — runs directly:

bash
uvx excel-vision-mcp

Install via pip

bash
pip install excel-vision-mcp

Then run:

bash
excel-vision-mcp

Install from source

bash
git clone https://github.com/VOYAGER-Inc/excel-vision-mcp.gitcd excel-vision-mcpuv syncuv run excel-vision-mcp

Run with Docker

bash
docker build -t excel-vision-mcp .docker run --rm -i -v /path/to/spreadsheets:/data excel-vision-mcp

The server speaks JSON-RPC over stdin/stdout, so it must run attached (-i). Mount the directory holding your files and reference them by their in-container path (/data/report.xlsx). The image sets EXCEL_VISION_MCP_ALLOWED_DIRS=/data, so reads and writes stay inside the mount.

As an MCP client config:

json
{  "mcpServers": {    "excel-reader": {      "command": "docker",      "args": ["run", "--rm", "-i", "-v", "/path/to/spreadsheets:/data", "excel-vision-mcp"]    }  }}

🔧 Configuration

Add the server to your MCP client's configuration file.

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{  "mcpServers": {    "excel-reader": {      "command": "uvx",      "args": ["excel-vision-mcp"]    }  }}

Cursor

Edit .cursor/mcp.json in your project root:

json
{  "mcpServers": {    "excel-reader": {      "command": "uvx",      "args": ["excel-vision-mcp"]    }  }}

Windsurf / VS Code (Copilot)

Edit your MCP settings file:

json
{  "mcpServers": {    "excel-reader": {      "command": "uvx",      "args": ["excel-vision-mcp"]    }  }}

Antigravity IDE

Edit ~/.gemini/config/mcp_config.json:

json
{  "mcpServers": {    "excel-reader": {      "command": "uvx",      "args": ["excel-vision-mcp"]    }  }}

Note: After editing the config, restart your IDE/client to load the new server.

Restricting file access (optional)

By default the server can read/write any Excel file your user account can access. To sandbox it to specific directories, set EXCEL_VISION_MCP_ALLOWED_DIRS (multiple paths separated by : on macOS/Linux, ; on Windows):

json
{  "mcpServers": {    "excel-reader": {      "command": "uvx",      "args": ["excel-vision-mcp"],      "env": {        "EXCEL_VISION_MCP_ALLOWED_DIRS": "/Users/me/Documents/spreadsheets:/Users/me/Projects/data"      }    }  }}

🛠️ Available Tools

list_sheets

List all sheets with dimensions, merged cell counts, and image totals. Use this first to understand a workbook's structure.

list_sheets(file_path="/path/to/file.xlsx")

Returns: Sheet names, row×column dimensions, data ranges, merged cell counts, total image count.


read_excel_data

Read cell data from a specific sheet with pagination support.

read_excel_data(    file_path="/path/to/file.xlsx",    sheet_name="Sheet1",      # optional, defaults to first sheet    start_row=1,              # optional, 1-indexed    max_rows=200,             # optional, default 200    include_hidden=False      # optional, read hidden rows/columns too)

Returns: Cell values organized by row with coordinate labels and markers for merged cells and formatting.

Row 1: A1: Feature [B] [HL:blue] | B1: Status [B] [HL:blue]Row 3: A3: Legacy export [S] | B3: Cancelled [S]Row 4: A4: Report | B4: Needs review [HL:yellow] | C4: Urgent [B] [C:red]
MarkerMeaning
[M]Merged cell
[B] [I] [S]Bold · Italic · Strikethrough
[HL:color]Highlighted background (color named, e.g. yellow, red)
[C:color]Font color
[HIDDEN-REF]Hidden cell kept because a visible formula references it

Markers and a short legend appear only on sheets that actually use formatting, so plain sheets cost no extra context.


extract_images

Extract all embedded images from the workbook as base64 ImageContent.

extract_images(    file_path="/path/to/file.xlsx",    sheet_name="Overview",    # optional, None = all sheets    max_width=1024,           # optional, resize limit    max_height=1024           # optional, resize limit)

Returns: List of ImageContent (base64) with metadata — cell position, sheet name, original dimensions.


read_full_content ⭐

The star tool. Reads ALL text data AND all embedded images in a single call. Ideal for comprehensive document analysis.

read_full_content(    file_path="/path/to/file.xlsx",    max_rows_per_sheet=500,   # optional    max_image_width=1024,     # optional    max_image_height=1024     # optional)

Returns: Complete workbook contents — every sheet's data as structured text (with formatting markers), followed by every embedded image with cell-position mapping.

Example use case: "Analyze this requirements document and summarize all use cases, including the workflow diagrams."


Hidden rows & columns

All read tools skip hidden rows and columns by default — an author who hid them signalled they aren't part of the content to review.

One exception: a hidden cell that a visible formula references is still returned, marked [HIDDEN-REF], because its value drives results you can see. Skipped content is always reported so nothing disappears silently:

ℹ️ Skipped 2 hidden row(s) with content. 1 hidden cell(s) are shown anyway   because visible formulas reference them. Pass include_hidden=true to read them.

Pass include_hidden=true to read_excel_data, read_full_content, or search_excel to read everything.


get_workbook_overview

Quick structural summary of a workbook — file size, sheet list, dimensions, image count.

get_workbook_overview(file_path="/path/to/file.xlsx")

search_excel

Case-insensitive text search across all cells in the workbook.

search_excel(    file_path="/path/to/file.xlsx",    query="revenue",    sheet_name="Q4 Report"    # optional, None = all sheets)

Returns: Matching cells with sheet name, coordinate, and value. Limited to 100 results.


create_excel_file

Create a new empty workbook with the sheets you name.

create_excel_file(    file_path="/path/to/new.xlsx",    sheet_names=["Summary", "Detail"],  # optional, default ["Sheet1"]    overwrite=False                     # optional, refuses to replace by default)

add_excel_sheet

Add a new empty sheet to an existing workbook.

add_excel_sheet(file_path="/path/to/file.xlsx", sheet_name="Q3", position=0)

update_excel_cells

Set individual cells by coordinate. Values starting with = are written as formulas.

update_excel_cells(    file_path="/path/to/file.xlsx",    updates={"A1": "Title", "B2": 42, "C2": "=SUM(B2:B10)"},    sheet_name="Data"             # optional, defaults to first sheet)

Note: newly written formulas show no calculated value until the file is opened in Excel. For merged ranges, write to the top-left anchor cell.


write_excel_rows

Write a rectangular block of tabular data in one call.

write_excel_rows(    file_path="/path/to/file.xlsx",    rows=[["Item", "Qty"], ["Widget", 4], ["Gadget", 7]],    sheet_name="Data",            # optional    start_cell="A1"               # optional)

insert_excel_image

Insert a local image file into a workbook, anchored at a cell.

insert_excel_image(    file_path="/path/to/file.xlsx",    image_path="/path/to/chart.png",    cell="B2",    sheet_name="Report",          # optional    width=480, height=320         # optional display size in px)

format_excel_cells

Style a range: font, colors, borders, alignment, number formats. Only the attributes you pass are changed — existing styling is preserved.

format_excel_cells(    file_path="/path/to/file.xlsx",    cell_range="A1:D1",    bold=True,    font_color="FFFFFF",    fill_color="4472C4",    horizontal_align="center",    border_style="thin",          # thin | medium | thick | double | dashed | dotted    border_edges="all",           # "all" or "outline" (outer edge of range only)    number_format="#,##0.00"      # any Excel format code)

set_excel_column_widths

Set column widths manually and/or auto-fit to content.

set_excel_column_widths(    file_path="/path/to/file.xlsx",    widths={"A": 12, "B": 35},    # explicit widths (skipped by auto-fit)    auto_fit=True,                # size remaining columns to content    max_width=60,                 # cap for auto-fit    wrap_overflow=True            # wrap cells longer than the cap)

Auto-fit counts full-width CJK characters (日本語) as 2 units. Cells longer than max_width get wrap text enabled instead of stretching the column — Excel auto-expands their row heights on open.


All write tools use atomic saves: the workbook is written to a temp file and swapped into place, so a failed save never corrupts your original. .xlsm macros are preserved. Known openpyxl limitation: pivot tables and some complex chart features are not preserved on re-save.


⚙️ How It Works

Architecture

Your AI Client (Claude, Cursor, etc.)       │       │ stdio (JSON-RPC)       ▼┌─────────────────────────────┐│     Excel Vision MCP        ││                             ││  ┌───────────────────────┐  ││  │   openpyxl            │  │──→ Cell data, formulas, merged cells│  │   (Excel parser)      │  ││  └───────────────────────┘  ││                             ││  ┌───────────────────────┐  ││  │ openpyxl-image-loader │  │──→ Images with cell positions│  │ + zipfile (fallback)  │  ││  └───────────────────────┘  ││                             ││  ┌───────────────────────┐  ││  │   Pillow              │  │──→ Resize, optimize, base64 encode│  │   (image processing)  │  ││  └───────────────────────┘  │└─────────────────────────────┘       │       │ TextContent + ImageContent       ▼  AI sees text AND images

Data Flow & Privacy

  1. Your file stays on your machine. The server runs locally via stdio — no network requests, no uploads, no cloud.
  2. Read tools never modify your files. All image processing happens in-memory (BytesIO buffers). Write tools change only the exact file you specify, via atomic saves (temp file + swap) that can never leave a half-written workbook.
  3. Optional directory sandbox. Set EXCEL_VISION_MCP_ALLOWED_DIRS (path-separator-separated list) to restrict which directories the server may read or write. Unset = no restriction.
  4. Memory is freed automatically. After each request, Python's garbage collector reclaims all buffers.

Image Processing Pipeline

Original image in .xlsx (e.g., 2048×1536px PNG)  ↓ Extract from ZIP archive / drawing layer  ↓ Resize to fit max dimensions (default 1024px)  ↓ Compress (JPEG 80% / PNG optimized)  ↓ Base64 encode  → ImageContent returned to AI client (~100-300KB per image)

📋 Supported Formats

FormatStatusNotes
.xlsx✅ Fully supportedExcel 2007+ Open XML
.xlsm✅ Fully supportedMacro-enabled workbooks
.xls❌ Not supportedLegacy Excel 97-2003 format
.csv❌ Not supportedUse a CSV-specific tool

Image Types

Image TypeCell-MappedArchive Extraction
PNG✅✅
JPEG✅✅
GIF✅✅
BMP✅✅
TIFF⚠️ Partial✅
EMF/WMF❌✅
=IMAGE() formula❌❌
Images in comments❌❌

📊 Performance

Tested on real-world enterprise Excel files (macOS, Apple Silicon):

FileSizeSheetsImages ExtractedTime
Requirements Doc A4.5 MB12242.4s
Requirements Doc B5.0 MB6182.4s
Requirements Doc C10.7 MB6131.5s
Master Spec16.0 MB12404.4s

❓ FAQ

Why can't it extract images from .xls files?

.xls is the legacy binary format (Excel 97-2003). It uses a completely different internal structure (BIFF) compared to .xlsx (ZIP-based Open XML). The libraries used (openpyxl, openpyxl-image-loader) only support the modern Open XML format. If you have .xls files, convert them to .xlsx using Excel or LibreOffice first.

Why are some images marked as "orphan"?

The primary extraction method (openpyxl-image-loader) maps images to specific cells but may miss images that aren't anchored to the standard drawing layer. The fallback archive scanner catches these "orphan" images from the xl/media/ directory — you get every image, just without cell-position metadata for orphans.

Can I use this with models that don't support vision?

Yes! Text data extraction works perfectly with any model. Image extraction will still return ImageContent, but text-only models will simply ignore the image data. You won't get errors.

Is my data safe?

Yes. The server runs entirely on your local machine via stdio transport. No data is sent over the network and no files are uploaded anywhere. Read tools never modify your files; write tools change only the file you explicitly target, using atomic saves so a failed write can't corrupt it. You can also sandbox the server to specific directories with the EXCEL_VISION_MCP_ALLOWED_DIRS environment variable.

How do I handle very large files (100MB+)?

The server uses read_only mode for data iteration and processes images in-memory one at a time. For extremely large files, use read_excel_data with pagination (start_row + max_rows) instead of read_full_content to control memory usage.


🗺️ Roadmap

  • Write support — Create workbooks, update cells, write formulas, insert images (v1.1.0)
  • Format-aware reading — Bold, strikethrough, highlights, colors; hidden-content handling (v1.2.0)
  • Formula evaluation — Show formulas alongside their calculated values
  • CSV/TSV support — Extend to other tabular formats
  • Conditional formatting — Extract formatting rules
  • Chart extraction — Render charts as images

🤝 Contributing

Contributions are welcome! Please open an issue first to discuss what you'd like to change.

bash
git clone https://github.com/VOYAGER-Inc/excel-vision-mcp.gitcd excel-vision-mcpuv syncuv run pytest  # Run the test suite

📄 License

MIT — use it however you want.


Built for AI agents that need to see the whole picture, not just the text.

⭐ Star this repo if it helped you!

来源:README.md,提交 1462d4d

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.2.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分