formlab-mcp 0.6.20 → 0.6.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formlab-mcp",
3
- "version": "0.6.20",
3
+ "version": "0.6.21",
4
4
  "mcpName": "io.github.juliu1980/formlab-mcp",
5
5
  "description": "Read-only Model Context Protocol server for FormLab — lets Claude (and other MCP clients) read and analyze your FormLab data, from a local export file OR your live cloud workspace.",
6
6
  "type": "module",
package/server.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.juliu1980/formlab-mcp",
4
4
  "description": "Read-only MCP for FormLab — let Claude query your formulation lab. Free reads a local export; Pro connects to your live cloud workspace with a dedicated read-only token.",
5
- "version": "0.6.20",
5
+ "version": "0.6.21",
6
6
  "websiteUrl": "https://formvix.com/mcp",
7
7
  "repository": {
8
8
  "url": "https://github.com/juliu1980/FormLab",
@@ -13,7 +13,7 @@
13
13
  {
14
14
  "registryType": "npm",
15
15
  "identifier": "formlab-mcp",
16
- "version": "0.6.20",
16
+ "version": "0.6.21",
17
17
  "runtimeHint": "npx",
18
18
  "transport": {
19
19
  "type": "stdio"
@@ -89,6 +89,10 @@ function _trimIngredient(i) {
89
89
  // ingredient's ing.sources[]). Null when the lot predates sources or is unlinked.
90
90
  function _lotSourceInfo(l) {
91
91
  if (!l || !l.sourceId) return null;
92
+ // `db` is NOT module-scoped here — handlers pull it from getStore() — so do the
93
+ // same. (0.6.20 shipped a bare `db` reference; it was masked by the guard above
94
+ // until the first lot with a sourceId existed, then threw "db is not defined".)
95
+ const { db } = getStore();
92
96
  const ing = (db.ingredients || []).find(i => i && i.id === l.ingredientId);
93
97
  const s = (ing && Array.isArray(ing.sources)) ? ing.sources.find(x => x.id === l.sourceId) : null;
94
98
  if (!s) return null;