Skip to main content
Glama

py-mcp-full

PY 크롤러 개발 전체 도구 모음 — MacCMS 영화 사이트 분석 + 지능형 소스 코드 생성 + 선택자 디버깅 + 재생 링크 디버깅 + 인터페이스 테스트 + 코드 규격 평가 + 전체 파일 작업

MCP (Model Context Protocol) 프로토콜을 기반으로 AI 프로그래밍 어시스턴트에게 영화 크롤러 개발 전 과정을 아우르는 18가지 전문 도구를 제공합니다.

✨ 특징

  • 🔍 웹사이트 구조 심층 분석 — MacCMS v8/v10/수집 API/비표준 아키텍처 자동 식별

  • 🤖 지능형 소스 코드 생성 — 분석 결과를 바탕으로 T3/T4 크롤러 소스를 원클릭 생성

  • 🎯 선택자 디버깅 — XPath/CSS 선택자 매칭 결과를 실시간 검증

  • 🎬 재생 링크 디버깅 — m3u8/mp4 직링크 재귀적 해석, v8/v10 JS 변수 추출 지원

  • 🧪 인터페이스 테스트 — 5대 인터페이스(home/category/detail/search/play) 자동화 테스트

  • 📋 규격 평가 — 크롤러 소스 코드 규격에 대한 12가지 가중치 검사

  • 📁 전체 파일 작업 — read/write/delete/mkdir/move/copy/info/cwd

🚀 빠른 시작

설치

git clone https://github.com/sunniu-hjdhnx/py-mcp-full.git
cd py-mcp-full
npm install

MCP 클라이언트 설정

Claude Desktop / Cursor / Cherry Studio 등 MCP 클라이언트 설정에 다음을 추가하세요:

{
  "mcpServers": {
    "py_mcp_full": {
      "command": "node",
      "args": ["/path/to/py-mcp-full/index.js"],
      "env": {
        "ROOT": "/path/to/your/spider/project"
      }
    }
  }
}

ROOT 환경 변수는 크롤러 소스 프로젝트의 루트 디렉토리를 지정하며, 파일 작업 도구는 이 경로를 기준으로 합니다.

경량 배포 (선택 사항)

esbuild를 사용하여 단일 파일로 패키징(node_modules 불필요):

npm install -g esbuild
esbuild index.js --bundle --platform=node --format=cjs --target=node22 --outfile=dist/index.cjs

패키징 후 설정:

{
  "mcpServers": {
    "py_mcp_full": {
      "command": "node",
      "args": ["dist/index.cjs"],
      "env": { "ROOT": "/path/to/your/spider/project" }
    }
  }
}

🛠 도구 목록 (18개)

크롤러 개발 도구 (10개)

도구

기능

필수 매개변수

analyze_website

웹사이트 구조 심층 분석, CMS 유형 식별

url

create_spider_source

크롤러 소스 코드 지능형 생성

url

debug_selector

CSS 선택자 매칭 결과 검증

url, selector

debug_play_link

재생 링크 추출 재귀적 디버깅

url

test_interface

5대 인터페이스 테스트

source_code, interface

evaluate_source

코드 규격 준수 여부 평가

source_code

fetch_url

페이지 콘텐츠 가져오기

url

edit_file

파일 내용 교체

path, search_text, replace_text

find_in_file

파일 내용 검색

path, keyword

list_directory

디렉토리 내용 나열

path

파일 작업 도구 (8개)

도구

기능

필수 매개변수

read_file

파일 읽기 (분할 읽기 지원)

path

write_file

파일 쓰기 (덮어쓰기/추가)

path, content

delete_file

파일 또는 디렉토리 삭제

path

create_directory

디렉토리 생성 (재귀적 지원)

path

move_file

이동/이름 변경

source, destination

copy_file

파일 복사

source, destination

file_info

파일 상세 정보 가져오기

path

get_cwd

작업 디렉토리 가져오기

📖 사용 프로세스

① analyze_website(url="https://example.com")
   → 识别CMS类型,获取HTML结构参数

② debug_selector(url="...", selector="//div[contains(@class,'item')]")
   → 验证选择器是否正确

③ create_spider_source(url="...", mode="T4")
   → 生成完整爬虫源代码

④ test_interface(source_code="...", interface="all")
   → 测试五大接口是否正常

⑤ evaluate_source(source_code="...")
   → 检查规范符合度

🏗 프로젝트 구조

py-mcp-full/
├── index.js          # 主程序(1409行)
├── package.json      # 依赖配置
├── manifest.json     # 工具 Schema 定义
└── 使用说明.md        # 中文详细文档

저장소 설명

본 README는 프로젝트의 기본 정보와 저장소 범위를 설명하기 위한 것이며, 기술 학습 및 교류 목적으로만 제공됩니다. 사용 가이드, 연동 가이드 또는 리소스 설명은 포함되어 있지 않습니다.

감사의 말

hjdhnx의 홈페이지

📄 라이선스

MIT

Related MCP Connectors