Skip to main content
Glama
nathanonn
by nathanonn

MCP URLフォーマットコンバーター

任意の URL からコンテンツを取得し、必要な出力形式に変換するモデル コンテキスト プロトコル (MCP) サーバー。

概要

MCP URLフォーマットコンバーターは、元のコンテンツの種類を問わず、あらゆるWeb URLからコンテンツを取得し、様々な形式(HTML、JSON、Markdown、プレーンテキスト)に変換するためのツールを提供します。Claude for Desktopを含むあらゆるMCP対応クライアントと連携するように設計されており、LLMは一貫した形式でWebコンテンツにアクセスし、変換および分析できます。

Related MCP server: MCP Web Tools Server

特徴

  • 🔄フォーマット変換: あらゆるウェブコンテンツをHTML、JSON、Markdown、またはプレーンテキストに変換します

  • 🌐ユニバーサル入力サポート:ウェブサイト、API、RAWファイルなどを処理します

  • 🔍自動コンテンツ検出:ソース形式をインテリジェントに識別

  • 🧰堅牢なライブラリサポート:業界標準のライブラリを使用します。

    • HTML解析用のCheerio

    • Markdown処理対象としてマーク

    • XML処理のための高速XMLパーサー

    • CSV変換のためのCSVtoJSON

    • セキュリティのためにHTMLをサニタイズする

    • HTMLからMarkdownへの変換のターンダウン

  • 🔧高度なフォーマット処理

    • メタデータ抽出によるHTML解析

    • JSONの整形印刷と構造の保存

    • スタイル付きのMarkdownレンダリング

    • CSVからテーブルへの変換

    • XMLからJSONへの変換

  • 📜履歴追跡:最近取得したURLのログを保持します

  • 🛡️セキュリティの焦点:XSS攻撃を防ぐためのコンテンツサニタイズ

インストール

前提条件

  • Node.js 16.x 以上

  • npmまたはyarn

クイックスタート

  1. リポジトリをクローンします。

    git clone https://github.com/yourusername/mcp-url-converter.git
    cd mcp-url-converter
  2. 依存関係をインストールします:

    npm install
  3. プロジェクトをビルドします。

    npm run build
  4. サーバーを実行します。

    npm start

Claude for Desktopとの統合

  1. Claude for Desktop の構成ファイルを開きます。

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

  2. URL コンバーター サーバーを構成に追加します。

    {
      "mcpServers": {
        "url-converter": {
          "command": "node",
          "args": ["/absolute/path/to/mcp-url-converter/build/index.js"]
        }
      }
    }
  3. デスクトップ版のClaudeを再起動する

利用可能なツール

fetch

任意の URL からコンテンツを取得し、最適な出力形式を自動的に検出します。

パラメータ:

  • url (文字列、必須): コンテンツを取得するURL

  • format (文字列, オプション): 変換後のフォーマット ( autohtmljsonmarkdowntext )。デフォルト: auto

例:

Can you fetch https://example.com and choose the best format to display it?

fetch-json

任意の URL からコンテンツを取得し、JSON 形式に変換します。

パラメータ:

  • url (文字列、必須): コンテンツを取得するURL

  • prettyPrint (boolean, オプション): JSONを整形して印刷するかどうか。デフォルト: true

例:

Can you fetch https://example.com and convert it to JSON format?

fetch-html

任意の URL からコンテンツを取得し、HTML 形式に変換します。

パラメータ:

  • url (文字列、必須): コンテンツを取得するURL

  • extractText (ブール値、オプション):テキストコンテンツのみを抽出するかどうか。デフォルト: false

例:

Can you fetch https://api.example.com/users and convert it to HTML?

fetch-markdown

任意の URL からコンテンツを取得し、Markdown 形式に変換します。

パラメータ:

  • url (文字列、必須): コンテンツを取得するURL

例:

Can you fetch https://example.com and convert it to Markdown?

fetch-text

任意の URL からコンテンツを取得し、プレーン テキスト形式に変換します。

パラメータ:

  • url (文字列、必須): コンテンツを取得するURL

例:

Can you fetch https://example.com and convert it to plain text?

これらのツールは、Perplexity 検索機能へのインターフェイスを提供します (MCP ホストでサポートされている場合)。

利用可能なリソース

recent-urls://list

タイムスタンプと出力形式を含む最近取得した URL のリストを返します。

例:

What URLs have I fetched recently?

安全

このサーバーはいくつかのセキュリティ対策を実装しています。

  • XSS攻撃を防ぐためにsanitize-htmlを使用してHTMLをサニタイズする

  • 処理前のコンテンツ検証

  • エラー処理と安全なデフォルト

  • Zodによる入力パラメータ検証

  • 安全な出力エンコーディング

テスト

MCP Inspector を使用してサーバーをテストできます。

npm run test

トラブルシューティング

よくある問題

  1. 接続エラー: URL がアクセス可能であり、正しい形式であることを確認してください

  2. 変換エラー: 複雑なコンテンツは、形式間できれいに変換されない場合があります。

  3. クロスオリジンの問題: 一部のウェブサイトでは不明なソースからのリクエストがブロックされる可能性があります

デバッグモード

追加のデバッグ情報については、 DEBUG環境変数を設定します。

DEBUG=mcp:* npm start

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。

謝辞

  • モデルコンテキストプロトコルで構築

  • セキュリティを重視した、最新の積極的にメンテナンスされたライブラリを使用します

  • OWASP の推奨事項に基づくサニタイズアプローチ


最終更新日: 2025年3月29日

Available Tools

5 tools
fetchC

Fetch content from a URL with automatic content type detection

ParametersJSON Schema
NameRequiredDescriptionDefault
formatNoFormat to convert to (default: auto)
urlYesURL to fetch content from

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions automatic content type detection, which hints at behavior, but lacks critical details like error handling, timeouts, authentication needs, rate limits, or response structure. For a tool that interacts with external URLs, this is a significant gap in behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core functionality without waste. It is front-loaded and appropriately sized for the tool's purpose, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of fetching from URLs, lack of annotations, and no output schema, the description is incomplete. It does not cover potential issues like network errors, content parsing, or return values, which are crucial for an agent to use the tool effectively in varied contexts.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for both parameters (url and format). The description adds minimal value beyond the schema, as it only implies content type detection relates to the format parameter. No additional semantics or usage examples are provided, so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose as fetching content from a URL with automatic content type detection, which is clear but vague about what 'content' entails. It does not distinguish from sibling tools like fetch-html, fetch-json, etc., which likely fetch specific formats, making it less specific. The verb 'fetch' is generic, and the description lacks detail on the resource or output type beyond detection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings (fetch-html, fetch-json, etc.), which are explicitly named alternatives. It mentions automatic content type detection but does not specify scenarios where this is preferred over format-specific tools, leaving the agent without clear usage context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch-htmlB

Fetch content from any URL and convert to HTML format

ParametersJSON Schema
NameRequiredDescriptionDefault
extractTextNoWhether to extract text content only (default: false)
urlYesURL to fetch content from

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While it mentions fetching and converting to HTML, it doesn't address important behavioral aspects like error handling (e.g., what happens with invalid URLs), authentication requirements, rate limits, timeout behavior, or whether the tool performs any sanitization of the fetched HTML.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core functionality without any wasted words. It's appropriately sized for a simple tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a relatively simple tool with good schema coverage but no annotations and no output schema, the description provides the basic purpose but lacks important contextual information. It doesn't explain what the HTML output looks like, whether it includes metadata, or how it handles different content types. The absence of output schema means the description should ideally provide some information about return values.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with both parameters clearly documented. The description adds no additional parameter information beyond what's in the schema. According to scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('fetch') and resource ('content from any URL') with the specific output format ('HTML format'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like fetch-json or fetch-markdown, which presumably fetch the same content but convert to different formats.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings (fetch, fetch-json, fetch-markdown, fetch-text). It mentions converting to HTML format, but doesn't explain when HTML format is preferable over other formats or what distinguishes it from the generic 'fetch' tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch-jsonC

Fetch content from any URL and convert to JSON format

ParametersJSON Schema
NameRequiredDescriptionDefault
prettyPrintNoWhether to pretty-print the JSON (default: true)
urlYesURL to fetch content from

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions fetching and converting to JSON but fails to describe critical behaviors such as error handling (e.g., for non-JSON content), authentication needs, rate limits, or what happens if the URL is inaccessible. This leaves significant gaps for a tool that interacts with external resources.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core functionality ('fetch content from any URL') and adds the key detail ('convert to JSON format') without any wasted words. It is appropriately sized for the tool's scope.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (fetching from external URLs with potential for errors) and the absence of both annotations and an output schema, the description is insufficient. It doesn't explain return values, error cases, or behavioral nuances, making it incomplete for safe and effective use by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both parameters (url and prettyPrint). The description adds no additional semantic meaning beyond what the schema provides, such as examples or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('fetch') and resource ('content from any URL'), and specifies the output format ('convert to JSON format'). However, it doesn't explicitly differentiate from sibling tools like 'fetch-html' or 'fetch-markdown' beyond the JSON output mention, which is implied but not directly contrasted.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings (fetch, fetch-html, fetch-markdown, fetch-text). It lacks explicit context about alternatives, prerequisites, or exclusions, leaving the agent to infer usage based solely on the output format.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch-markdownA

Fetch content from any URL and convert to Markdown format

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesURL to fetch content from

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions fetching and converting to Markdown but does not cover critical aspects such as error handling (e.g., invalid URLs, network failures), authentication needs, rate limits, or what happens if conversion fails. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that is front-loaded with the core functionality. There is no wasted language, and it directly communicates the tool's purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (fetching and converting web content) and lack of annotations and output schema, the description is incomplete. It covers the basic purpose but misses behavioral details and output expectations. However, it is adequate for a simple tool with high schema coverage, though it could benefit from more context on limitations or results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'url' parameter fully documented. The description adds no additional meaning beyond the schema, such as URL format constraints or examples. Since schema coverage is high, the baseline score of 3 is appropriate, as the description does not compensate but also does not detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('fetch content from any URL') and transformation ('convert to Markdown format'), distinguishing it from sibling tools like fetch-html, fetch-json, and fetch-text by specifying the output format. It uses precise verbs and identifies the resource (URL content).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when Markdown output is needed from a URL, but it does not explicitly state when to use this tool versus alternatives like fetch-html or fetch-text. There is no guidance on exclusions or prerequisites, leaving usage context to inference from the tool name and description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch-textC

Fetch content from any URL and convert to plain text format

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesURL to fetch content from

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions fetching and converting to plain text, but lacks details on error handling, rate limits, authentication needs, or what happens with non-text content (e.g., images, binary files). For a tool with no annotations, this leaves significant gaps in understanding its behavior and constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the key information: fetching content and converting to plain text. There is no wasted verbiage, and it directly communicates the tool's core functionality without unnecessary details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (fetching from URLs, which can involve network issues, varied content types) and the absence of annotations and output schema, the description is incomplete. It doesn't address potential errors, output format details (e.g., how plain text is extracted), or behavioral traits like timeouts or size limits. This leaves the agent with insufficient context for reliable use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'url' parameter clearly documented. The description adds no additional semantic information beyond what the schema provides (e.g., it doesn't specify URL formats, protocols supported, or content types). With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('fetch content') and resource ('from any URL'), and specifies the output format ('plain text'). It distinguishes from siblings by mentioning the conversion to plain text, which suggests differentiation from fetch-html, fetch-json, and fetch-markdown. However, it doesn't explicitly name the siblings or detail how it differs from the generic 'fetch' tool, keeping it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings (fetch, fetch-html, fetch-json, fetch-markdown). It implies usage for converting content to plain text, but doesn't specify scenarios, exclusions, or alternatives. This lack of explicit context leaves the agent to infer usage, which is insufficient for effective tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv1.0.0
    • First observedfetch
    • First observedfetch-html
    • First observedfetch-json
    • First observedfetch-markdown
    • First observedfetch-text

TDQS

B3.1/5.0

Scored across 5 tools

Disambiguation2/5

The tools have significant overlap in purpose, as all fetch content from URLs, differing only in output format. An agent could easily misselect between fetch-html, fetch-json, fetch-markdown, and fetch-text, since the descriptions don't clarify when to use one format over another. The generic 'fetch' tool with automatic detection further confuses boundaries, as it might duplicate or conflict with the format-specific tools.

Naming Consistency5/5

Tool names follow a highly consistent verb-noun pattern throughout, with all tools using 'fetch' as the verb followed by a hyphen and format descriptor (e.g., fetch-html, fetch-json). There are no deviations in style or convention, making the naming predictable and easy to parse for an agent.

Tool Count3/5

With 5 tools, the count is reasonable for a URL fetching server, but it feels borderline due to redundancy. The tools could potentially be consolidated into fewer, more flexible tools (e.g., a single fetch tool with a format parameter), making the current set feel slightly over-specified for the simple domain of fetching URLs.

Completeness4/5

For the domain of fetching URL content, the tool set is nearly complete, covering automatic detection and common output formats (HTML, JSON, Markdown, plain text). A minor gap exists in handling errors or advanced configurations (e.g., headers, timeouts), but agents can likely work around this with the provided tools for basic fetching tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers