Skip to main content

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.

Building or contributing? Read the developer 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 ExcelTamer

2. Add ExcelTamer to your MCP client

Choose either stdio or SSE, depending on the transports supported by your MCP client.

Stdio

For the default stdio transport, add this 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.

SSE

To use SSE, start ExcelTamer separately in PowerShell. Set server environment variables in the same shell:

$env:EXCELTAMER_MCP_ALLOWED_ROOTS = "C:\Users\you\Documents\Excel"
exceltamer-mcp --port 8123

Then configure an SSE-capable MCP client to connect to the stream endpoint:

{
  "mcpServers": {
    "exceltamer": {
      "url": "http://127.0.0.1:8123/sse"
    }
  }
}

Client configuration field names can vary; use http://127.0.0.1:8123/sse as the server URL. ExcelTamer receives client messages at http://127.0.0.1:8123/messages/.

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.

If the workbook is already open in Excel, focus its Excel window and try:

List the workbooks currently open in Excel, attach the active workbook,
describe its worksheets and used ranges, and then detach from it without
closing the workbook or Excel.

That follows the list → attach → operate → detach workflow:

  1. excel.list_open_workbooks discovers workbooks in all visible Excel applications.
  2. excel.attach_workbook registers the active workbook and returns its workbook_id.
  3. Read, write, checkpoint, and save tools operate on that identifier.
  4. excel.close removes an attached workbook from the MCP session but leaves both the workbook and Excel open.

Security warning: Discovery and attachment deliberately bypass EXCELTAMER_MCP_ALLOWED_ROOTS. They can expose every workbook open in the same Windows user session, including unsaved workbooks and files outside the configured roots. Use these tools only with a trusted local MCP client. Checkpoint creation is supported for attached workbooks, but checkpoint rollback is rejected because rollback would have to close and reopen the user's workbook.

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

  • Discover all open Excel workbooks and attach the active one without reopening or taking ownership of it
  • Open, inspect, save, save-as, close, and detach workbooks
  • Read cells, ranges, sheet previews, and workbook structure
  • Capture a worksheet's used range or an explicit A1 range as a PNG
  • 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

ExcelTamer 0.4.0 exposes 18 MCP tools, one resource, and two 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.

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.4.0.tar.gz (44.2 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.4.0-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for exceltamer-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1ba4b12986478ef31d7208acdc46e0812023ef9b043fefe4b17a0e79ea542548
MD5 dd533ffd6f3a1eb9af8a74e6414a2a39
BLAKE2b-256 4e03121ab076c2b5f02d1e8e002c8207ae2deeebbddb13f22f893fc84bb5698c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: exceltamer-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 38.6 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6690317a8ea3f22b80867ee0cf64c9ed130eb2a77d7032b06347e84aabfaa2d4
MD5 081813caa706a07253637b1a0c3b2386
BLAKE2b-256 207f5b4b0507fb2181737723d6f8be1d6821b0de213f53eecba4a5b72dde3427

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 Sentry Error logging StatusPage Status page