hackshop-mcp 0.0.3 → 0.0.5
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 +88 -34
- package/catalog.json +1584 -25
- package/dist/build-plan/index.d.ts +10 -0
- package/dist/build-plan/index.js +550 -0
- package/dist/build-plan/index.js.map +1 -0
- package/dist/build-plan/types.d.ts +153 -0
- package/dist/build-plan/types.js +2 -0
- package/dist/build-plan/types.js.map +1 -0
- package/dist/catalog/schema.d.ts +523 -7
- package/dist/catalog/schema.js +49 -0
- package/dist/catalog/schema.js.map +1 -1
- package/dist/core/assess.d.ts +36 -0
- package/dist/core/assess.js +100 -0
- package/dist/core/assess.js.map +1 -0
- package/dist/core/errors.d.ts +2 -0
- package/dist/core/errors.js +70 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/links.d.ts +3 -0
- package/dist/core/links.js +19 -0
- package/dist/core/links.js.map +1 -0
- package/dist/core/plan-gadget.d.ts +85 -0
- package/dist/core/plan-gadget.js +619 -0
- package/dist/core/plan-gadget.js.map +1 -0
- package/dist/core/resources.d.ts +37 -0
- package/dist/core/resources.js +143 -0
- package/dist/core/resources.js.map +1 -0
- package/dist/core/safety.d.ts +7 -0
- package/dist/core/safety.js +28 -0
- package/dist/core/safety.js.map +1 -0
- package/dist/core/tools.d.ts +247 -0
- package/dist/core/tools.js +164 -0
- package/dist/core/tools.js.map +1 -0
- package/dist/core/types.d.ts +163 -0
- package/dist/core/types.js +17 -0
- package/dist/core/types.js.map +1 -0
- package/dist/platforms/index.d.ts +26 -0
- package/dist/platforms/index.js +52 -0
- package/dist/platforms/index.js.map +1 -0
- package/dist/platforms/load.d.ts +4 -0
- package/dist/platforms/load.js +78 -0
- package/dist/platforms/load.js.map +1 -0
- package/dist/platforms/schema.d.ts +587 -0
- package/dist/platforms/schema.js +64 -0
- package/dist/platforms/schema.js.map +1 -0
- package/dist/sampling.d.ts +5 -0
- package/dist/sampling.js +44 -21
- package/dist/sampling.js.map +1 -1
- package/dist/server.d.ts +14 -1
- package/dist/server.js +164 -40
- package/dist/server.js.map +1 -1
- package/dist/site-url.d.ts +1 -0
- package/dist/site-url.js +4 -0
- package/dist/site-url.js.map +1 -0
- package/dist/telemetry.d.ts +29 -0
- package/dist/telemetry.js +100 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/tools/assess_hackability.d.ts +2 -29
- package/dist/tools/assess_hackability.js +11 -43
- package/dist/tools/assess_hackability.js.map +1 -1
- package/dist/tools/get_build_plan.d.ts +6 -0
- package/dist/tools/get_build_plan.js +16 -0
- package/dist/tools/get_build_plan.js.map +1 -0
- package/dist/tools/plan_gadget.d.ts +4 -0
- package/dist/tools/plan_gadget.js +14 -0
- package/dist/tools/plan_gadget.js.map +1 -0
- package/dist/tools/propose_hardware.d.ts +5 -0
- package/dist/tools/propose_hardware.js +57 -8
- package/dist/tools/propose_hardware.js.map +1 -1
- package/dist/tools/simulate_assembly.d.ts +315 -0
- package/dist/tools/simulate_assembly.js +145 -0
- package/dist/tools/simulate_assembly.js.map +1 -0
- package/package.json +4 -1
- package/platforms.json +779 -0
- package/tags.md +1 -0
package/README.md
CHANGED
|
@@ -8,31 +8,39 @@ You describe a project. The agent surfaces 3-5 hackable hardware options you wou
|
|
|
8
8
|
|
|
9
9
|
A tinkerer has an idea. The idea would be cooler with the right piece of hardware attached: an old screen, an abandoned smart speaker, a bricked frame, a hackable handheld. The tinkerer doesn't know what hardware exists, what's hackable, or what would creatively *fit* the idea. So the idea stays purely software, or gets paired with a Raspberry Pi.
|
|
10
10
|
|
|
11
|
-
This is a hardware-knowledge layer on top of LLMs.
|
|
11
|
+
This is a hardware-knowledge layer on top of LLMs. Four tools, 80 researched devices, one closed-set tag vocabulary, and a brick-risk safety rule that won't let the agent fabricate a score for hardware classes where bricks are unrecoverable. `simulate_assembly` drops a proposed robot into a MuJoCo physics world and tells you, honestly, whether it would actually move.
|
|
12
|
+
|
|
13
|
+
Hackshop now knows about Meta's Muse Gadgets SDK: ESP32 boards and Linux machines that can become a physical body for Muse, Meta's personal AI agent. Muse recommendations include the SDK tier, setup path, supported features, printable stand/enclosure links when available, and the required terms caveat: personal, non-commercial use only, at most 50 devices per token, no selling or public marketplace listing, and revocable access.
|
|
12
14
|
|
|
13
15
|
## Status
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
v0.0.5 - published on npm and hosted at `https://www.hackshop.dev/mcp`. The hosted MCP exposes the deterministic tools (`plan_gadget`, `get_build_plan`, `assess_hackability`); the npm server also includes `propose_hardware` and `simulate_assembly`. The simulation layer is live at [hackshop.dev](https://hackshop.dev).
|
|
16
18
|
|
|
17
19
|
## Install in 30 seconds
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
Hosted connector, when your client supports streamable HTTP:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"url": "https://www.hackshop.dev/mcp",
|
|
26
|
+
"transport": "streamable-http"
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or add the local npm server to your MCP client config (Claude Desktop / Claude Code / Cursor):
|
|
20
31
|
|
|
21
32
|
```json
|
|
22
33
|
{
|
|
23
34
|
"mcpServers": {
|
|
24
35
|
"hackshop": {
|
|
25
36
|
"command": "npx",
|
|
26
|
-
"args": ["-y", "hackshop-mcp"]
|
|
27
|
-
"env": {
|
|
28
|
-
"ANTHROPIC_API_KEY": "sk-ant-..."
|
|
29
|
-
}
|
|
37
|
+
"args": ["-y", "hackshop-mcp"]
|
|
30
38
|
}
|
|
31
39
|
}
|
|
32
40
|
}
|
|
33
41
|
```
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
`ANTHROPIC_API_KEY` is optional. It only improves `propose_hardware` in the local npm server when the MCP host cannot sample; `plan_gadget`, `get_build_plan`, and `assess_hackability` never need a key. Anonymous usage telemetry (tool names and timings only) is on by default in the npm server; set `HACKSHOP_TELEMETRY=0` to turn it off.
|
|
36
44
|
|
|
37
45
|
## Tools
|
|
38
46
|
|
|
@@ -53,11 +61,67 @@ Returns 3-5 hardware proposals, each with:
|
|
|
53
61
|
|
|
54
62
|
Lookup by id, exact name, or substring. Returns the same shape as a single proposal. Use when you have a device in mind and want to verify hackability before searching for one to buy.
|
|
55
63
|
|
|
64
|
+
### `plan_gadget(idea, platform?, budget_usd?, owned_device_ids?, needs?, size?, limit?)`
|
|
65
|
+
|
|
66
|
+
Deterministically plans a physical gadget for an AI agent, with Meta Muse Gadgets as the first supported platform. It infers needs such as voice, screen, camera, air sensors, e-paper, round display, home-network tunnel, or Linux control; ranks supported boards; and returns:
|
|
67
|
+
|
|
68
|
+
- `inferred_needs`, `fit` (`all | partial | none`), `notes`, `warnings`, `questions`, and ranked `picks`
|
|
69
|
+
- each pick's Muse platform, support level, tier, score, concrete `why`, gaps, `needs_met`, `within_budget`, price label, firmware/build links, setup steps, and caveats
|
|
70
|
+
- `fabrication.printables` with STL/STEP/SVG/fab.json URLs when a stand or enclosure exists
|
|
71
|
+
- Muse SDK `terms` for every platform represented in the picks
|
|
72
|
+
- concrete `next_steps`, starting with the build page where the human can save progress
|
|
73
|
+
|
|
74
|
+
This tool does not call an LLM and does not use the network. It never suggests selling Muse devices; the Muse SDK token terms are personal and non-commercial.
|
|
75
|
+
|
|
76
|
+
### `get_build_plan(device_id)`
|
|
77
|
+
|
|
78
|
+
Returns the full, deterministic build plan for one device: parts (with store or search links), `shopping_list` with explicit purchase policy, numbered steps with exact commands, machine-readable `assembly`, `try_saying` prompts, caveats, the Muse SDK terms, and `agent_brief_md`, a self-contained Markdown brief a coding agent can follow. It also returns the human page (`https://www.hackshop.dev/build/<device_id>`), raw JSON (`/build/<device_id>/plan.json`) and raw brief (`/build/<device_id>/build.md`). It never buys anything; ordering parts is left to the human.
|
|
79
|
+
|
|
80
|
+
## Resources and Prompts
|
|
81
|
+
|
|
82
|
+
Both hosted MCP and npm expose:
|
|
83
|
+
|
|
84
|
+
- `hackshop://muse/boards` - JSON for every Muse board: ids, names, platform, tier, price, features, build command and build page URL.
|
|
85
|
+
- `hackshop://muse/sdk-terms` - text summary of Muse SDK token terms.
|
|
86
|
+
- `hackshop://catalog/tags` - catalog tag list.
|
|
87
|
+
- Prompt `plan-muse-gadget` - tells an agent to do intake, call `plan_gadget`, call `get_build_plan`, show the shopping list, ask before buying, assemble, flash and pair.
|
|
88
|
+
|
|
89
|
+
### `simulate_assembly(assembly)`
|
|
90
|
+
|
|
91
|
+
Takes an **Assembly IR** — `{ idea, components[{ref,device_id,name,role}], edges[], goal{kind,spec,success_metric}, world{template,goal_xy?} }` (build it from the site's assembly output or by hand) — drops it into a MuJoCo physics world, and runs a **bounded, synchronous** rollout (`duration_s` ≤ 10, default 8) on the sim-worker. It returns:
|
|
92
|
+
|
|
93
|
+
- `success` — did the rollout pass the typed position, collision, and upright acceptance criteria
|
|
94
|
+
- `summary` / `post_mortem` — natural-language verdict plus honest failure theatre (stuck / tipped / collisions / heading-oscillation)
|
|
95
|
+
- `artifacts` — hosted URLs for the rendered `video`, `scene` (MJCF), `control` (control.py), and `telemetry.json`
|
|
96
|
+
- `metric_value`, `telemetry`, `authored_by`, `world_desc`
|
|
97
|
+
|
|
98
|
+
Today it simulates the diff-drive **`navigate`** slice; other goal kinds return an honest `unsupported` rather than faking a pass. Set `SIM_WORKER_URL` to point at a running sim-worker (defaults to `http://127.0.0.1:8000`). The bounded rollout here is intentionally small so it fits in a single tool call; the **rich, longer, agent-driven runs happen via the web app** at [hackshop.dev](https://hackshop.dev), backed by the worker at [hackshop-sim.fly.dev](https://hackshop-sim.fly.dev).
|
|
99
|
+
|
|
100
|
+
## Simulation (v2)
|
|
101
|
+
|
|
102
|
+
The site turns a proposal into a watchable robot: **proposal → select one complete build → deterministic feasibility check → MuJoCo rollout → interactive 3D replay**, with a shareable summary page you can link to. Honest by design — a robot that gets stuck on a ramp gets a post-mortem, not a green checkmark.
|
|
103
|
+
|
|
104
|
+
The current navigation slice deliberately has a narrow fidelity contract:
|
|
105
|
+
|
|
106
|
+
- alternative chassis are separate candidates, never merged into one BOM;
|
|
107
|
+
- Create 3 uses an explicit Pi + RPLIDAR build, while TurtleBot 4 Lite preserves its factory-integrated Pi/camera/lidar stack;
|
|
108
|
+
- versioned manifests provide real outer dimensions and mass to product-specific primitive proxies (not pretend CAD);
|
|
109
|
+
- the controller only runs when the assembly declares the 2D-lidar observations it consumes;
|
|
110
|
+
- typed position/collision/upright criteria drive the verdict; and
|
|
111
|
+
- the browser replay supports orbit, zoom, playback/scrubbing, world geometry, path/goal overlays, and collision/failure markers.
|
|
112
|
+
|
|
113
|
+
- **Live:** [https://hackshop.dev](https://hackshop.dev)
|
|
114
|
+
- **Worker:** [https://hackshop-sim.fly.dev](https://hackshop-sim.fly.dev)
|
|
115
|
+
- **Design doc:** [`docs/v2-simulation-plan.md`](docs/v2-simulation-plan.md)
|
|
116
|
+
|
|
117
|
+
The `simulate_assembly` MCP tool above is the bounded, single-call entry point into this same physics worker.
|
|
118
|
+
|
|
56
119
|
## Architecture
|
|
57
120
|
|
|
58
121
|
- TypeScript + `@modelcontextprotocol/sdk`
|
|
59
|
-
- LLM reasoning
|
|
60
|
-
-
|
|
122
|
+
- LLM reasoning for `propose_hardware` delegates to the host via `sampling/createMessage` first, then falls back to a direct Anthropic API call (`@anthropic-ai/sdk`) only when optional `ANTHROPIC_API_KEY` is set
|
|
123
|
+
- `simulate_assembly` calls out to a separate Python MuJoCo **sim-worker** over HTTP (`SIM_WORKER_URL`); the worker isn't bundled in the npm package
|
|
124
|
+
- Catalog stored as `catalog.json` in the repo (JSON, version-controllable, 80 devices and growing)
|
|
61
125
|
- Tag vocabulary in `tags.md`, validated at boot — server refuses to start on tag drift
|
|
62
126
|
- eBay integration is **not** in this server. Compose with [`ebay-mcp`](https://github.com/YosefHayim/ebay-mcp) at the host level.
|
|
63
127
|
|
|
@@ -72,32 +136,13 @@ npm test # safety + schema + lookup tests
|
|
|
72
136
|
npm run build # tsc -> dist/
|
|
73
137
|
```
|
|
74
138
|
|
|
75
|
-
##
|
|
139
|
+
## Troubleshooting: quick deterministic check
|
|
76
140
|
|
|
77
|
-
|
|
141
|
+
Ask your agent to call `plan_gadget` with `a desk gadget I can talk to`. This should return Muse board picks instantly and without any API key. If `propose_hardware` returns catalog matches without reasoning, your host probably does not support sampling and no optional `ANTHROPIC_API_KEY` is set.
|
|
78
142
|
|
|
79
|
-
|
|
80
|
-
npm install
|
|
81
|
-
```
|
|
143
|
+
## Install (local build → host)
|
|
82
144
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
```json
|
|
86
|
-
{
|
|
87
|
-
"mcpServers": {
|
|
88
|
-
"hackshop-smoke": {
|
|
89
|
-
"command": "tsx",
|
|
90
|
-
"args": ["/Users/YOU/hackshop-mcp/scripts/smoke.ts"]
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Restart Claude Desktop. Ask Claude to call the `smoke_check` tool. If it returns "Smoke OK," your architecture works. If it fails, stop here — `hackshop-mcp` won't work in this host.
|
|
97
|
-
|
|
98
|
-
## Install (target host)
|
|
99
|
-
|
|
100
|
-
After dev is done and smoke passes, add to your MCP client config:
|
|
145
|
+
To run a locally built copy instead of `npx`, add to your MCP client config:
|
|
101
146
|
|
|
102
147
|
```json
|
|
103
148
|
{
|
|
@@ -118,7 +163,16 @@ The founder had an Electric Objects EO1 picture frame. The company shut down; th
|
|
|
118
163
|
|
|
119
164
|
## Safety Rule (P0)
|
|
120
165
|
|
|
121
|
-
Bricking unrecoverable hardware is the single failure mode that ends this product. The catalog tracks brick-risk provenance: `founder-verified | community-reported | llm-inferred`. For categories where bricks are unrecoverable (`handheld`, `sbc`), the server **refuses to surface LLM-inferred brick-risk scores**. It returns "brick-risk unknown
|
|
166
|
+
Bricking unrecoverable hardware is the single failure mode that ends this product. The catalog tracks brick-risk provenance: `founder-verified | community-reported | vendor-docs | llm-inferred`. For categories where bricks are unrecoverable (`handheld`, `sbc`), the server **refuses to surface LLM-inferred brick-risk scores**. It returns "brick-risk unknown - research before flashing" instead. This is a tested release gate. See `src/safety.ts` and `test/safety.test.ts`.
|
|
167
|
+
|
|
168
|
+
## Telemetry
|
|
169
|
+
|
|
170
|
+
Starting with v0.0.4 the MCP server sends an anonymous ping when it starts and after each tool call. It exists so the maintainer can tell whether anyone is actually using the server.
|
|
171
|
+
|
|
172
|
+
- **Sent:** the event name, tool name, success/degraded flag, duration, `hackshop-mcp` version, MCP client name/version (e.g. `claude-code`), OS platform, Node major version, and a random install id stored in `~/.config/hackshop-mcp/telemetry.json`.
|
|
173
|
+
- **Never sent:** tool arguments, your idea text, device names, results, API keys, or file paths.
|
|
174
|
+
- **Destination:** `https://www.hackshop.dev/api/telemetry/mcp`, which forwards to the project's PostHog.
|
|
175
|
+
- **Opt out:** set `HACKSHOP_TELEMETRY=0` (or `DO_NOT_TRACK=1`) in the server's `env`. Telemetry is also off automatically in CI and under test runners. The implementation is `src/telemetry.ts`.
|
|
122
176
|
|
|
123
177
|
## Contributing
|
|
124
178
|
|