Excel

An MCP server with an AI agent that classifies employees in Excel files and updates fields automatically.
  • python

0

GitHub Stars

python

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "dhruvimahale08-excel_mcp": {
      "command": "python",
      "args": [
        "-m",
        "mcp_server.server"
      ]
    }
  }
}

You set up an MCP server that runs a reusable engine to process Excel employee data with an AI agent. It scans the workbook, updates experience-derived fields, assigns departments, designations, and salary bands, and writes back decisions with confidence scores. This enables consistent, automated classification and maintenance of employee records directly in Excel.

How to use

Start by launching the MCP server, then run the AI agent to connect via stdio. The server exposes tools for reading and writing Excel data, while the agent applies AI-driven decisions and updates back to the sheet. You can run both in parallel from separate terminals to automate end-to-end processing.

Typical workflow you’ll perform:

  • Start the MCP server so clients can connect to it via MCP tooling.
  • Run the AI agent to scan all employees, update Experience_Years from DOJ, and fill or refresh fields like Department, Designation, and Salary_Band.
  • Review the AI decision reasons and confidence scores stored alongside each row for traceability.
  • Re-run as needed to reprocess or adjust data when new employees are added or rules change.

How to install

Follow these concrete steps to set up and run the MCP server and agent.

# 1. Prerequisites
# Ensure you have Python 3.8+ installed
python --version

# 2. Create a project directory and install dependencies
# (Run from your preferred shell)
mkdir excel_mcp
cd excel_mcp

# 3. Install Python dependencies
pip install -r requirements.txt

# 4. Create configuration and data files as described below

Configuration and runtime details

Configure the server and agent to match your environment. You will set the path to your Excel file, OpenAI model settings, batch processing options, and logging levels. The agent uses the server’s tools to read and update the workbook.

# config/config.yaml
excel_path: "data/employees_mcp.xlsx"
openai:
  model: "gpt-4o-mini"
  temperature: 0
  max_retries: 3
processing:
  batch_size: 100
  backup_before_update: true
logging:
  level: "INFO"
  file: "logs/mcp_server.log"
decision_rules:
  # Example rules; adjust as needed
  experience_thresholds:
    intern: 0
    junior: 2
    senior: 5
    lead: 8

Run the server and the agent

Start the MCP server in one terminal, then run the agent in another terminal. The server is the central endpoint your MCP client will connect to, and the agent drives the AI-based decisions.

# Start the MCP server (stdio-based MCP server)
python -m mcp_server.server

# In a separate terminal, run the AI agent client to connect via stdio
python main.py

Security and maintenance

Protect your OpenAI API key and credentials. Store secrets securely, rotate keys as needed, and monitor logs for failures or retries. Regular backups of your Excel workbook are created before updates if configured.

Troubleshooting and notes

If you encounter issues, check that the Excel file has the required columns and that the server is reachable by the agent. Review the backup directory and logs for any errors or retry messages.

Available tools

fetch_unprocessed

Retrieve all unprocessed employee rows for review or processing.

fetch_all_employees

Retrieve all employee rows for comprehensive scanning and updates.

apply_employee_update

Apply AI-driven updates to employee data back to the Excel file, including confidence scores and reasoning.

update_experience

Recalculate Experience_Years from DOJ for all employees.

reset_processed_flag

Reset processing flags to allow reprocessing of rows.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational