Skip to main content
Glama

py-mcp-full

PY Spider Development Full Toolset — MacCMS Video Site Analysis + Intelligent Source Code Generation + Selector Debugging + Play Link Debugging + Interface Testing + Code Standard Evaluation + Full File Operations

Based on the MCP (Model Context Protocol) protocol, it provides 18 professional tools for AI programming assistants, covering the entire workflow of video spider development.

✨ Features

  • 🔍 Deep Website Structure Analysis — Automatically identifies MacCMS v8/v10/Collection API/non-standard architectures

  • 🤖 Intelligent Source Code Generation — One-click generation of T3/T4 spider sources based on analysis results

  • 🎯 Selector Debugging — Real-time verification of XPath/CSS selector matching results

  • 🎬 Play Link Debugging — Recursive parsing of m3u8/mp4 direct links, supporting v8/v10 JS variable extraction

  • 🧪 Interface Testing — Automated testing of five major interfaces (home/category/detail/search/play)

  • 📋 Standard Evaluation — 12-item weighted check for spider source code standards

  • 📁 Full File Operations — read/write/delete/mkdir/move/copy/info/cwd

🚀 Quick Start

Installation

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

Configure MCP Client

Add to the configuration of MCP clients such as Claude Desktop / Cursor / Cherry Studio:

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

The ROOT environment variable specifies the root directory of the spider source project, and file operation tools are based on this path.

Lightweight Deployment (Optional)

Use esbuild to bundle into a single file, no node_modules required:

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

Configuration after bundling:

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

🛠 Tool List (18)

Spider Development Tools (10)

Tool

Function

Required Parameters

analyze_website

Deeply analyze website structure and identify CMS type

url

create_spider_source

Intelligently generate spider source code

url

debug_selector

Verify CSS selector matching results

url, selector

debug_play_link

Recursively debug play link extraction

url

test_interface

Test the five major interfaces

source_code, interface

evaluate_source

Evaluate code standard compliance

source_code

fetch_url

Fetch page content

url

edit_file

Replace file content

path, search_text, replace_text

find_in_file

Search file content

path, keyword

list_directory

List directory contents

path

File Operation Tools (8)

Tool

Function

Required Parameters

read_file

Read file (supports segmentation)

path

write_file

Write file (overwrite/append)

path, content

delete_file

Delete file or directory

path

create_directory

Create directory (supports recursion)

path

move_file

Move/rename

source, destination

copy_file

Copy file

source, destination

file_info

Get detailed file information

path

get_cwd

Get current working directory

📖 Usage Workflow

① 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="...")
   → 检查规范符合度

🏗 Project Structure

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

Repository Description

This README is only for explaining basic project information and repository boundaries, intended for technical learning and exchange, and does not contain usage guides, integration guides, or resource descriptions.

Acknowledgments

hjdhnx's Homepage

📄 License

MIT

F
license - not found
Not graded
quality - not tested
Not graded
maintenance - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Official Octoparse MCP server for template discovery, cloud tasks, and structured data export.

  • SEO Intelligence MCP — 13 tools: keyword research, SERP, domain audits, competitors.

  • Hosted MCP with 91 agent tools: X, domains, SEO, Maps, Trends, Search, YouTube, TikTok, and more.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GitSulay/py-mcp-full'

If you have feedback or need assistance with the MCP directory API, please join our Discord server