Skip to main content
Glama

MCP Web Tools Server

by surya-madhav

MCP Webツールサーバー

Web関連の操作ツールを提供するモデルコンテキストプロトコル(MCP)サーバー。このサーバーにより、LLMは標準化されたツールを通じてWebコンテンツを操作できるようになります。

現在のツール

  • web_scrape : URLをr.jina.aiをプレフィックスとして変換し、マークダウンコンテンツを返します。

インストール

  1. このリポジトリをクローンします:
    git clone <repository-url> cd MCP
  2. 必要な依存関係をインストールします。
    pip install -r requirements.txt
    あるいは、より高速なインストールのためにuv を使用することもできます。
    uv pip install -r requirements.txt

サーバーとUIの実行

このリポジトリには、MCP サーバーまたは Streamlit UI を実行するための便利なスクリプトが含まれています。

実行スクリプトの使用

macOS/Linuxの場合:

# Run the server with stdio transport (default) ./run.sh server # Run the server with SSE transport ./run.sh server --transport sse --host localhost --port 5000 # Run the Streamlit UI ./run.sh ui

Windowsの場合:

# Run the server with stdio transport (default) run.bat server # Run the server with SSE transport run.bat server --transport sse --host localhost --port 5000 # Run the Streamlit UI run.bat ui

手動で実行

あるいは、サーバーを直接実行することもできます。

stdio を使用する (デフォルト)
python server.py
SSEの使用
python server.py --transport sse --host localhost --port 5000

これにより、MCP 接続を受け入れるlocalhost:5000上の HTTP サーバーが起動します。

Streamlit UI を手動で実行するには:

streamlit run streamlit_app.py

MCP Inspectorによるテスト

MCP Inspectorは、MCPサーバーのテストとデバッグのためのツールです。これを使用してサーバーと対話することができます。

  1. MCP Inspector をインストールします。
    npm install -g @modelcontextprotocol/inspector
  2. サーバーで Inspector を実行します。
    npx @modelcontextprotocol/inspector python server.py
  3. Inspector インターフェースを使用して、 example.comなどの URL を指定し、返されたマークダウン コンテンツを表示することで、 web_scrapeツールをテストします。

Claude for Desktopとの統合

このサーバーをClaude for Desktopで使用するには:

  1. Claude for Desktopがインストールされていることを確認してください。
  2. Claude for Desktop 構成ファイルを開きます。
    • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  3. 次の構成を追加します (必要に応じてパスを調整します)。
{ "mcpServers": { "web-tools": { "command": "python", "args": [ "/absolute/path/to/MCP/server.py" ] } } }
  1. Claude for Desktop を再起動します。
  2. Claudeのインターフェースにweb_scrapeツールが表示されるようになりました。Claudeにウェブサイトからコンテンツを取得するよう指示すると、このツールが使われます。

使用例

Claude と統合すると、次のような質問をすることができます。

  • 「example.com のホームページには何があるのですか?」
  • 「mozilla.org からコンテンツを取得して要約してもらえますか?」
  • 「wikipedia.org/wiki/Model_Context_Protocol からコンテンツを取得して説明してください。」

Claude は web_scrape ツールを使用してコンテンツを取得し、それを応答で提供します。

ツールの追加

このサーバーにさらにツールを追加するには:

  1. tools/ディレクトリに新しい Python ファイル (例: tools/new_tool.pyを作成します。
  2. 既存のツールと同様のパターンに従って、ツール機能を実装します。
  3. server.pyにツールをインポートし、MCP サーバーに登録します。
# Import your new tool from tools.new_tool import new_tool_function # Register the tool with the MCP server @mcp.tool() async def new_tool(param1: str, param2: int) -> str: """ Description of what your tool does. Args: param1: Description of param1 param2: Description of param2 Returns: Description of return value """ return await new_tool_function(param1, param2)
  1. 変更を適用するにはサーバーを再起動します。

流線型のUI

このリポジトリには、Claude for Desktop で構成されているすべての MCP サーバーに接続してテストできる Streamlit アプリケーションが含まれています。

Streamlit UIの実行

streamlit run streamlit_app.py

これにより、Streamlit サーバーが起動し、UI 付きの Web ブラウザーが開きます。

特徴

  • Claude for Desktop 構成ファイルを読み込み、解析します。
  • 構成されたすべてのMCPサーバーを表示
  • 任意のサーバーに接続し、利用可能なツールを表示します
  • 入力パラメータを指定して結果を表示するテストツール
  • 利用可能なリソースとプロンプトを表示する

使用法

  1. Streamlitアプリを起動する
  2. Claude for Desktop 構成ファイルへのパスを入力します (デフォルトのパスは事前に入力されています)
  3. 「サーバーをロード」をクリックすると、利用可能なすべてのMCPサーバーが表示されます。
  4. サーバータブを選択し、「接続」をクリックしてツールを読み込みます
  5. ツールを選択し、必要なパラメータを入力します
  6. 「実行」をクリックしてツールを実行し、結果を確認します。

トラブルシューティング

  • 依存関係が不足しています: requirements.txt内のすべての依存関係がインストールされていることを確認してください。
  • 接続の問題: サーバーが実行中であること、および Claude for Desktop の構成が正しいパスを指していることを確認します。
  • ツール実行エラー: サーバー出力でエラー メッセージを探します。
  • Streamlit UI の問題: Streamlit が正しくインストールされ、構成ファイルのパスが正しいことを確認してください。

ライセンス

このプロジェクトはMITライセンスの下で利用可能です。詳細はLICENSEファイルをご覧ください。

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

LLM が標準化されたツールを通じて Web コンテンツと対話できるようにするモデル コンテキスト プロトコル サーバー。現在、Web スクレイピング機能をサポートしています。

  1. 現在のツール
    1. インストール
      1. サーバーとUIの実行
        1. 実行スクリプトの使用
        2. 手動で実行
      2. MCP Inspectorによるテスト
        1. Claude for Desktopとの統合
          1. 使用例
            1. ツールの追加
              1. 流線型のUI
                1. Streamlit UIの実行
                2. 特徴
                3. 使用法
              2. トラブルシューティング
                1. ライセンス

                  Related MCP Servers

                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment.
                    Last updated -
                    3
                    Python
                    Apache 2.0
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server that enables LLMs to automate web browsers using Puppeteer, allowing navigation, screenshots, form filling, and JavaScript execution in a real browser environment.
                    Last updated -
                    JavaScript
                    MIT License
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol Server that enables LLMs to interact with and execute REST API calls through natural language prompts, supporting GET/PUT/POST/PATCH operations on configured APIs.
                    Last updated -
                    5
                    Python
                    Apache 2.0
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A Model Context Protocol server that enables LLMs to fetch and process web content in multiple formats (HTML, JSON, Markdown, text) with automatic format detection.
                    Last updated -
                    TypeScript
                    • Apple

                  View all related MCP servers

                  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/surya-madhav/MCP'

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