Skip to main content
Glama

XPath MCP サーバー

サードストランドスタジオ

XML コンテンツに対して XPath クエリを実行するための MCP サーバー。

画像

鍛冶屋のバッジ

ツール

  1. xpath

    • XPath式を使用してXMLコンテンツをクエリする

    • 入力:

      • xml (文字列): クエリするXMLコンテンツ

      • query (文字列): 実行するXPathクエリ

      • mimeType (オプション、文字列): MIME タイプ (例: text/xml、application/xml、text/html、application/xhtml+xml)

    • 戻り値: XPathクエリの結果を文字列として返します

  2. xpathwithurl

    • URL からコンテンツを取得し、XPath 式を使用してクエリを実行します。

    • 入力:

      • url (文字列): XML/HTMLコンテンツを取得するURL

      • query (文字列): 実行するXPathクエリ

      • mimeType (オプション、文字列): MIME タイプ (例: text/xml、application/xml、text/html、application/xhtml+xml)

    • 戻り値: XPathクエリの結果を文字列として返します

Related MCP server: mcp-registry-server

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の mcp-xpath を自動的にインストールするには:

npx -y @smithery/cli install @thirdstrandstudio/mcp-xpath --client claude
# Install dependencies npm install # Build the package npm run build

設定

Claude Desktopでの使用

claude_desktop_config.jsonに以下を追加します。

npx

{ "mcpServers": { "xpath": { "command": "npx", "args": [ "@thirdstrandstudio/mcp-xpath" ] } } }

直接Node.js

{ "mcpServers": { "xpath": { "command": "node", "args": [ "/path/to/mcp-xpath/dist/index.js" ] } } }

/path/to/mcp-xpathリポジトリへの実際のパスに置き換えます。

XMLコンテンツのクエリ

// Select all <item> elements from XML const result = await callTool("xpath", { xml: "<root><item>value1</item><item>value2</item></root>", query: "//item/text()", mimeType: "text/xml" });

HTMLコンテンツのクエリ

// Get all links from HTML const result = await callTool("xpath", { xml: "<html><body><a href='link1.html'>Link 1</a><a href='link2.html'>Link 2</a></body></html>", query: "//a/@href", mimeType: "text/html" });

クエリURLコンテンツ

// Get all links from a webpage const result = await callTool("xpathwithurl", { url: "https://example.com", query: "//a/@href", mimeType: "text/html" });

発達

# Install dependencies npm install # Start the server in development mode npm start

ライセンス

このMCPサーバーはMITライセンスに基づいてライセンスされています。つまり、MITライセンスの条件に従って、ソフトウェアを自由に使用、改変、配布することができます。詳細については、プロジェクトリポジトリのLICENSEファイルをご覧ください。

One-click Deploy
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

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/thirdstrandstudio/mcp-xpath'

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