Skip to main content

Koharu MCP

Windows PC를 AI가 화면으로 인식하고 키보드·마우스를 조작하도록 연결하는 MCP 에이전트입니다. 화면 및 입력 권한은 PC 앞의 사용자가 로컬 콘솔에서 직접 승인해야 합니다.

기능

  • MSS + Pillow 기반 화면 캡처
  • 30 FPS / 60 FPS 프레임 캡처 및 AI 연결로 연속 전송
  • MCP 도구를 통한 현재 화면 이미지 반환
  • 승인 후 마우스 클릭, 텍스트 입력, 키 입력, 스크롤
  • 로컬 승인 콘솔에서 권한 승인 및 즉시 해제
  • Cloudflare Durable Object 기반 브라우저 뷰어 릴레이
  • Neon PostgreSQL 기반 계정, 세션 쿠키, 장치 페어링, 장치 상태 및 감사 로그
  • Vercel 웹앱의 로그인·회원가입·기기 대시보드

설치

Python 3.12 이상이 설치된 Windows PowerShell에서 실행합니다.

현재 소스에서 설치하려면 프로젝트 폴더에서 실행합니다.

py -m pip install .
koharu-mcp install
koharu-mcp start

PyPI 공개 업로드가 완료된 뒤에는 아래 명령으로 설치할 수 있습니다.

py -m pip install --upgrade koharu-mcp

로컬 승인 콘솔은 http://127.0.0.1:8765 입니다. 브라우저에서 이 PC 제어 승인을 누르기 전에는 AI의 화면 조회와 입력 도구가 차단됩니다. 권한 해제 버튼은 스트림과 입력 제어를 즉시 중단합니다.

설정 파일과 인증 정보는 다음 경로에 저장됩니다.

%LOCALAPPDATA%\KoharuMCP\
  config.json
  .env
  web\index.html

MCP 연결

로컬 Agent의 JSON-RPC MCP endpoint는 http://127.0.0.1:8765/oai입니다. 요청에는 아래 두 헤더가 필요합니다.

  • Authorization: Bearer <KOHARU_MCP_TOKEN>
  • X-AI-Client-Id: <KOHARU_AI_CLIENT_ID>

실제 값은 %LOCALAPPDATA%\KoharuMCP\.env에서 확인합니다. 해당 파일은 외부에 공유하지 마세요.

도구 기능
screen.get_status 승인·스트림 상태
screen.get_frame 현재 화면 JPEG 이미지
screen.start_stream 30 또는 60 FPS AI 프레임 스트림 시작
input.click 좌표 클릭
input.type_text 텍스트 입력 (최대 2,000자)
input.press_key 키 또는 키 조합 입력
input.scroll 스크롤
session.stop 스트림 중지 및 세션 종료

연속 화면은 인증된 로컬 WebSocket ws://127.0.0.1:8765/oai/ws에서 전달합니다. 연결 직후 다음 JSON 인증 메시지를 보냅니다.

{"type":"auth","token":"<KOHARU_MCP_TOKEN>","client_id":"<KOHARU_AI_CLIENT_ID>"}

프레임은 메타데이터 JSON과 JPEG 바이너리 메시지 쌍으로 전달됩니다. screen.start_stream에서 FPS를 30 또는 60으로 지정합니다.

CLI 명령

koharu-mcp install   # 로컬 설정 및 인증 정보 생성
koharu-mcp start     # MCP 에이전트 실행
koharu-mcp pair      # 로컬 승인 페이지 열기
koharu-mcp enroll <코드>  # 웹 계정에 이 PC 등록
koharu-mcp status    # 실행 상태 확인
koharu-mcp stop      # 에이전트 중지
koharu-mcp uninstall --yes  # 로컬 설정 및 인증 정보 제거
koharu-mcp --version

서버를 종료하려면 실행 중인 PowerShell에서 Ctrl+C를 누릅니다.

웹 계정 및 장치 연결

  1. https://mcp.koharu.live/app 에서 이메일과 비밀번호로 계정을 생성합니다.
  2. 대시보드에서 장치 등록을 눌러 페어링 코드를 발급합니다.
  3. Windows Agent에서 다음 명령을 실행합니다.
koharu-mcp enroll <12자리-페어링-코드>
  1. 등록된 PC는 Neon DB에 저장되고 heartbeat를 통해 접속 상태를 갱신합니다.

비밀번호는 서버에서 scrypt로 해시하고, 브라우저 세션은 HttpOnly·Secure·SameSite 쿠키와 서버 측 토큰 해시로 관리합니다.

권한 및 보안 경계

  • 권한은 매 Agent 시작 시 기본 거부 상태입니다.
  • 로컬 콘솔의 명시적 승인이 있어야 화면 조회 및 키보드·마우스 입력이 가능합니다.
  • 승인 취소는 입력 제어, 화면 스트리밍 및 활성 릴레이 세션을 중단합니다.
  • MCP HTTP 및 WebSocket 연결에는 별도의 Bearer 토큰과 클라이언트 ID가 필요합니다.
  • 브라우저 릴레이 뷰어는 읽기 전용입니다. 입력 제어는 로컬 MCP Agent 경로에서만 제공됩니다.
  • 임의 셸 명령 실행 도구는 제공하지 않습니다.
  • .env, 장치 토큰, 페어링 코드는 공유하거나 저장소에 커밋하지 마세요.

개발 및 로컬 빌드

py -m pip install -e .
py -m compileall -q app
py -m pip check
koharu-mcp --version
koharu-mcp --help
py -m pip install build
py -m build

배포 상태

  • 웹앱: Vercel production 배포 완료
  • Neon DB: 계정·장치·세션·감사 로그 스키마 구성
  • Python 패키지: PyPI 배포용 패키징 구성
  • npm은 PC Agent 배포 수단으로 사용하지 않습니다. 루트 package.json은 Vercel 서버리스 API 의존성 관리용입니다.

라이선스

Creative Commons Attribution 4.0 International (CC BY 4.0). 저작자 표시와 라이선스 링크, 변경 여부 표시 조건으로 수정·재배포 및 상업적 이용이 가능합니다.

Metadata

Release files for koharu-mcp 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for koharu-mcp 0.4.0
File Size Uploaded Provenance Actions
koharu_mcp-0.4.0.tar.gz 19.6 kB Without provenance Details for koharu_mcp-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for koharu-mcp 0.4.0
File Interpreter ABI Platform Actions
koharu_mcp-0.4.0-py3-none-any.whl Python 3 none any Details for koharu_mcp-0.4.0-py3-none-any.whl

Total release size: 38.3 kB

Release files / koharu_mcp-0.4.0.tar.gz

Download URL koharu_mcp-0.4.0.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
760e9435379eefa650859a768001ceec3fc61b941a204c09e8b640ea00f1b201
BLAKE2b-256 checksum
How to use checksums
f061b6135db4ed426214e6b719ad181eb43b51c539033fe0cb0de8e3b2a4d0f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.1

Release files / koharu_mcp-0.4.0-py3-none-any.whl

Download URL koharu_mcp-0.4.0-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6080442079d31c52db3143007b769cf47856bcdf92da97cdbddef0498b3ba35a
BLAKE2b-256 checksum
How to use checksums
e8c97f63ab2e3ba7b17303e7cce9d861169e9c1669ab7b4f47bc98cb7260d851
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.1

Security for koharu-mcp 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page