Excel MCP Server
This MCP server enables AI agents to automate Excel file operations through natural language commands.
Key Capabilities:
Workbook & Worksheet Management
Create new Excel workbooks (.xlsx files) at specified paths
Add worksheets with custom names to existing workbooks
Retrieve workbook information including sheet lists and metadata
Cell & Range Operations
Set/get individual cell values (strings, numbers, booleans) using A1 notation
Set/get range values for bulk data operations using 2D arrays (e.g., A1:C10)
Formatting & Styling
Apply comprehensive cell formatting: font properties (bold, italic, size, color), background fills (ARGB colors, patterns), and borders (top, bottom, left, right with custom styles)
Formulas & Calculations
Add Excel formulas to cells for automatic calculations (e.g., =SUM(A1:A10), =AVERAGE())
Data Operations
Search for specific values within worksheets and return their locations
Export worksheet data to CSV format
Use Cases: Automated report generation, data analysis and calculation, spreadsheet formatting, data extraction and transformation, bulk data entry and manipulation.
Provides the runtime environment for the Excel MCP server to operate, enabling Excel file operations on the server-side.
Used as the primary programming language for implementing the Excel MCP server, providing type safety and modern language features.
Implements schema validation for Excel operations, ensuring that inputs to Excel manipulation functions are properly formatted and validated.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Excel MCP Server create a new workbook named sales_report.xlsx and add a sheet for monthly data"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Excel MCP Server
AIエージェント(Claude、ChatGPT、Copilotなど)がExcelファイルを自動操作できるModel Context Protocol (MCP) サーバーです。
🎯 できること
このMCPサーバーを使うと、AIエージェントに自然言語で指示するだけで、以下のようなExcel操作が自動化できます:
📊 データ入力・編集: セルや範囲に値を設定、取得
📝 ワークブック管理: 新規作成、シート追加、情報取得
🎨 書式設定: フォント、色、罫線などの装飾
🔢 数式・計算: セルに数式を追加して自動計算
🔍 データ検索: ワークシート内のデータを検索
💾 データ出力: ExcelシートをCSVファイルにエクスポート
例: 「売上データを分析して、月別の合計を計算し、グラフ用のシートを作成して」と指示すれば、AIが自動的にExcelファイルを操作します。
Related MCP server: Excel MCP Server
📚 詳細ガイド
初心者の方は guide/ ディレクトリの詳細ガイドを参照してください:
📖 メインガイド - プロジェクト全体の概要
🎓 MCP基礎知識 - MCPとは何か、仕組みの理解
⚙️ セットアップ手順 - 環境構築方法
🚀 使用方法 - 実際の使い方と例
🔧 ツール詳細 - 各Excel操作ツールの詳細
🛠️ トラブルシューティング - よくある問題と解決方法
📋 サンプル集 - 実用的な使用例集
🚀 セットアップ手順
1. 必要な環境
Node.js (v16以降)
Windows、macOS、またはLinux
2. インストール
# ディレクトリ移動
cd excel_mcp_server
# 依存関係をインストール
npm install
# ビルド
npm run build3. VS Code Copilotとの連携設定
VS CodeでCopilotと連携する場合、mcp.jsonファイルに設定を追加します。
設定ファイルの場所:
Windows:
%APPDATA%\Code\User\mcp.json(安定版) または%APPDATA%\Code - Insiders\User\mcp.json(Insiders版)macOS:
~/Library/Application Support/Code/User/mcp.jsonまたは~/Library/Application Support/Code - Insiders/User/mcp.jsonLinux:
~/.config/Code/User/mcp.jsonまたは~/.config/Code - Insiders/User/mcp.json
設定内容:
{
"servers": {
"excel-mcp-server": {
"type": "stdio",
"command": "node",
"args": ["C:/path/to/excel_mcp_server/dist/index.js"]
}
}
}重要: C:/path/to/excel_mcp_server/dist/index.js は、実際のプロジェクトの dist/index.js への絶対パスに置き換えてください。
4. 動作確認
VS Codeを再起動後、Copilotに以下のように話しかけてみてください:
「ExcelファイルC:/test/sample.xlsxを作成して、Sheet1を追加し、A1セルに"Hello Excel"と入力してください」💡 使用例
基本的な操作
新しいExcelファイルを作成
「C:/reports/monthly.xlsxという新しいExcelファイルを作成して」データを入力
「Sheet1のA1からC3の範囲に、商品名、価格、在庫数の表を作成して」書式を設定
「A1セルを太字にして、背景色を黄色にして」数式で計算
「D列に合計を計算する数式を追加して」
より高度な使い方
詳細な使用例は サンプル集 を参照してください。
🔧 提供される機能
このMCPサーバーは以下のExcel操作ツールを提供します:
ワークブック・ワークシート操作
create_workbook- 新しいExcelワークブックを作成get_workbook_info- ワークブックの詳細情報を取得(シート一覧など)add_worksheet- 既存のワークブックにワークシートを追加
セル・範囲操作
set_cell_value- 単一のセルに値を設定get_cell_value- 単一のセルの値を取得set_range_values- 複数セルに一括でデータを設定(表形式データに便利)get_range_values- 複数セルのデータを一括取得
書式設定
format_cell- セルの書式を設定(フォント、背景色、罫線など)
数式・計算
add_formula- セルに数式を追加(SUM、AVERAGEなど)
データ操作
find_data- ワークシート内で特定のデータを検索
出力
export_to_csv- ワークシートをCSVファイルにエクスポート
詳細は ツール詳細ガイド を参照してください。
🛠️ トラブルシューティング
問題が発生した場合は、トラブルシューティングガイド を確認してください。
📄 ライセンス
ISC
開発者向け情報
開発環境のセットアップ
開発モードで実行:
npm run devプロジェクト構造
プロジェクト構造
言語: TypeScript
ランタイム: Node.js
MCP SDK: @modelcontextprotocol/sdk
Excel ライブラリ: ExcelJS
スキーマ検証: Zod
デバッグ
VS Codeでのデバッグ設定は .vscode/mcp.json に含まれています。
Available Tools
11 toolsadd_formulaC
セルに数式を追加します
Inputs: cell (required), filePath (required), formula (required), sheetName (required).
add_worksheetC
既存のワークブックにワークシートを追加します
Inputs: filePath (required), sheetName (required).
create_workbookA
新しいExcelワークブックを作成します。注意: 作成されるワークブックは空でシートを含みません。データを操作する前にadd_worksheetツールでワークシートを追加する必要があります。
Inputs: filePath (required).
export_to_csvC
ワークシートをCSVファイルにエクスポートします
Inputs: csvPath (required), filePath (required), sheetName (required).
find_dataC
ワークシート内で指定された値を検索します
Inputs: filePath (required), searchValue (required), sheetName (required).
format_cellC
セルの書式(フォント、塗りつぶし、罫線)を設定します
Inputs: cell (required), filePath (required), format (required), sheetName (required).
get_cell_valueC
指定されたセルの値を取得します
Inputs: cell (required), filePath (required), sheetName (required).
get_range_valuesC
指定された範囲のデータを取得します
Inputs: filePath (required), range (required), sheetName (required).
get_workbook_infoC
Excelワークブックの詳細情報を取得します(シート一覧、メタデータ等)
Inputs: filePath (required).
set_cell_valueC
指定されたセルに値を設定します
Inputs: cell (required), filePath (required), sheetName (required), value (required).
set_range_valuesC
指定された範囲に2次元配列のデータを設定します
Inputs: filePath (required), sheetName (required), startCell (required), values (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool has a clearly distinct purpose targeting specific Excel operations: formula management, worksheet/creation, data export, search, formatting, value retrieval/setting, and workbook metadata. There is no overlap or ambiguity between tools like 'get_cell_value' vs 'get_range_values' or 'set_cell_value' vs 'set_range_values'.
All tools follow a consistent verb_noun naming pattern (e.g., 'add_formula', 'create_workbook', 'export_to_csv', 'format_cell', 'get_cell_value'). The pattern is uniformly applied across all 11 tools with no deviations in style or convention.
With 11 tools, this server is well-scoped for Excel operations, covering workbook/worksheet management, data manipulation, formatting, export, and search. Each tool earns its place without feeling excessive or insufficient for the domain.
The toolset provides strong coverage for core Excel workflows: creation, data CRUD (get/set cell/range), formatting, formulas, export, and search. Minor gaps include lack of tools for deleting worksheets or workbooks, and advanced features like charts or pivot tables, but agents can work around these with the available tools.
Related MCP Connectors
Let AI agents read, check and edit Excel models. Open a workbook or drop in one MCP config. Either way: typed cells, a formula dependency graph, and a verification certificate. Deterministic — no OCR, no model guessing at your numbers.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Teable is an AI spreadsheet for business that combines a familiar spreadsheet interface with a structured database. Its remote MCP server lets AI agents inspect project and table structure, read and update records, and access the Teable API through OAuth with existing project permissions. Website: [teable.ai](https://teable.ai)
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI assistants to read from and write to Microsoft Excel files, supporting formats like xlsx, xlsm, xltx, and xltm.64,524 npm1,048MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI agents to create, read, and modify Excel workbooks without requiring Microsoft Excel installation.MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server designed for AI assistants to directly process spreadsheet files, enabling them to read, display, modify, and save various table formats like CSV and Excel.33MIT
- AlicenseAqualityDmaintenanceEnables AI agents to directly create, read, edit, and save Excel (.xlsx) spreadsheets using natural language through the Model Context Protocol, supporting cells, sheets, formatting, and formulas without writing Python code.216MIT