XPath

Executes XPath queries on XML/HTML content, with optional URL fetching for remote content.
  • javascript

0

GitHub Stars

javascript

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

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

You can run the XPath MCP Server to execute XPath queries against XML or HTML content, returning specific nodes, attributes, or text. This makes it easy to extract structured data from web pages, feeds, or XML documents in an automated way.

How to use

You interact with the server through an MCP client by launching a local MCP server instance and sending query requests. Use the built-in tools to run XPath expressions directly against XML content or fetch and query content from a URL. Two core capabilities are available: querying raw XML/HTML content and querying content retrieved from a URL.

How to install

# Prerequisites
- Node.js (recommended LTS)
- npm (comes with Node.js)

# Install the MCP server package via the client tool network (example using Smithery flow)
npx -y @smithery/cli install @thirdstrandstudio/mcp-xpath --client claude

# Install dependencies and build the package
npm install
npm run build

Additional setup and usage notes

If you plan to use the server with Claude Desktop, configure the MCP server entry to run via npx using the following setup. This keeps the MCP server self-contained and easy to update.

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

Examples of common queries

Query XML content to extract all item values, or query HTML to extract links, or fetch and query content from a URL. The tool returns the exact matching result as a string.

Notes on security and reliability

Limit the scope of queries to trusted XML/HTML inputs to avoid processing untrusted or oversized documents. Validate mime types and handle errors gracefully in your client that consumes the returned string.

Available tools

xpath

Query XML/HTML content using XPath expressions. Inputs: xml (string), query (string), mimeType (optional). Returns the result as a string.

xpathwithurl

Fetch content from a URL and query it using XPath expressions. Inputs: url (string), query (string), mimeType (optional). Returns the result as a string.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational