Excel MCP Server

Excel MCP Server

A Model Context Protocol server that enables AI agents to freely operate Excel spreadsheets, providing tools for workbook creation, cell manipulation, formatting, formula handling, and data export.

Category
Visit Server

Tools

create_workbook

新しいExcelワークブックを作成します

open_workbook

既存のExcelワークブックを開いて情報を表示します

get_workbook_info

Excelワークブックの詳細情報を取得します(シート一覧、メタデータ等)

add_worksheet

既存のワークブックにワークシートを追加します

set_cell_value

指定されたセルに値を設定します

get_cell_value

指定されたセルの値を取得します

set_range_values

指定された範囲に2次元配列のデータを設定します

get_range_values

指定された範囲のデータを取得します

format_cell

セルの書式(フォント、塗りつぶし、罫線)を設定します

add_formula

セルに数式を追加します

find_data

ワークシート内で指定された値を検索します

close_workbook

開いているExcelワークブックを閉じてメモリから解放します

list_open_workbooks

現在開いているExcelワークブックの一覧を表示します

export_to_csv

ワークシートをCSVファイルにエクスポートします

README

Excel MCP Server

AIエージェントがExcelを自由に操作できるModel Context Protocol (MCP) サーバーです。

📚 詳細ガイド

初心者の方は guide/ ディレクトリの詳細ガイドを参照してください:

機能

このMCPサーバーは以下のExcel操作機能を提供します:

ワークブック・ワークシート操作

  • create_workbook - 新しいExcelワークブックを作成
  • add_worksheet - ワークシートを追加

セル・範囲操作

  • set_cell_value - セルに値を設定
  • get_cell_value - セルの値を取得
  • set_range_values - 範囲に2次元配列データを設定
  • get_range_values - 範囲のデータを取得

書式設定

  • format_cell - セルの書式(フォント、塗りつぶし、罫線)を設定

数式・計算

  • add_formula - セルに数式を追加

データ操作

  • find_data - ワークシート内でデータを検索

出力

  • export_to_csv - ワークシートをCSVファイルにエクスポート

セットアップ

  1. 依存関係をインストール:
npm install
  1. TypeScriptをコンパイル:
npm run build
  1. サーバーを起動:
npm start

開発

開発モード(コンパイル後に実行):

npm run dev

使用例

MCPクライアントから以下のようにツールを呼び出せます:

// 新しいワークブックを作成
await callTool("create_workbook", {
  filePath: "C:/path/to/workbook.xlsx"
});

// ワークシートを追加
await callTool("add_worksheet", {
  filePath: "C:/path/to/workbook.xlsx",
  sheetName: "Sheet1"
});

// セルに値を設定
await callTool("set_cell_value", {
  filePath: "C:/path/to/workbook.xlsx",
  sheetName: "Sheet1",
  cell: "A1",
  value: "Hello, Excel!"
});

// 範囲にデータを設定
await callTool("set_range_values", {
  filePath: "C:/path/to/workbook.xlsx",
  sheetName: "Sheet1",
  startCell: "A1",
  values: [
    ["名前", "年齢", "職業"],
    ["田中", 30, "エンジニア"],
    ["佐藤", 25, "デザイナー"]
  ]
});

// セルの書式を設定
await callTool("format_cell", {
  filePath: "C:/path/to/workbook.xlsx",
  sheetName: "Sheet1",
  cell: "A1",
  format: {
    font: {
      bold: true,
      size: 14,
      color: "FF0000FF"
    },
    fill: {
      type: "pattern",
      pattern: "solid",
      fgColor: "FFFF00"
    }
  }
});

技術仕様

  • 言語: TypeScript
  • ランタイム: Node.js
  • MCP SDK: @modelcontextprotocol/sdk
  • Excel ライブラリ: ExcelJS
  • スキーマ検証: Zod

VS Code での デバッグ

このプロジェクトはVS Codeでデバッグできるように設定されています。.vscode/mcp.jsonファイルにMCPサーバーの設定が含まれています。

ライセンス

ISC

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured