snd-primary
MCP Serversnd-primarypublic

web scraper

一个使用Python实现的ModelContextProtocol服务器,提供网页抓取功能,可与Claude Desktop集成。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
-
License

About This Server

一个使用Python实现的ModelContextProtocol服务器,提供网页抓取功能,可与Claude Desktop集成。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

Web Scraper MCP Server

Pythonで実装されたModelContextProtocol(MCP)サーバーで、ウェブスクレイピング機能を提供します。Claude Desktopと連携して使用できます。

機能

  • MDNウェブドキュメントからコンテンツをスクレイピング
  • MCPプロトコルを通じてClaudeとシームレスに連携
  • 標準ライブラリのみで実装された軽量バージョンを選択可能

インストール

  1. リポジトリをクローン:

    git clone https://github.com/snd-primary/web-scraper.git
    cd web-scraper
    
  2. 標準版を使用する場合は、依存関係をインストール:

    pip install -r requirements.txt
    

Claude Desktopでの使用方法

軽量版 (外部依存なし)

"Server transport closed" エラーが発生する場合は、こちらの方法をお試しください

この軽量版は外部パッケージに依存せず、Pythonの標準ライブラリのみで実装されています。

  1. claude_desktop_config.json ファイルを作成または更新:

    {
      "mcpServers": {
        "web-scraper": {
          "command": "python",
          "args": [
            "C:\\path\\to\\web-scraper\\claude_desktop_mcp.py"
          ]
        }
      }
    }
    

    C:\\path\\to\\web-scraper を、実際のリポジトリをクローンした場所のパスに置き換えてください。Windowsのパスでは、バックスラッシュを二重にする必要があることに注意してください。

  2. 設定を適用するために、Claude Desktopを再起動します。

  3. Claude Desktopで、web-scraper MCPサーバーを使用できるようになります:

    https://developer.mozilla.org/en-US/docs/Web/JavaScript の内容をスクレイピングして、JavaScriptについての基本情報を教えてください。
    

標準版 (フル機能)

こちらは外部パッケージを使用した、より多機能な実装です。

  1. claude_desktop_config.json ファイルを更新:

    {
      "mcpServers": {
        "web-scraper": {
          "command": "python",
          "args": [
            "C:\\path\\to\\web-scraper\\main.py"
          ]
        }
      }
    }
    

    C:\\path\\to\\web-scraper を、実際のリポジトリをクローンした場所のパスに置き換えてください。

  2. 設定を適用するために、Claude Desktopを再起動します。

トラブルシューティング

"No module named 'uvicorn'" エラー

このエラーが発生する場合は、以下の方法で解決できます:

  1. 依存関係を確認してインストール:

    pip install uvicorn fastapi httpx beautifulsoup4
    
  2. それでも解決しない場合は、軽量版を使用してください:

    claude_desktop_mcp.py
    

    こちらはPythonの標準ライブラリのみで実装されているため、外部依存関係なしで動作します。

"Server transport closed unexpectedly" エラー

  1. claude_desktop_mcp.py を使用してください。
  2. 起動時にエラーが出る場合は、コンソール出力を確認してください。
  3. 依然として問題が解決しない場合は、Model Context Protocol Debugging Documentationを参照してください。

API リファレンス

web-scraper MCPサーバーは以下の機能を提供します:

fetch-mdn

MDNウェブドキュメントからコンテンツをスクレイピングします。

パラメータ:

  • url (文字列, 必須): スクレイピングするMDNウェブサイトのURL(https://developer.mozilla.org/ で始まる必要があります)

戻り値:

  • ドキュメントのタイトル
  • コンテンツテキスト
  • 元のURL
  • ソース情報

実装ファイル

  • main.py - 標準版MCPサーバーのエントリーポイント(外部依存あり)
  • server.py - FastAPIを使用したMCPサーバーの実装
  • web_scraper.py - ウェブスクレイピング機能の実装
  • claude_desktop_mcp.py - 軽量版MCPサーバー(標準ライブラリのみ)
  • requirements.txt - 必要なPythonパッケージのリスト

Quick Start

1

Clone the repository

git clone https://github.com/snd-primary/web-scraper
2

Install dependencies

cd web-scraper
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownersnd-primary
Repoweb-scraper
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation