Skip to main content

A Model Context Protocol server for safe Microsoft Excel automation

Project description

ExcelTamer

ExcelTamer is a Model Context Protocol (MCP) server for safe, structured automation of Microsoft Excel. It exposes workbook lifecycle, reading, writing, search, checkpoint, resource, and prompt capabilities to any MCP-compatible client.

New to ExcelTamer? Follow the quick start below or read the complete MCP usage guide.

Quick start: use ExcelTamer with an MCP client

1. Install ExcelTamer

ExcelTamer requires Windows with Microsoft Excel installed and Python 3.11 or newer.

pip install .

2. Add ExcelTamer to your MCP client

Add this client-neutral server definition to your MCP client's configuration, replacing the allowed root with the directory containing your workbooks:

{
  "mcpServers": {
    "exceltamer": {
      "command": "exceltamer-mcp",
      "env": {
        "EXCELTAMER_MCP_ALLOWED_ROOTS": "C:\\Users\\you\\Documents\\Excel"
      }
    }
  }
}

EXCELTAMER_MCP_ALLOWED_ROOTS limits which workbook paths the server may access. The server defaults to read-only workbook mode and records write operations in an audit log.

3. Restart the client and ask it to use Excel

For inspection, try:

Open C:\Users\you\Documents\Excel\budget.xlsx in read-only mode. List the
worksheets, preview the first 10 rows of the first sheet, summarize what the
workbook contains, and close it when finished.

For a safe edit, try:

Open C:\Users\you\Documents\Excel\budget.xlsx in read-write mode. Create a
checkpoint, update cell B4 on Sheet1 to 120, read the cell back to verify the
change, save the workbook, and close it. If verification fails, roll back to
the checkpoint.

Your MCP client handles the excel.* tool calls and carries the returned workbook_id through the workflow.

Run the server manually

Start the default stdio transport:

exceltamer-mcp

The module form remains available:

python -m ExcelTamer.mcp.main

For SSE transport:

exceltamer-mcp --port 8123

Command-line options

exceltamer-mcp [-h] [--port PORT]
Option Description
-h, --help Show the command help and exit
--port PORT Run the SSE transport on the specified integer port

When --port is omitted, the server uses stdio transport. The module form accepts the same options:

python -m ExcelTamer.mcp.main --port 8123

Environment variables

ExcelTamer reads these variables when the server process starts. Restart the server or MCP client after changing them.

Variable Default Effect
EXCELTAMER_MCP_ALLOWED_ROOTS Current working directory Comma-separated directory roots from which workbook paths may be opened
EXCELTAMER_MCP_DEFAULT_MODE ro Default workbook mode: ro for read-only or rw for read-write
EXCELTAMER_MCP_MAX_CELLS_READ 20000 Maximum number of cells considered by one read operation
EXCELTAMER_MCP_MAX_CELLS_WRITE 5000 Maximum number of cells accepted by one write operation
EXCELTAMER_MCP_AUDIT_LOG_DIR ./.exceltamer_mcp_logs Directory in which write audit records are stored as audit.jsonl

Set these values in the MCP client configuration's env object, as shown in the quick start, or in the shell before starting exceltamer-mcp.

Capabilities

  • Open, inspect, save, save-as, and close workbooks
  • Read cells, ranges, sheet previews, and workbook structure
  • Write cells, batches, and rectangular ranges
  • Search workbook values with exact, contains, or regex matching
  • Create and roll back checkpoints
  • Inspect recent write history
  • Discover workbook resources and MCP-native workflow prompts

Validation

Run the automated MCP smoke tests:

python -m unittest discover -s test -p "test_*.py" -v

Run the standalone protocol client:

python test/mcp_client.py

Pass --file path\to\workbook.xlsx to additionally validate opening, inspecting, and closing a real workbook.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exceltamer-0.2.0.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exceltamer-0.2.0-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

File details

Details for the file exceltamer-0.2.0.tar.gz.

File metadata

  • Download URL: exceltamer-0.2.0.tar.gz
  • Upload date:
  • Size: 33.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for exceltamer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0eb53620ef0f00df528bf96a56e0d0bf7f598fbdf6bb0b46b07b0b569411b16e
MD5 cddbe463fe888324338b6289327d4b07
BLAKE2b-256 3c1209289dcd406f763e56c5f74da60ec0cb2650ac7560423399e9f2bc12b526

See more details on using hashes here.

File details

Details for the file exceltamer-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: exceltamer-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 33.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for exceltamer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30789827d97b5726e956868d7d5928a02ff8de65b16eb4161cf5f9aa0246240f
MD5 b65afe9b4d48c377695993db692bc475
BLAKE2b-256 70688292fe7338f58203add29b542edeec58cb722e1c33ad7482d662a5020b8f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page