@sebamomann/plants-mcp 2.13.0 → 3.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,57 @@
1
+ {
2
+ "name": "@sebamomann/plants-mcp",
3
+ "version": "3.1.0",
4
+ "description": "MCP server for the Sprig plant app: 82 tools to read a plant collection, browse the shared global plant type catalog, log care (watering, fertilizing, repotting, refills, hydro events), edit a plant's identity/care/lifecycle status, add, propagate or merge plants, snooze a due date, answer an autumn watering check or mark a plant due today, check for nudges worth mentioning, manage a wishlist and notifications, watch a plant type for changes, check vacation status, read past problem diagnoses, create or update a location (incl. its controlled-climate setting), create a soil/fertilizer/pot, merge a duplicate soil into another, and contribute a new species to the catalog. Read-only by default; writes need a write-scoped API key. Two tools can delete a watering/fertilization event; nothing else deletes collection history. 18 more tools read, edit, merge and review the shared global plant type catalog and the instance's operational status (queues, catalog health, activity, growth, community, trade and content aggregates) for an admin-scoped key.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "sebamomann <github@sebamomann.de>",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/sebamomann/plants.git",
11
+ "directory": "mcp"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/sebamomann/plants/issues"
15
+ },
16
+ "homepage": "https://github.com/sebamomann/plants/tree/main/mcp#readme",
17
+ "keywords": [
18
+ "mcp",
19
+ "mcp-server",
20
+ "model-context-protocol",
21
+ "claude",
22
+ "plants",
23
+ "houseplants",
24
+ "gardening",
25
+ "plant-care",
26
+ "sprig"
27
+ ],
28
+ "engines": {
29
+ "node": ">=20"
30
+ },
31
+ "bin": {
32
+ "plants-mcp": "dist/index.js"
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "CHANGELOG.md"
37
+ ],
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
41
+ "scripts": {
42
+ "build": "tsc && node scripts/write-entry.mjs",
43
+ "start": "node dist/index.js",
44
+ "dev": "tsx src/index.ts",
45
+ "typecheck": "tsc --noEmit",
46
+ "check:docs": "node scripts/check-tool-docs.mjs",
47
+ "prepublishOnly": "npm run build"
48
+ },
49
+ "dependencies": {
50
+ "@modelcontextprotocol/sdk": "^1.30.1",
51
+ "zod": "^4.6.5"
52
+ },
53
+ "devDependencies": {
54
+ "@types/node": "^26.6.2",
55
+ "typescript": "^6.0.3"
56
+ }
57
+ }
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { createApiClient } from "../../app/_lib/mcp/apiClient.js";
5
+ import { registerAdminToolsIfPermitted, registerTools } from "../../app/_lib/mcp/tools.js";
6
+ import pkg from "../package.json" with { type: "json" };
7
+ /**
8
+ * Thin stdio wrapper around the shared tool set in `app/_lib/mcp/tools.ts`: env -> API
9
+ * client -> tool registration -> stdio transport. All tools live there; the same
10
+ * registration is reused by the remote endpoint.
11
+ *
12
+ * The advertised version comes from package.json, so a release bump cannot leave the
13
+ * MCP handshake reporting a stale number. `../package.json` resolves to the package
14
+ * manifest from `src/index.ts` (tsx dev) and, because the build emits it, from
15
+ * `dist/mcp/src/index.js` too.
16
+ */
17
+ const VERSION = pkg.version;
18
+ const API_URL = (process.env.PLANT_API_URL ?? "http://localhost:3000").replace(/\/+$/, "");
19
+ const API_KEY = process.env.PLANT_API_KEY;
20
+ if (!API_KEY) {
21
+ console.error("[plants-mcp] Missing PLANT_API_KEY environment variable.");
22
+ process.exit(1);
23
+ }
24
+ async function main(apiKey) {
25
+ const client = createApiClient({ apiUrl: API_URL, apiKey });
26
+ const server = new McpServer({ name: "plants-mcp", version: VERSION });
27
+ registerTools(server, client);
28
+ await registerAdminToolsIfPermitted(server, client);
29
+ const transport = new StdioServerTransport();
30
+ await server.connect(transport);
31
+ console.error(`[plants-mcp] v${VERSION} connected. API base: ${API_URL}`);
32
+ }
33
+ main(API_KEY).catch((err) => {
34
+ console.error("[plants-mcp] fatal:", err);
35
+ process.exit(1);
36
+ });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sebamomann/plants-mcp",
3
- "version": "2.13.0",
4
- "description": "MCP server for the Sprig plant app: 79 tools to read a plant collection, browse the shared global plant type catalog, log care (watering, fertilizing, repotting, refills, hydro events), edit a plant's identity/care/lifecycle status, add, propagate or merge plants, snooze a due date, check for nudges worth mentioning, manage a wishlist and notifications, watch a plant type for changes, check vacation status, read past problem diagnoses, create a location/soil/fertilizer/pot, merge a duplicate soil into another, and contribute a new species to the catalog. Read-only by default; writes need a write-scoped API key. Two tools can delete a watering/fertilization event; nothing else deletes collection history. 18 more tools read, edit, merge and review the shared global plant type catalog and the instance's operational status (queues, catalog health, activity, growth, community, trade and content aggregates) for an admin-scoped key.",
3
+ "version": "3.1.0",
4
+ "description": "MCP server for the Sprig plant app: 82 tools to read a plant collection, browse the shared global plant type catalog, log care (watering, fertilizing, repotting, refills, hydro events), edit a plant's identity/care/lifecycle status, add, propagate or merge plants, snooze a due date, answer an autumn watering check or mark a plant due today, check for nudges worth mentioning, manage a wishlist and notifications, watch a plant type for changes, check vacation status, read past problem diagnoses, create or update a location (incl. its controlled-climate setting), create a soil/fertilizer/pot, merge a duplicate soil into another, and contribute a new species to the catalog. Read-only by default; writes need a write-scoped API key. Two tools can delete a watering/fertilization event; nothing else deletes collection history. 18 more tools read, edit, merge and review the shared global plant type catalog and the instance's operational status (queues, catalog health, activity, growth, community, trade and content aggregates) for an admin-scoped key.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "sebamomann <github@sebamomann.de>",
@@ -39,13 +39,11 @@
39
39
  "access": "public"
40
40
  },
41
41
  "scripts": {
42
- "build": "tsc",
42
+ "build": "tsc && node scripts/write-entry.mjs",
43
43
  "start": "node dist/index.js",
44
44
  "dev": "tsx src/index.ts",
45
45
  "typecheck": "tsc --noEmit",
46
46
  "check:docs": "node scripts/check-tool-docs.mjs",
47
- "test": "vitest run",
48
- "test:watch": "vitest",
49
47
  "prepublishOnly": "npm run build"
50
48
  },
51
49
  "dependencies": {
@@ -54,7 +52,6 @@
54
52
  },
55
53
  "devDependencies": {
56
54
  "@types/node": "^26.6.2",
57
- "typescript": "^6.0.3",
58
- "vitest": "^5.0.1"
55
+ "typescript": "^6.0.3"
59
56
  }
60
57
  }