Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/ohah/electron-mcp-server/sub-agent-mcp-setupgit clone --depth 1 https://github.com/ohah/electron-mcp-serverWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00032 | $0.01443 |
| Opus 5 | $0.00016 | $0.00722 |
| Sonnet 5 | $0.00006 | $0.00289 |
| Haiku 4.5 | $0.00003 | $0.00144 |
Grade C, and why
sub-agent-mcp-setup scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
| `Cannot find module '.../dist/mcp-server/index.js'` | 3.1 적용 후에도 난다면 `npx clear-npx-cache` → 그래도 안 되면 `rm -rf node_modules && bun install` | How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Electron MCP 서버 세팅 전문가 (Setup Expert)
이 룰은 electron-mcp-server를 Bun 모노레포에서 설치·실행·Cursor MCP 연동할 때 발생하는 문제(심링크, npx, .bin, 잘못된 경로)를 진단하고 해결할 때 적용한다.
1. 프로젝트 구조 (Bun 모노레포)
- 루트:
package.json(workspaces:packages/*,examples/*),bun.lock만 사용. package-lock.json은 사용하지 않는다 (Bun 전용). - MCP 서버:
packages/electron-mcp-server— Node 전용 프로세스, 빌드 결과는dist/index.js(bunup). - Electron 데모:
examples/electron-mcp-demo—--remote-debugging-port=9222로 실행해 MCP 도구가 타깃으로 쓴다. - Cursor MCP 설정:
.cursor/mcp.json에서npx -y electron-mcp-server로 실행.
2. 왜 "electron-mcp-server를 찾을 수 없음" / "Cannot find module ... dist/mcp-server/index.js" 가 나오는가
2.1 워크스페이스 패키지는 루트 .bin에 없음
- Bun(또는 npm) 워크스페이스에서 루트
package.json에 dependency로 넣지 않은 패키지는node_modules/.bin/<bin-name>이 생성되지 않는다. npx -y electron-mcp-server는 (로컬이면)node_modules/.bin/electron-mcp-server또는node_modules/electron-mcp-server의 bin을 실행한다..bin에 실행 파일이 없으면 Windows에서는 "인식할 수 없는 명령"이 나올 수 있다.
2.2 잘못된 bin 경로 (dist/mcp-server/index.js)
- 과거에
packages/electron-mcp-server/package.json의 bin이dist/mcp-server/index.js였다가dist/index.js로 바뀐 경우, 이미 만들어진node_modules/.bin/electron-mcp-server.bunx(또는 .exe) 안에는 예전 경로가 하드코딩되어 있을 수 있다. - package-lock.json이 있으면 그 안의
packages/electron-mcp-serverbin 경로가 예전 값(dist/mcp-server/index.js)으로 남아 있고, npm/npx가 이를 참조해 잘못된 경로를 쓸 수 있다. - npx 캐시에 예전 실행 경로가 남아 있으면, 캐시만으로도 같은 오류가 반복될 수 있다.
3. 해결 방법 (체크리스트)
3.1 루트에서 electron-mcp-server를 dependency로 두기
- 목적: 루트
node_modules/.bin에electron-mcp-server실행 파일이 생기게 하여npx -y electron-mcp-server가 동작하게 한다. - 조치: 루트
package.json의devDependencies에 추가."devDependencies": { "electron-mcp-server": "workspace:*", ... } - 그 다음
bun install실행. 이제node_modules/.bin/electron-mcp-server.bunx(및 .exe)가 생성되고, 내부 경로는 현재packages/electron-mcp-server/package.json의 bin(dist/index.js)을 가리킨다.
3.2 Bun 전용 유지 — package-lock.json 제거
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 80 lines · 32 tokens per session scan C fce55414ed2d
sub-agent-mcp-setup is a cursor rule published in the GitHub repository ohah/electron-mcp-server (4 stars, last pushed 5mo ago), licensed MIT. It adds 32 tokens to every session and 1,443 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.