Netsuite Saved Search Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Netsuite Saved Search Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
NetSuite saved search exports look like Excel files but are actually XML SpreadsheetML with a .xls extension — Excel opens them, pandas trips on them, and most teams writing Claude integrations against NetSuite end up rebuilding the same parser by hand. This MCP server exposes those exports as a structured query interface for Claude: discover files, inspect columns, filter and aggregate rows, categorize by memo keywords, surface anomalies. Seven tools wrap a parser that handles the format's real quirks — entity-encoded text, empty cells flagged with ss:Index, drifting column layouts between saved searches, DateTime cells that won't parse. The parser runs in lxml's recovery mode and reports broken cells as structured warnings rather than crashing on them.
A condensed exchange reproduced from the claude-eval-harness NetSuite suite's anomaly_zero_activity_june case (runs/baseline-sonnet-4-6.json). The agent's tool calls are auditable, the parser's total_supporting_count is citable, and the model never has to fabricate numbers it can't point at.
user What stands out in this GL? Run detect_anomalies on
sample_gl_export.xls (account_column=Account,
amount_column=Amount, period_column=Period).
agent → detect_anomalies(file_path="sample_gl_export.xls",
account_column="Account",
amount_column="Amount",
period_column="Period")
← {findings: [
{severity:"HIGH", category:"zero_activity_period",
description:"No rows recorded for Jun 2024",
total_supporting_count:0},
{severity:"MEDIUM", category:"ratio_anomaly",
description:"Account 1200 in Sep 2024 totals 319,219.74
— 3.1x the 1200 median of 103,259.01",
supporting_rows:[...10 rows...],
total_supporting_count:17}]}
agent HIGH: no rows posted to June 2024 inside an otherwise continuous
range — likely an extraction gap or skipped close. MEDIUM:
Account 1200 spiked to 3.1× its own median in September across
17 cited rows. supporting_rows trims to 10; total_supporting_count
carries the full count so it's verifiable.The full anomaly response also lives in examples/walkthrough.md.
uvx netsuite-saved-search-mcp # or: pip install netsuite-saved-search-mcp
export NSMCP_ROOT=/path/to/your/exportsAdd to Claude Desktop's config (full version in examples/claude_desktop_config.json):
{
"mcpServers": {
"netsuite-saved-search": {
"command": "uvx",
"args": ["netsuite-saved-search-mcp"],
"env": {"NSMCP_ROOT": "/path/to/your/exports"}
}
}
}Then any tool call lands directly:
{
"tool": "query_export",
"arguments": {
"file_path": "Q3_GL.xls",
"filters": [{"op": "eq", "column": "Account", "value": "4000"}]
}
}The parser is usable directly without the MCP transport — useful for notebooks, batch scripts, or pytest fixtures that don't want stdio in the loop:
from netsuite_saved_search_mcp.parser import NetSuiteExport
export = NetSuiteExport("tests/fixtures/sample_gl_export.xls")
print(export.headers) # ['Order Type', 'Date', 'Period', ...]
print(len(export.rows)) # 212
print(export.rows[0]["Account"]) # '4000'NetSuiteExport(path) parses the file end-to-end on construction. .rows is a list of dicts keyed by header name; cell values are typed (str, int, float, datetime.date, bool, or None). .parse_warnings exposes any recoverable issues lxml hit on the way through.
For audit and accounting use, the server enforces a tight blast radius on what it can touch. (Reporting channel for vulnerabilities is in SECURITY.md.)
os.getcwd() if unset). Paths that resolve outside the root raise PathTraversalError before any I/O._resolve_under_root calls Path.resolve() on the candidate then checks relative_to(root). resolve() collapses .. segments and follows symlinks to their real target, so a symlink inside the root that points outside it fails the check..xls files for reading only. No tool writes to the filesystem.mcp, lxml, python-dateutil, pydantic — none of them dial out during a tool call.NSMCP_ROOT path. Tool calls log nothing by default; row data, column values, and financial figures never reach the log handler.NetSuite saved search exports use XML SpreadsheetML, not Excel binary, despite the .xls extension. Column layouts drift between saved searches, so code that hardcodes column letters breaks on the next export. Empty cells are silently omitted from each row with ss:Index attributes marking where they were, which trips naive sequential parsers. Every finance team using Claude with NetSuite ends up rebuilding the same parser. This server solves it once.
| Tool | Description | Key parameters |
|---|---|---|
list_exports | Scan a directory for .xls files; return one summary per file with row counts, header counts, warning counts, and detected date range. | directory |
get_headers | Return column headers, their spreadsheet column letters, and the 0-indexed header row. | file_path |
query_export | Filter rows by a list of predicates (AND-combined), optionally project to a subset of columns, cap results. | file_path, filters, columns?, limit? |
aggregate_export | Group rows by one or more columns; compute sum/count/avg/min/max per group. | file_path, group_by, measures |
categorize_by_memo | Tag every row with a _category derived from case-insensitive keyword rules across one or more memo columns. | file_path, memo_columns, rules |
detect_anomalies | Three checks: zero-activity periods (HIGH), ratio anomalies (MEDIUM), document-count variance (MEDIUM). | file_path, account_column, amount_column, period_column |
get_parse_warnings | Return parse warnings (phantom_column, bad_datetime, encoding_recovery, empty_row_skipped) captured during parsing of the specified file. | file_path |
Predicates are a discriminated union keyed on op. Example query with two predicates:
{
"file_path": "deferred_commissions_2024.xls",
"filters": [
{"op": "eq", "column": "Account", "value": "1321"},
{"op": "date_range", "column": "Date", "start": "2024-01-01", "end": "2024-12-31"}
],
"columns": ["Date", "Document Number", "Amount", "Memo (line)"],
"limit": 100
}Measures for aggregate_export:
[{"column": "Amount", "op": "sum", "alias": "total"}, {"column": "Document Number", "op": "count"}]See examples/walkthrough.md for an end-to-end example using the included sanitized fixtures.
header_row override is planned.detect_anomalies only recognises period labels in three formats — Jan 2024, January 2024, 2024-01. Quarter labels (Q1 2024) and fiscal-period labels are silently skipped. The ratio and document-count checks also need ≥3 distinct periods to produce a finding.NetSuiteExport instances in memory keyed by (path, mtime) and is unbounded — a long-running session against a large directory will keep every parsed export resident.Predicate/Measure models may change before v1.0.Issues and PRs welcome. Run uv run pytest, uv run mypy src, and uv run ruff check src tests before submitting; all three should be clean. Commits follow Conventional Commits. New tools require a Pydantic response model, a happy-path test against the included GL fixture, a failure-path test (missing file or unknown column), and an entry in the table above.
MIT. See LICENSE.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.