@ongravy/mcp-server
v0.1.1
Published
MCP (Model Context Protocol) server exposing OnGravy's accounting toolkit to Claude Desktop, Cursor, Zed, and other MCP clients.
Maintainers
Readme
@ongravy/mcp-server
Production MCP (Model Context Protocol) server exposing OnGravy's accounting / tax / audit toolkit (60+ tools) to any MCP-compatible client — Claude Desktop, Cursor, Zed, custom apps.
What this gives you
Once installed in your Claude Desktop config, you can ask the model questions like:
- "Show me top 10 customers by revenue this quarter"
- "What's my GST liability for May 2026?"
- "Which invoices are overdue beyond 60 days?"
- "Look up the e-invoice rule for high-value B2B transactions"
…and Claude reaches into a live OnGravy backend, runs the appropriate tool with proper authorisation, and answers from real data.
Installation
npm install -g @ongravy/mcp-serverAdd to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"ongravy": {
"command": "ongravy-mcp",
"env": {
"ONGRAVY_API_TOKEN": "<personal access token>",
"ONGRAVY_BUSINESS_ID": "<business uuid>",
"ONGRAVY_BASE_URL": "https://app.ongravy.com"
}
}
}
}Restart Claude Desktop. The OnGravy tools appear in the tool picker.
Architecture
Claude Desktop / Cursor / Zed → MCP wire (JSON-RPC over stdio)
│
▼
@ongravy/mcp-server (this package)
│
│ ↓ HTTPS w/ bearer token ↓
│
OnGravy backend
(60+ tools across 4 jurisdictions)The MCP server is intentionally thin: it's a stdio adapter that translates between MCP wire format and OnGravy's HTTP API. All business logic lives in the main app; this package only forwards calls. Stateless — no DB, no secrets stored.
Sample tools (8 reference implementations)
The package ships with 8 pure-compute reference tools that demonstrate the pattern:
| Tool | Purpose |
|---|---|
| compute_gst | CGST + SGST + IGST split on a sale (intra/inter-state aware) |
| format_invoice_number | INV/2026-27/0042-style invoice numbering |
| check_msme_due_date | Sec 16 MSMED Act 45-day deadline checker |
| validate_gstin | 15-character GSTIN format + checksum validation |
| classify_tds_section | Heuristic 194C/I/J/H/Q TDS-section classifier |
| validate_pan | PAN format + entity-type decoder |
| compute_msme_interest | Compound interest at 3× RBI bank rate (Sec 16) |
| check_269st_violation | Sec 269ST cash-receipt limit + 100% penalty alert |
Auth model
Each user obtains a personal-access token from app.ongravy.com → Settings → MCP. The MCP server passes it as Authorization: Bearer <token> on every backend call. The backend resolves it to a user, applies row-level security, and gates tools by permission level.
Why this is interesting
- First production MCP server for accounting — most MCP servers in the wild are demos (file-system, sqlite, github). This one drives a real-money domain with auth, audit trails, and jurisdiction gating.
- 60+ tools, four jurisdictions (India, UAE, Saudi Arabia, Singapore) — broad surface area MCP clients have not seen before.
- Six-layer hallucination defence in the upstream OnGravy backend (retrieval grounding → schema-constrained output → referential probes → idempotent writes → audit log → cost cap). End-to-end hallucination rate measured at ~0.3%.
- Pure-tested format conversion — 38 tests covering MCP-name sanitisation, non-object schemas, jurisdiction filtering, and per-tool correctness.
Read the full writeup: Six-layer hallucination defence.
Local development
git clone https://github.com/pratikrevankar/ongravy
cd ongravy/mcp-server
npm install
npm test # 38 tests
npm run build # TypeScript → dist/To smoke-test against your local Claude Desktop, point the config at dist/index.js directly:
{
"mcpServers": {
"ongravy": {
"command": "node",
"args": ["/absolute/path/to/ongravy/mcp-server/dist/index.js"],
"env": { "ONGRAVY_API_TOKEN": "...", "ONGRAVY_BUSINESS_ID": "..." }
}
}
}Author
Pratik Revankar — building OnGravy, an AI-native accounting platform for India launching June 2026.
@pratikrevankar on X.
License
MIT — fork freely.
