@onedollarcomputer/odc-mcp 0.4.0 → 0.5.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.
Files changed (3) hide show
  1. package/README.md +3 -1
  2. package/bin.js +44 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -4,13 +4,15 @@ Stdio MCP for One Dollar Computer — curriculum lessons **and** firmware projec
4
4
 
5
5
  See [../README.md](../README.md) for pair flow and Cursor/`mcp.json` setup.
6
6
 
7
- **Pair once:** Agent → **Copy** on `/c/` or `/project/` → `curriculum_pair` with that link (MCP server name: `odc-curriculum`).
7
+ **Connect once:** `odc_connect` — the agent returns an approval link; the user opens it in any browser, signs in with Google, and approves (MCP server name: `odc-curriculum`). An Agent link copied from `/c/` or `/project/` with `curriculum_pair` also works.
8
8
 
9
9
  **Projects:** `project_brief` → `project_list` / `project_create` / `project_get` / `project_update` / `project_publish` / `project_fork`
10
10
  **Lessons:** `curriculum_agent_brief` → `curriculum_create_lesson` / `curriculum_update_lesson` / …
11
11
 
12
12
  **Hardware:** physical button (pin 13) = bootloader / Upload only — never `read_button()`. See [../../docs/BUTTON.md](../../docs/BUTTON.md).
13
13
 
14
+ **Feedback & safety:** agents can report how the MCP treated them with `odc_feedback` (rating, category, what worked / what failed). The channel is **one-way and write-only by design**: feedback is stored as data for the team, is never returned to any agent, never enters briefs, prompts, or instructions, and never triggers an action — so it cannot become a prompt-injection path. A scheduled health check (every 6 hours) verifies the API, the package, and a real compile, and digests feedback under a written protocol: numbers first, free text only as labeled quotes, imperative text flagged as an injection attempt. Full model: `FEEDBACK-AND-SAFETY.md` in the odc-mcp documentation.
15
+
14
16
  ```bash
15
17
  npm install
16
18
  node bin.js # normally launched by the MCP host (Cursor: .cursor/mcp.json)
package/bin.js CHANGED
@@ -35,7 +35,7 @@ const API_ORIGIN = readApiOrigin();
35
35
  // Function below died with the Oct 2026 billing closure (500/503). NOTE: this
36
36
  // is a cloudflared quick-tunnel URL and CHANGES when that tunnel restarts;
37
37
  // read the current one from /data/odc-api/tunnel-api.log on the box.
38
- const MARITIME_API = "https://executives-loop-seattle-aware.trycloudflare.com";
38
+ const MARITIME_API = "https://wait-successfully-vincent-operational.trycloudflare.com";
39
39
 
40
40
  const DEFAULT_API =
41
41
  process.env.ODC_CURRICULUM_API ||
@@ -180,7 +180,7 @@ function loadProjectBrief() {
180
180
  const server = new McpServer(
181
181
  {
182
182
  name: "odc-curriculum",
183
- version: "0.4.0"
183
+ version: "0.5.1"
184
184
  },
185
185
  {
186
186
  instructions:
@@ -188,7 +188,8 @@ const server = new McpServer(
188
188
  "Start by checking curriculum_status. If it says paired: false, call odc_connect and show the user the approveUrl — they open it in their own browser, sign in with Google, and approve. Never ask the user for a password, and never fetch the approveUrl yourself. " +
189
189
  "Firmware rules: complete Simple Rust programs (use odc::*; fn main), pins by their printed numbers 0–19, LED is pin 19, never pin 13 or read_button() (bootloader only). " +
190
190
  "project_publish is irreversible — confirm with the user before calling it. odc_compile needs no pairing. " +
191
- "If a call answers that the connection is no longer valid, reconnect with odc_connect."
191
+ "If a call answers that the connection is no longer valid, reconnect with odc_connect. " +
192
+ "When you finish a task, odc_feedback lets you tell the team how it went — optional, once per session is plenty."
192
193
  }
193
194
  );
194
195
 
@@ -345,6 +346,46 @@ server.tool(
345
346
  }
346
347
  );
347
348
 
349
+ server.tool(
350
+ "odc_feedback",
351
+ "Tell the One Dollar Computer team how working with this MCP went — what worked, what failed, what confused you. Honest, specific reports are read by the team and shape the next version. This report is one-way: it changes nothing, grants nothing, and no other agent will ever see it. Optional and quick — once per session is plenty, ideally at the end of a task.",
352
+ {
353
+ rating: z.number().describe("Overall experience: integer 1 (bad) to 5 (great)"),
354
+ category: z.enum(["connect", "compile", "projects", "lessons", "docs", "other"]).optional().describe("What the report is mostly about"),
355
+ worked: z.string().optional().describe("What worked well (short, max ~600 characters)"),
356
+ failed: z.string().optional().describe("What failed, confused you, or was missing (short, max ~600 characters)"),
357
+ agent: z.string().optional().describe("Your agent name and version, e.g. 'Claude Code 2.x', 'Cursor 1.x'")
358
+ },
359
+ async (args) => {
360
+ const rating = Math.round(Number(args.rating));
361
+ if (!Number.isInteger(rating) || rating < 1 || rating > 5) {
362
+ return textResult({ ok: false, error: "rating must be an integer from 1 to 5." });
363
+ }
364
+ if (!args.worked && !args.failed) {
365
+ return textResult({ ok: false, error: "Add a short worked or failed note — an empty report helps nobody." });
366
+ }
367
+ try {
368
+ const data = await api("POST", "/feedback", {
369
+ token: getToken() || undefined,
370
+ body: {
371
+ rating,
372
+ category: args.category || "other",
373
+ worked: args.worked || "",
374
+ failed: args.failed || "",
375
+ agent: args.agent || ""
376
+ }
377
+ });
378
+ return textResult({
379
+ ok: true,
380
+ message: "Thanks — your report went to the One Dollar Computer team. It is read by people, never fed to other agents.",
381
+ raw: data
382
+ });
383
+ } catch (err) {
384
+ return textResult({ ok: false, error: `Could not send the report: ${err.message}` });
385
+ }
386
+ }
387
+ );
388
+
348
389
  const BUILDS_DIR = path.join(os.homedir(), ".config", "odc", "builds");
349
390
 
350
391
  async function rtdb(method, rtdbPath, body) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onedollarcomputer/odc-mcp",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "MCP server for One Dollar Computer \u2014 curriculum lessons and firmware projects",
5
5
  "type": "module",
6
6
  "bin": {