Logo C++ Excel 自动化 MCP 服务器

C++ Excel 自动化 MCP 服务器

Cộng đồng
smileFAace

A MCP server for automatically create, view and modify Excel related file using LLM

Nhà phát hànhsmileFAace
Kho mãMCP-ExcelAutoCpp
Ngôn ngữC++
Bản fork
11
Sao
79
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépBSD-3-Clause
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    C++ Excel 自动化 MCP 服务器 cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    79 sao và 11 bản fork từ kho mã được liên kết.

Language:中文 | English

C++ Excel Automation MCP Server

This is a C++ based Excel Automation MCP (Model Context Protocol) server project. It utilizes the OpenXLSX library for Excel file operations and aims to provide an intelligent set of Excel manipulation tools through the MCP protocol, leveraging LLM capabilities.

Table of Contents

Features

  • Simple and Easy-to-Use MCP Interface: Provides standardized MCP tools, making it convenient for clients (like AI assistants) to invoke Excel automation functions.
  • Single-File Deployment: Compiles into a single executable file for easy deployment and execution.
  • Customizable Multi-language Support: Easily add or modify interface languages via JSON files.

Server Capabilities

This MCP server provides the following tools, which can be invoked by an LLM to interact with xlsx spreadsheet files:

  • open_excel_and_list_sheets:
    • Description: Open an Excel file and list all sheet names. This tool will also set the current Excel file path for subsequent operations. RECOMMENDED TO RUN THIS TOOL FIRST BEFORE ANY OPERATION OR IF WANT TO CHANGE THE FILE TO MODIFY.
    • Parameters:
      • file_path (string): The absolute path to the Excel file.
  • get_sheet_range_content:
    • Description: Get and output table content within a specified range in a specific sheet. Automatically opens and closes the Excel file.
    • Parameters:
      • sheet_name (string): The name of the sheet to read from.
      • first_row (number): The starting row number (1-indexed).
      • first_column (number): The starting column number (1-indexed).
      • last_row (number): The ending row number (1-indexed).
      • last_column (number): The ending column number (1-indexed).
      • cell_with_coord (boolean, optional): Output non-empty cells with their respective coordinates, suitable for situations where the output area contains a large number of empty cells.
  • set_sheet_range_content:
    • Description: Set table content within a specified range in a specific sheet. Automatically opens and closes the Excel file.
    • Parameters:
      • sheet_name (string): The name of the sheet to write to.
      • first_row (number): The starting row number (1-indexed).
      • first_column (number): The starting column number (1-indexed).
      • values (array[array]): The 2D array of values to write to the range (supports null, boolean, number, string types).
  • create_xlsx_file_by_absolute_path: (Note: The tool name is defined as this in the code, but the key in JSON is create_xlsx)
    • Description: Create a new xlsx file with the given path. Automatically closes the Excel file after creation.
    • Parameters:
      • file_path (string): The ABSOLUTE path where the file should be created.

(Note: The automatic open/close behavior mentioned in the tool descriptions is an internal implementation detail and does not require user attention.)

Building the Project

This project uses CMake for building. Installing Ninja is recommended for faster compilation speeds.

Build Steps:

  1. Prepare Environment:
    • Ensure you have a C++17 compiler, CMake (>= 3.15), and Ninja installed.
    • Clone the repository: git clone https://github.com/smileFAace/MCP-ExcelAutoCpp.git
  2. Compile:
    bash
    # Change to the project directory (if not already in the root)
    # cd MCP-ExcelAutoCpp
    
    # Generate build files (Ninja recommended)
    cmake -G "Ninja" -S . -B build
    
    # Perform compilation
    cmake --build build
    The compiled executable is typically located in the bin/ directory.

Usage

After successful compilation, find the executable named ExcelAutoCpp (Linux/macOS) or ExcelAutoCpp.exe (Windows) in the ./bin/ directory.

Start the Server

Simply run the executable to start the MCP server.

bash
# Example (adjust path as needed)
./bin/ExcelAutoCpp

When you see output similar to the following, the server has started successfully and is listening on localhost:8888:


░█▀▀░█░█░█▀▀░█▀▀░█░░░█▀█░█░█░▀█▀░█▀█
░█▀▀░▄▀▄░█░░░█▀▀░█░░░█▀█░█░█░░█░░█░█
░▀▀▀░▀░▀░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀▀▀░░▀░░▀▀▀
v0.0.2                 By smileFAace

I(17:35:48) i18n: Successfully loaded language string for language code 'en'
I(17:35:48) i18n: Set current language to 'en'
W(17:35:48) lang.json not found at 'E:\prj\MCP-ExcelAutoCpp\bin\lang.json'. Using default language.
I(17:35:48) i18n: Set current language to 'en'
I(17:35:48) Current language set to: en
I(17:35:48) Starting MCP server at localhost:8888
I(17:35:48) Press Ctrl+C to stop the server

Connecting and Using:

This server adheres to the MCP protocol. You can use any MCP-compatible client (such as Roo, cline, claude, cherry studio, etc.) to connect to the server's SSE endpoint (default: http://localhost:8888/sse) to invoke the provided Excel automation tools.

For example, to configure this MCP server in cline, simply add the following content to the mcp configuration JSON file provided by the plugin after the server is running successfully, and then refresh:

json
{
  "mcpServers": {
    "excel-auto-cpp": {
      "url": "http://localhost:8888/sse"
    }
  }
}

Changing and Customizing Server Language:

The server defaults to English (en) for its interface language. You can change the language by creating a custom language file:

  1. Locate the directory containing the server executable (usually bin/).

  2. Create a text file named lang.json in that directory.

  3. Copy the complete key-value pairs for your desired language into this lang.json file.

    • You can refer to the *.json files in the lang/ directory of the project source code as templates (e.g., lang/zh-cn/lang.json contains the Chinese translations).
    • The lang.json file needs to contain all translation entries required for the program interface and logs.
  4. Save the lang.json file and restart the server.

    • The server will automatically detect and load this file upon startup. If loaded successfully, it will use the language defined in lang.json.

    • If the lang.json file does not exist, is incorrectly formatted, or is missing necessary translation entries, the server will fall back to the default English (en) language.

Download

You can download the latest release from the Releases page.

🌟Star History

Star History Chart

Cài đặt

TypingMind
{
  "mcpServers": {
    "mcp-excelautocpp": {
      "command": "./bin/ExcelAutoCpp",
      "args": []
    }
  }
}

Dùng MCP C++ Excel 自动化 MCP 服务器 với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối C++ Excel 自动化 MCP 服务器, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm C++ Excel 自动化 MCP 服务器 làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của C++ Excel 自动化 MCP 服务器.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "mcp-excelautocpp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của C++ Excel 自动化 MCP 服务器, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của C++ Excel 自动化 MCP 服务器.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng C++ Excel 自动化 MCP 服务器 giúp tôi làm việc này không?
C++ Excel 自动化 MCP 服务器
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng C++ Excel 自动化 MCP 服务器.

Câu hỏi thường gặp

Máy chủ MCP C++ Excel 自动化 MCP 服务器 dùng để làm gì?

C++ Excel 自动化 MCP 服务器 là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP C++ Excel 自动化 MCP 服务器 với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng C++ Excel 自动化 MCP 服务器 với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP C++ Excel 自动化 MCP 服务器 với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối C++ Excel 自动化 MCP 服务器, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP C++ Excel 自动化 MCP 服务器 với TypingMind?

C++ Excel 自动化 MCP 服务器 hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP C++ Excel 自动化 MCP 服务器 cung cấp những công cụ nào trong TypingMind?

C++ Excel 自动化 MCP 服务器 cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP C++ Excel 自动化 MCP 服务器 không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu C++ Excel 自动化 MCP 服务器 yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇