@hoagsmedia/frugr-mcp 0.3.0 → 0.3.1
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.
- package/README.md +2 -2
- package/index.mjs +31 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Preferred npm name for the frugr **read-only** MCP stdio bridge.
|
|
4
4
|
|
|
5
|
-
This package is identical to [`@hoagsmedia/frgur-mcp-server`](https://www.npmjs.com/package/@hoagsmedia/frgur-mcp-server) v0.3.
|
|
5
|
+
This package is identical to [`@hoagsmedia/frgur-mcp-server`](https://www.npmjs.com/package/@hoagsmedia/frgur-mcp-server) v0.3.1 — same `index.mjs`, same env vars (`FRGUR_API_TOKEN`, `FRGUR_API_URL`). The legacy `frgur` spelling remains for backward compatibility.
|
|
6
6
|
|
|
7
7
|
Full setup, tool list, and security notes: [mcp-server README on GitHub](https://github.com/hoagsmedia/frugr/blob/main/mcp-server/README.md) or the [`frgur-mcp-server` npm page](https://www.npmjs.com/package/@hoagsmedia/frgur-mcp-server).
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@ Full setup, tool list, and security notes: [mcp-server README on GitHub](https:/
|
|
|
11
11
|
"mcpServers": {
|
|
12
12
|
"frugr": {
|
|
13
13
|
"command": "npx",
|
|
14
|
-
"args": ["-y", "@hoagsmedia/frugr-mcp@0.3.
|
|
14
|
+
"args": ["-y", "@hoagsmedia/frugr-mcp@0.3.1"],
|
|
15
15
|
"env": {
|
|
16
16
|
"FRGUR_API_URL": "https://frugr.app",
|
|
17
17
|
"FRGUR_API_TOKEN": "frgur_pat_your_token_here"
|
package/index.mjs
CHANGED
|
@@ -92,15 +92,35 @@ export function mimeFromExtension(filePath) {
|
|
|
92
92
|
const IMPORT_RECEIPT_TOOL = {
|
|
93
93
|
name: 'import_receipt_file',
|
|
94
94
|
description:
|
|
95
|
-
'Import a receipt from a file on THIS
|
|
96
|
-
|
|
97
|
-
'
|
|
95
|
+
'Import a receipt from a file on the machine running THIS MCP bridge process (e.g. ' +
|
|
96
|
+
"~/Downloads/receipt.pdf on the user's computer). filePath resolves against the bridge " +
|
|
97
|
+
"host's filesystem ONLY — paths from a chat-upload sandbox (e.g. /mnt/user-data/uploads/…) " +
|
|
98
|
+
'or any other machine will NEVER resolve here; do not retry them. For files you can read ' +
|
|
99
|
+
'but the bridge cannot, call propose_expense_from_receipt with base64 instead (3 MB decoded ' +
|
|
100
|
+
'cap; downscale large scans first). Max 3 MB; PDF, JPEG, PNG, WebP, GIF, or HEIC. If you ' +
|
|
101
|
+
'have already seen the receipt contents, ALWAYS include `extracted` — frugr then uses your ' +
|
|
102
|
+
'reading instead of running (and billing) its own AI extraction.',
|
|
98
103
|
inputSchema: {
|
|
99
104
|
type: 'object',
|
|
100
105
|
properties: {
|
|
101
106
|
filePath: {
|
|
102
107
|
type: 'string',
|
|
103
108
|
description: 'Absolute or ~-relative path to the receipt file on this machine.'
|
|
109
|
+
},
|
|
110
|
+
extracted: {
|
|
111
|
+
type: 'object',
|
|
112
|
+
description:
|
|
113
|
+
'The fields you already read off this receipt. Preferred whenever you have seen it.',
|
|
114
|
+
properties: {
|
|
115
|
+
vendor: { type: 'string', description: 'Merchant name as printed.' },
|
|
116
|
+
amountCents: {
|
|
117
|
+
type: 'integer',
|
|
118
|
+
description: 'Receipt TOTAL in cents, positive (e.g. $31.03 -> 3103).'
|
|
119
|
+
},
|
|
120
|
+
date: { type: 'string', description: 'Receipt date, YYYY-MM-DD.' },
|
|
121
|
+
category: { type: 'string', description: 'Optional expense category suggestion.' }
|
|
122
|
+
},
|
|
123
|
+
required: ['amountCents']
|
|
104
124
|
}
|
|
105
125
|
},
|
|
106
126
|
required: ['filePath']
|
|
@@ -132,7 +152,14 @@ async function importReceiptFile(args) {
|
|
|
132
152
|
const data = await readFile(filePath);
|
|
133
153
|
return call('tools/call', {
|
|
134
154
|
name: 'propose_expense_from_receipt',
|
|
135
|
-
arguments: {
|
|
155
|
+
arguments: {
|
|
156
|
+
filename: basename(filePath),
|
|
157
|
+
mimeType,
|
|
158
|
+
dataBase64: data.toString('base64'),
|
|
159
|
+
...(args?.extracted && typeof args.extracted === 'object'
|
|
160
|
+
? { extracted: args.extracted }
|
|
161
|
+
: {})
|
|
162
|
+
}
|
|
136
163
|
});
|
|
137
164
|
}
|
|
138
165
|
|
package/package.json
CHANGED