Borrowing it
Nothing to install: this file belongs to ohah/electron-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ohah/electron-mcp-server/main/.cursor/agents/sub-agent-mcp-setup.mdcgit clone --depth 1 https://github.com/ohah/electron-mcp-serverWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/ohah/electron-mcp-server/sub-agent-mcp-setup)<a href="https://agentmods.dev/rules/ohah/electron-mcp-server/sub-agent-mcp-setup"><img src="https://agentmods.dev/badge/rules/ohah/electron-mcp-server/sub-agent-mcp-setup/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/ohah/electron-mcp-server/sub-agent-mcp-setup"><img src="https://agentmods.dev/badge/rules/ohah/electron-mcp-server/sub-agent-mcp-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00032 | $0.01443 |
| Opus 5.5 | $0.00013 | $0.00577 |
| Sonnet 5.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 2mo 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.
- 2mo 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 7mo ago), licensed MIT. It adds 32 tokens to every session and 1,443 once invoked, about $0.0001 per session on Opus 5.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
error-handling-and-validation
A code-quality guide for handling errors, invalid inputs, edge cases, preconditions, logging, and user-friendly error messages.
css-render-blocking-diagnosis
Cursor rule "css-render-blocking-diagnosis" from adobecom/da-express-milo, covering css render-blocking diagnosis & resolution, critical learning from 98 pagespeed achievement, primary diagnostic protocol, step 1: css blocking symptom recognition and step 2: css loading sequence audit.
modus-checkbox-value-inversion-react-short
Critical bug fix for ModusWcCheckbox value property inversion.
javascript-expert-performance
Profile first. Measure before and after. Never optimize without data.
kiss-ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
5-bug-finder
APPLY WHEN investigating a bug.