MCP server overview
what is Bilig?
Bilig is a Node/TypeScript toolkit and runtime for running “workbook-shaped” business rules server-side. It provides a typed WorkPaper object that services, queue workers, tests and tool integrations can edit, recalculate formulas, read outputs, persist/restore JSON, and expose MCP (Model Context Protocol) tools for agent integrations and automated workflows.
how to use Bilig?
- Install the published package: npm install @bilig/workpaper (Node >= 22/24 recommended).
- Quick proofs: run one-off evaluators shipped with the package, for example: npm exec --yes --package @bilig/workpaper@latest – bilig-evaluate --door workpaper-service --json npm exec --yes --package @bilig/workpaper@latest – bilig-evaluate --door agent-mcp --json
- Create a starter project: npm create @bilig/workpaper@latest pricing-workpaper; then npm install && npm run smoke to run the 90-second proof that edits an input, recalculates formulas, persists JSON and restores it.
- Programmatic API: import buildA1WorkPaper from @bilig/workpaper, set inputs with book.set()/editManyAndReadback(), read computed values via readback/display APIs, and export/save JSON via book.saveJson()/exportSnapshot().
- For agent/tool hosts, run the included MCP server binary (bilig-workpaper-mcp) or use the MCP endpoints and proof loops described in the docs.
key features
- Typed WorkPaper runtime: edit inputs, recalc formulas, read outputs with typed proof objects.
- Persistence and restore: serialize WorkPaper JSON, restore state, and verify restored values.
- MCP tool surface: tool discovery, read/write cell commands, export and restart proofs for agent integrations.
- CLI evaluators & binaries: built-in bilig-evaluate, bilig-workpaper-mcp, bilig-formula-clinic, and other helper tools.
- XLSX import/export and compatibility diagnostics for file boundaries (separate path from service-owned state).
- Starter project generator and runnable examples (quote approval API, invoice totals, forecasts, agent adapter examples).
- Published with package provenance (SLSA, signatures) and CI/security scans.
use cases
- Backend pricing, quote-approval and decision APIs that need deterministic spreadsheet logic server-side.
- Automated payout checks, import validation, forecasts, CI fixtures and formula-backed workflow steps.
- Agent/tool integrations that require exact cell readback and programmatic edits via MCP tools.
- Testing harnesses where deterministic recalculation and persisted workbook state are required.
- Saved-file import/export diagnostics when importing real Excel/XLSX workbooks.
FAQ from Bilig
-
Q: Does Bilig run Excel/Excel macros or provide a visual spreadsheet UI? A: No. Bilig is a headless, server-side workbook runtime and is not a replacement for desktop Excel, macros, or visual editing. It does include optional browser renderer packages, but core use is programmatic.
-
Q: Can I import .xlsx files and get exact Excel parity? A: You can import XLSX and run compatibility diagnostics, but Bilig does not claim full Excel parity. The project documents where Excel compatibility is not proven and provides an “Excel oracle” workflow for authoritative comparisons.
-
Q: What are runtime requirements and package trust? A: Node >=22 (documentation references Node 24+ for development), published npm package includes signatures and SLSA provenance; commands are provided to inspect attestations.
-
Q: How do I prove the runtime works in my environment? A: Use the provided evaluators (workpaper-service and agent-mcp) and the 90-second starter smoke tests; they return a verified proof object showing edits, recalculation, persisted bytes and restored matches.
-
Q: Is Bilig suitable for manual spreadsheet editing or one-off arithmetic? A: No — it’s designed for programmatic, deterministic workbook-shaped business logic. Manual editing, Office macros or UI-first workflows are considered bad fits.
-
Q: What license and security/contact info? A: MIT license. Security reports via GitHub private vulnerability reporting or security@proompteng.ai; support guidance is in SUPPORT.md.
(See repo docs and examples for more detailed integration recipes, MCP host handoff, and advanced adapters.)