Логотип C++ Excel 自动化 MCP 服务器

C++ Excel 自动化 MCP 服务器

Спільнота
smileFAace

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

ВидавецьsmileFAace
РепозиторійMCP-ExcelAutoCpp
МоваC++
Форки
11
Зірки
79
Доступні інструменти
0
Тип транспортуstdio
Категорії
ЛіцензіяBSD-3-Clause
Посилання
  • Підключайте інструменти до робочих процесів із ШІ

    C++ Excel 自动化 MCP 服务器 надає можливості MCP, які можуть використовувати сумісні клієнтські ШІ-застосунки та агенти.

  • Доступні інструменти: 0

    Перегляньте нижче дії, які можна викликати, з назвами й описами, якщо сервер їх надає.

  • Готова конфігурація для копіювання

    Скористайтеся прикладами конфігурації, щоб налаштувати цей сервер у вибраному клієнті MCP.

  • Показники інтересу до відкритого коду

    Зірки: 79, форки: 11 — у пов’язаному репозиторії.

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

Встановлення

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

Використовуйте MCP C++ Excel 自动化 MCP 服务器 з різними моделями ШІ

TypingMind підключає інструменти MCP на рівні робочого простору, тож після підключення C++ Excel 自动化 MCP 服务器 ви можете використовувати їх із різними моделями ШІ в TypingMind, а не налаштовувати окремо для кожної моделі. Ця інтеграція MCP працює локально через конектор MCP TypingMind на вашому пристрої.

Інструкція з налаштування локального конектора

Виберіть цей варіант, якщо серверу MCP потрібен доступ до локальних файлів, програм або приватних ресурсів на вашому комп’ютері.

1

Відкрийте налаштування MCP

У TypingMind перейдіть до розділу «Налаштування», відкрийте «Розширені налаштування», потім «Протокол контексту моделі» й виберіть «Параметри конектора».

  1. Відкрийте TypingMind у браузері.
  2. Натисніть значок налаштувань.
  3. Перейдіть до розділу «Розширені налаштування».
  4. Відкрийте розділ «Протокол контексту моделі».
  5. Натисніть «Параметри конектора» й виберіть «Цей пристрій».
Екран налаштування конектора MCP у TypingMind з вибраним варіантом «Цей пристрій»
2

Виконайте команду конектора

Виберіть «Цей пристрій», скопіюйте команду з TypingMind і виконайте її в терміналі. Не зупиняйте процес, поки користуєтеся MCP.

  1. Скопіюйте команду налаштування, показану в TypingMind.
  2. Відкрийте «Термінал» у macOS або Windows Terminal у Windows.
  3. Вставте й виконайте команду.
  4. Підтвердьте встановлення пакета, якщо термінал запитає дозволу продовжити.
  5. Не закривайте вікно термінала й не зупиняйте процес, поки користуєтеся інструментами MCP.
3

Додайте C++ Excel 自动化 MCP 服务器 як сервер

Коли статус конектора зміниться на «Готово», натисніть «Змінити сервери» та вставте конфігурацію сервера MCP.

  1. Зачекайте, доки статус конектора зміниться на «Готово».
  2. Натисніть «Змінити сервери».
  3. Вставте конфігурацію сервера MCP C++ Excel 自动化 MCP 服务器.
  4. Збережіть список серверів.
  5. Оновіть дані, щоб переконатися, що конектор досі готовий до роботи.
Налаштування MCP у TypingMind з активним сервером і кнопкою «Змінити сервери»
{
  "mcpServers": {
    "mcp-excelautocpp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Використовуйте підключення з різними моделями

Збережіть список серверів, відкрийте «Плагіни», увімкніть інструменти MCP для C++ Excel 自动化 MCP 服务器, а потім виберіть будь-яку підтримувану модель ШІ в TypingMind і використовуйте інструменти в чаті або призначте їх агенту ШІ.

  1. Відкрийте сторінку «Плагіни» в TypingMind.
  2. Увімкніть інструменти MCP для C++ Excel 自动化 MCP 服务器.
  3. Почніть чат і виберіть модель ШІ, яку хочете використовувати.
  4. Використовуйте інструменти MCP у чаті або призначте їх агенту ШІ.
  5. За потреби перемикайтеся на іншу модель ШІ без повторного підключення MCP.
Чат TypingMind із використанням увімкнених інструментів MCP і вибраної моделі ШІ
Допоможете з цим завданням через C++ Excel 自动化 MCP 服务器?
C++ Excel 自动化 MCP 服务器
Звісно. Я це прочитав.
Ось що я знайшов за допомогою C++ Excel 自动化 MCP 服务器.

Поширені запитання

Для чого використовується сервер MCP C++ Excel 自动化 MCP 服务器?

C++ Excel 自动化 MCP 服务器 — це сервер MCP, який дає змогу сумісним клієнтам ШІ підключатися до зовнішніх інструментів і контексту. У TypingMind ви можете додати цей сервер MCP один раз і зробити його інструменти доступними у своєму робочому просторі ШІ.

Чи можу я використовувати MCP C++ Excel 自动化 MCP 服务器 з кількома моделями ШІ в TypingMind?

Так. TypingMind підключає інструменти MCP на рівні робочого простору, тому ви можете використовувати C++ Excel 自动化 MCP 服务器 з різними моделями ШІ, як-от Claude, ChatGPT, Gemini або іншими моделями, які ви налаштували в TypingMind, без окремого налаштування сервера MCP для кожної моделі.

Навіщо використовувати MCP C++ Excel 自动化 MCP 服务器 із TypingMind?

TypingMind — один із найкращих інтерфейсів для чату з великими мовними моделями, адже він об’єднує різні моделі ШІ, промпти, плагіни, агентів ШІ, ключі API та інструменти MCP в одному робочому просторі. Підключивши C++ Excel 自动化 MCP 服务器, ви зможете використовувати його інструменти MCP з вибраними моделями та впорядковано працювати з чатами в TypingMind.

Як підключити MCP C++ Excel 自动化 MCP 服务器 до TypingMind?

C++ Excel 自动化 MCP 服务器 працює через локальний конектор MCP TypingMind. Це найкращий варіант, коли серверу MCP потрібен доступ до локальних файлів, настільних застосунків, інструментів командного рядка або приватних ресурсів на вашому комп’ютері.

Які інструменти надає MCP C++ Excel 自动化 MCP 服务器 у TypingMind?

C++ Excel 自动化 MCP 服务器 надає можливості MCP, які можна ввімкнути на сторінці «Плагіни» в TypingMind і використовувати в чаті або призначати агентам ШІ.

Чи потрібно передавати свої ключі API в TypingMind, щоб використовувати MCP C++ Excel 自动化 MCP 服务器?

Ні. TypingMind орієнтований насамперед на локальну роботу й дає змогу зберігати контроль над постачальниками моделей, ключами API, промптами та конфігурацією MCP. Якщо C++ Excel 自动化 MCP 服务器 потребує автентифікації, під час створення підключення додайте потрібні заголовки, налаштування OAuth або локальну конфігурацію для цього сервера MCP.

Схожі сервери MCP

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇