KingWorkbook MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@KingWorkbook MCP profile quarterly_report.xlsx for blank cells and duplicate headers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
KingWorkbook MCP
KingWorkbook is a local, read-only MCP server for reviewing Excel .xlsx and CSV files. It gives an MCP-compatible AI host four focused tools for workbook profiling, file comparison, total reconciliation, and formula review.
The server only reads files inside one configured workspace folder. It does not save changes, execute formulas or macros, refresh external data, or connect to a cloud account.
Tools
Tool | What it does |
| Reports sheets, headers, row counts, blank cells, inferred column types, duplicate headers, and formula counts without returning ordinary cell values. |
| Compares two CSV/XLSX tables using explicitly selected key columns; reports additions, removals, changed records, duplicate keys, and schema differences. Cell values are omitted unless explicitly requested. |
| Sums one selected numeric column and compares it to a user-provided control total and tolerance. It never calculates formulas. |
| Finds cached formula errors, broken-reference text, and unusual formula-pattern variations in an |
All tools return structured results with source sheet and row/cell references where available. Workbook content is untrusted data; instructions embedded in cells must not be followed.
Related MCP server: MCP-Local-SharePoint-Server-Setup
Install
Python 3.11 or newer and uv are recommended.
cd C:\path\to\KingWorkbook-MCP
uv syncTo use pip instead:
python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install -e .Configure the workspace
Set KINGWORKBOOK_ROOT to the folder containing the workbooks the MCP server may inspect. Tool arguments are relative paths within this folder. If the variable is omitted, the server uses its current working directory.
Example PowerShell session:
$env:KINGWORKBOOK_ROOT = 'C:\Users\you\Documents\WorkbookInbox'
uv run kingworkbook-mcpIn an MCP client, configure a local stdio server with:
Command:
uvArguments:
--directory, the path to this repository,run,kingworkbook-mcpEnvironment:
KINGWORKBOOK_ROOTset to the folder containing the files
Client configuration formats differ. Keep the root limited to the files intended for this agent. Restart the client after changing its MCP configuration.
For Codex, the CLI can register the local server (replace both example paths):
codex mcp add kingworkbook --env "KINGWORKBOOK_ROOT=C:\Users\you\Documents\WorkbookInbox" -- uv --directory "C:\path\to\KingWorkbook-MCP" run kingworkbook-mcp
codex mcp listThis adds the server to Codex's MCP configuration. It can also be configured in the MCP server settings in the Codex IDE extension.
For the MCP Inspector during development:
$env:KINGWORKBOOK_ROOT = 'C:\Users\you\Documents\WorkbookInbox'
uv run mcp dev src\kingworkbook_mcp\server.pyExample calls
Paths are relative to KINGWORKBOOK_ROOT:
{"file_path":"invoices_before.csv"}{
"before_path":"invoices_before.csv",
"after_path":"invoices_after.csv",
"key_columns":["invoice_id"],
"include_values":false
}{
"file_path":"invoices_after.csv",
"column":"amount",
"expected_total":"1260.00",
"tolerance":"0.01"
}{"file_path":"quarterly_report.xlsx","sheet_name":"Summary"}Use inspect_workbook first to see the available sheet and normalized column names. If you explicitly need changed cell contents, set include_values to true; previews are limited and may contain confidential information.
Added and removed rows are represented by source row numbers. Optional value previews omit key fields, include at most 20 other columns per sample, and truncate long cell contents.
Safety and limits
Files must be under
KINGWORKBOOK_ROOT; absolute paths and parent-directory traversal are rejected, and symlinks are resolved before the boundary check.Supported formats are
.csvand.xlsx. Legacy.xls, macro-enabled.xlsm, and binary.xlsbfiles are not supported.Files above 25 MiB, XLSX containers expanding beyond 150 MiB, sheets declaring more than 50,000 data rows or 256 columns, workbooks above 25 sheets, or operations above 250,000 cells are rejected or explicitly marked partial by inspection.
Comparison requires explicit key columns. Duplicate or blank keys are reported as ambiguity; the server does not guess a key.
Numeric text is parsed conservatively. Currency symbols, locale-specific separators, and accounting formats must be normalized before reconciliation.
Excel formulas and macros are never executed. Reconciliation uses cached formula results only when present and reports values with missing caches separately; cached values may be stale.
Formula-pattern differences can be intentional. Review every finding in Excel before changing a workbook.
Change values are excluded by default. No tool writes, deletes, uploads, emails, or opens a connection to a live spreadsheet service.
Sample data
The examples/ folder contains fictional invoice CSV snapshots that can be used to explore inspection, comparison, and reconciliation without exposing real business data.
Available Tools
4 toolscheck_formula_integrityCheck formula integrityARead-onlyIdempotent
Review formula cells in an XLSX sheet for cached errors, #REF! text, and unusual relative-pattern variations. It never evaluates formulas and presents variations as human review leads.
Inputs: file_path (required), sheet_name, max_findings. Returns: notes, findings, file_path, sheet_name, +6 more
compare_workbooksCompare workbooksARead-onlyIdempotent
Compare two CSV/XLSX tables using explicit key columns. Duplicate or blank keys are surfaced; keys are never returned. Changed cell values are excluded unless include_values is true.
Inputs: after_path (required), before_path (required), key_columns (required), after_sheet, +3 more. Returns: notes, status, changes, added_rows, +25 more
inspect_workbookInspect workbookARead-onlyIdempotent
Read-only profile of a CSV or XLSX file inside KINGWORKBOOK_ROOT. Returns sheet names, headers, row counts, blank counts, inferred types, and formula counts without cell values.
Inputs: file_path (required). Returns: notes, limits, sheets, file_path, +2 more
reconcile_totalsReconcile a totalARead-onlyIdempotent
Sum one selected numeric column and compare it with a supplied control total and tolerance. Formulas are not calculated; usable cached results are labeled and counted.
Inputs: column (required), file_path (required), expected_total (required), tolerance, +1 more. Returns: notes, column, status, data_rows, +11 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: profiling a workbook, comparing two tables, reconciling a numeric column against a control total, and reviewing formula integrity. There is little risk of misselection because the actions and outputs are explicitly differentiated.
All four names use a consistent snake_case verb_object pattern: inspect_workbook, compare_workbooks, reconcile_totals, check_formula_integrity. Singular/plural variation follows the object being acted on rather than breaking the convention.
Four tools is a well-scoped surface for a workbook auditing server, with each tool covering a distinct analysis workflow. No obvious redundant or filler tools are present.
The read-only workbook auditing surface covers the main operations: structure inspection, table comparison, total reconciliation, and formula integrity review. Minor gaps remain, such as extracting specific cell values or inspecting targeted ranges, but the core workflows are covered.
Related MCP Connectors
Read-only MCP over your Excel or Airtable plus the PDFs beside it, joined as one relational dataset.
1Let AI agents read, check and edit Excel models. Open a workbook or drop in one MCP config. Either way: typed cells, a formula dependency graph, and a verification certificate. Deterministic — no OCR, no model guessing at your numbers.
Independent static checks for supported tag and alarm CSV import formats; no HMI or PLC access.
Profile, clean and validate CSV/Excel data: schemas, dates, numbers, duplicates. Never guesses.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides tools to inspect dataset schema, profile, preview, and execute read-only SQL queries on uploaded CSV/Excel files.-
- FlicenseNot gradedqualityDmaintenanceProvides read-only access to local SharePoint/OneDrive synced files, enabling listing, searching, and querying Excel workbooks with filters and aggregations, all within a strict sandbox.-
- AlicenseAqualityCmaintenanceAudits Excel workbooks by tracing cell dependencies and detecting circular references, volatile functions, and other formula risks, enabling natural-language audit queries on local files.464 npmMIT
- FlicenseNot gradedqualityCmaintenanceEnables local, read-only extraction of text and structure from PDF, DOCX, PPTX, SVG, and PNG files, including OCR for images, directory tree and metadata reporting, with strict path isolation and audit logging.-