@hisaabo/mcp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+
2
+ > @hisaabo/mcp@0.1.0 build /home/saurabh/Coding/billkitaab/hisaabo/packages/mcp
3
+ > tsup src/index.ts --format esm
4
+
5
+ CLI Building entry: src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.1
8
+ CLI Using tsup config: /home/saurabh/Coding/billkitaab/hisaabo/packages/tsup.config.ts
9
+ CLI Target: node20
10
+ CLI Cleaning output folder
11
+ ESM Build start
12
+ ESM dist/bin/index.js 109.27 KB
13
+ ESM dist/bin/index.js.map 224.22 KB
14
+ ESM ⚡️ Build success in 40ms
@@ -0,0 +1,4 @@
1
+
2
+ > @hisaabo/mcp@0.1.0 typecheck /home/saurabh/Coding/billkitaab/hisaabo/packages/mcp
3
+ > tsc --noEmit
4
+
package/README.md ADDED
@@ -0,0 +1,155 @@
1
+ # @hisaabo/mcp
2
+
3
+ The Hisaabo MCP server. Connect Hisaabo invoicing data to Claude Desktop, OpenClaw, or any MCP-compatible AI agent.
4
+
5
+ [![Model Context Protocol](https://img.shields.io/badge/MCP-compatible-7C3AED)](https://modelcontextprotocol.io/)
6
+ [![Node.js](https://img.shields.io/badge/Node.js-20+-339933?logo=nodedotjs&logoColor=white)](https://nodejs.org/)
7
+
8
+ **What this does:** Once configured, you can ask Claude "How much does Gupta Enterprises owe me?" or "Create an invoice for 20 bags of rice at ₹1,250 each" and it will call the real Hisaabo API, use your live business data, and return accurate results.
9
+
10
+ ---
11
+
12
+ ## 5-Minute Setup
13
+
14
+ **Step 1: Get your credentials**
15
+
16
+ ```bash
17
+ npm install -g @hisaabo/cli
18
+ hisaabo login --api-url https://your-hisaabo-instance.com
19
+ hisaabo whoami --json
20
+ ```
21
+
22
+ Copy the `token`, `tenantId`, and `businessId` values from the output.
23
+
24
+ **Step 2: Add to Claude Desktop**
25
+
26
+ Open `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows) and add:
27
+
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "hisaabo": {
32
+ "command": "npx",
33
+ "args": ["@hisaabo/mcp"],
34
+ "env": {
35
+ "HISAABO_API_URL": "https://your-hisaabo-instance.com",
36
+ "HISAABO_API_KEY": "sess_...",
37
+ "HISAABO_TENANT_ID": "tenant-uuid-here",
38
+ "HISAABO_BUSINESS_ID": "business-uuid-here"
39
+ }
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ **Step 3: Restart Claude Desktop**
46
+
47
+ Ask Claude: *"What is my business's total outstanding receivables?"*
48
+
49
+ ---
50
+
51
+ ## Environment Variables
52
+
53
+ | Variable | Required | Description |
54
+ |---|---|---|
55
+ | `HISAABO_API_URL` | Yes | Base URL of your Hisaabo API (e.g. `http://localhost:3000` for local dev) |
56
+ | `HISAABO_API_KEY` | Yes | Session token from `hisaabo whoami --json` → `token` |
57
+ | `HISAABO_TENANT_ID` | Yes | Tenant UUID from `hisaabo whoami --json` → `tenantId` |
58
+ | `HISAABO_BUSINESS_ID` | Yes | Business UUID from `hisaabo whoami --json` → `businessId` |
59
+
60
+ **Token expiry:** Session tokens last 30 days. If the MCP server stops responding, run `hisaabo login` to get a fresh token and update the `claude_desktop_config.json`.
61
+
62
+ ---
63
+
64
+ ## Available Tools
65
+
66
+ | Tool | What it does |
67
+ |---|---|
68
+ | `invoice_list` | List invoices with filters (status, party, date range) |
69
+ | `invoice_create` | Create a sale or purchase invoice |
70
+ | `invoice_get` | Get a single invoice with all line items |
71
+ | `invoice_update_status` | Change invoice status (draft → sent → paid) |
72
+ | `party_list` | List customers and suppliers with outstanding balances |
73
+ | `party_get` | Get a party's full profile and running ledger |
74
+ | `party_create` | Add a new customer or supplier |
75
+ | `item_list` | List items with current stock levels |
76
+ | `item_get` | Get a single item with pricing and stock history |
77
+ | `item_adjust_stock` | Manually adjust stock (corrections, write-offs) |
78
+ | `payment_list` | List payments with filters |
79
+ | `payment_create` | Record a payment (Cash, UPI, Bank, Cheque) |
80
+ | `expense_list` | List expenses by category and date |
81
+ | `expense_create` | Record a business expense |
82
+ | `dashboard_summary` | Get key business metrics for a time period |
83
+ | `gst_report` | Get GSTR-1 or GSTR-3B data for a month (pass `report_type: "gstr1"` or `"gstr3b"`) |
84
+
85
+ ## Available Resources
86
+
87
+ Resources are read-only context that AI agents can load into their context window:
88
+
89
+ | Resource URI | Description |
90
+ |---|---|
91
+ | `business://current` | Business profile: name, GSTIN, currency, financial year |
92
+ | `parties://customers` | Top 50 customers by name (id, name, phone, balance) |
93
+ | `parties://suppliers` | Top 50 suppliers by name |
94
+ | `items://inventory` | Up to 100 items with stock levels, prices, HSN codes |
95
+ | `invoices://recent` | Last 10 sale invoices |
96
+ | `dashboard://summary` | Current FY: total sales, receivables, payables, cash |
97
+
98
+ ---
99
+
100
+ ## Conversation Examples
101
+
102
+ **Check outstanding balance:**
103
+ ```
104
+ You: "How much does Vinod & Sons owe me?"
105
+ Claude: "Vinod & Sons has ₹45,000 outstanding across 3 invoices.
106
+ The oldest is BB-12801 from 63 days ago.
107
+ Should I draft a payment reminder?"
108
+ ```
109
+
110
+ **Create an invoice:**
111
+ ```
112
+ You: "Bill Sharma Fabrics for 50 meters of georgette at ₹180/m, due 15th April"
113
+ Claude: "Done. Invoice BB-15042 created:
114
+ Sharma Fabrics — ₹9,000
115
+ 50m Georgette @ ₹180/m (GST 5%)
116
+ Total: ₹9,450 | Due: April 15, 2026"
117
+ ```
118
+
119
+ **Morning business briefing:**
120
+ ```
121
+ You: "Give me today's numbers"
122
+ Claude: "Today so far: ₹84,500 revenue (12 invoices)
123
+ Outstanding: ₹2,34,000 across 18 invoices
124
+ Critical: Vinod & Sons — ₹45,000 overdue 63 days
125
+ 3 items need restocking. GSTR-3B due in 4 days."
126
+ ```
127
+
128
+ ---
129
+
130
+ ## Transport
131
+
132
+ The server uses stdio transport (stdin/stdout), which is the standard for MCP servers running as subprocesses. Your MCP client (Claude Desktop, OpenClaw) starts and stops the process automatically. No separate server daemon or open port is needed.
133
+
134
+ ---
135
+
136
+ ## Development
137
+
138
+ ```bash
139
+ # From monorepo root
140
+ pnpm --filter @hisaabo/mcp dev
141
+
142
+ # Build
143
+ pnpm --filter @hisaabo/mcp build
144
+
145
+ # Type-check
146
+ pnpm --filter @hisaabo/mcp typecheck
147
+ ```
148
+
149
+ For local development, set `HISAABO_API_URL=http://localhost:3000` and use a session token from a local login.
150
+
151
+ ---
152
+
153
+ ## Full Documentation
154
+
155
+ [docs.hisaabo.in/ai/mcp-server](https://docs.hisaabo.in/ai/mcp-server/) — Setup guide, all tools with input/output schemas, security considerations, and integration examples.