electron-mcp-server: Cursor rule for Cursor

.cursor/agents/sub-agent-mcp.mdc

sub-agent-mcp is a cursor rule for Cursor from ohah/electron-mcp-server. It costs 36 tokens per session (882 once invoked), scanned A, original, MIT.

Development rules for building Electron-based MCP servers, including their tools, data resources, reusable prompts, and communication methods.

In plain words
What is it for?
Use them when designing or modifying an Electron MCP server, especially its MCP interface, standard input/output or HTTP transport, tool behavior, and client setup.
Why use it?
They give a project consistent implementation guidance for connecting desktop applications to coding-agent clients.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: model in frontmatter; mentions subagents.

This is ohah/electron-mcp-server's own configuration. It tells Cursor how to work on electron-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything electron-mcp-server configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/ohah/electron-mcp-server/main/.cursor/agents/sub-agent-mcp.mdc
Clone the repo
git clone --depth 1 https://github.com/ohah/electron-mcp-server

Made for: Cursor.

Wrote 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.

agentmods badge for sub-agent-mcp

README.md
[![agentmods](https://agentmods.dev/badge/rules/ohah/electron-mcp-server/sub-agent-mcp/github.svg)](https://agentmods.dev/rules/ohah/electron-mcp-server/sub-agent-mcp)
Your own site
<a href="https://agentmods.dev/rules/ohah/electron-mcp-server/sub-agent-mcp"><img src="https://agentmods.dev/badge/rules/ohah/electron-mcp-server/sub-agent-mcp/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.

agentmods 80×15 button for sub-agent-mcp

Your own site · 80×15
<a href="https://agentmods.dev/rules/ohah/electron-mcp-server/sub-agent-mcp"><img src="https://agentmods.dev/badge/rules/ohah/electron-mcp-server/sub-agent-mcp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 882 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.00882
Opus 5.5 $0.00014 $0.00353
Sonnet 5.5 $0.00007 $0.00176
Haiku 4.5 $0.00004 $0.00088

Measured 2mo ago against content hash acbb4414b21c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sub-agent-mcp scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/agents/sub-agent-mcp.mdc · 62 lines

What it actually says

Electron MCP 서버 개발 (MCP Server Development)

이 룰은 Electron MCP 서버 코드를 작성·수정할 때 적용한다.

0. 레퍼런스 저장소 (Reference repositories)

구현·설계 참고용 코드는 다음 4개 저장소를 사용한다.

1. MCP 핵심 개념

  • Tools: LLM이 호출할 수 있는 함수 (계산, 부수 효과, 네트워크 호출).
  • Resources: 클라이언트가 읽는 읽기 전용 데이터.
  • Prompts: 재사용 가능한 프롬프트 템플릿.

이 프로젝트에서는 우선 Tools 위주로 구현한다.

MCP 구현 스펙: 도구의 동작·스펙은 Chrome DevTools MCP(ChromeDevTools/chrome-devtools-mcp)와 완전 동일하게 한다. 도구 이름, 파라미터, 동작 방식(예: 상시 수집 vs 호출 시점 수집), 반환 형식을 레퍼런스에 맞춘다.

2. 트랜스포트

  • stdio: Cursor, Claude Desktop 등이 프로세스를 spawn하고 stdin/stdout으로 JSON-RPC 통신. stdout에 로그를 쓰지 않는다 (메시지 손상).
  • HTTP/SSE: 원격·헤드리스 환경에서는 Streamable HTTP 또는 SSE 트랜스포트 고려.

로그는 console.error(stderr) 또는 파일로만 출력한다.

3. 코드 품질

  • 포맷·린트: oxlint / oxfmt 사용. .oxlintrc.json, .oxfmtrc.json, oxlint.json 준수.
  • 커밋: .cursor/rules/commit-rules.mdc, .cursor/commands/commit.md 의 메시지 형식과 pre-commit(format, lint)을 따른다.
  • PR·리뷰: .cursor/commands/pr.md, review.md, review-apply.md 및 init-pr.md 의 ohah 계정·SSH 설정을 따른다.

4. 체크리스트 (개발 시)

  • Chrome DevTools MCP와 동일 스펙: 해당 도구가 chrome-devtools-mcp와 도구 이름·파라미터·동작·반환 형식이 일치하는가?
  • 레퍼런스 저장소(halilural/electron-mcp-server, playwright-mcp, chrome-devtools-mcp, hypothesi/mcp-server-tauri)에서 필요한 패턴을 참고했는가?
  • stdio 사용 시 stdout에 로그를 남기지 않았는가?
  • mise exec -- bun run format, mise exec -- bun run lint 를 실행했는가?
  • 커밋 메시지가 type(scope): subject 형식인가?
Changes

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.

  1. 2mo ago First seen · 62 lines · 36 tokens per session scan A acbb4414b21c

Subscribe to this mod's changes

sub-agent-mcp is a cursor rule published in the GitHub repository ohah/electron-mcp-server (4 stars, last pushed 7mo ago), licensed MIT. It adds 36 tokens to every session and 882 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.