Skip to main content
Glama

Servidor XPath MCP

Servidor MCP para ejecutar consultas XPath en contenido XML.

imagen

Herramientas

  1. xpath
    • Consultar contenido XML mediante expresiones XPath
    • Entradas:
      • xml (cadena): el contenido XML a consultar
      • query (cadena): La consulta XPath a ejecutar
      • mimeType (opcional, cadena): el tipo MIME (por ejemplo, texto/xml, aplicación/xml, texto/html, aplicación/xhtml+xml)
    • Devuelve: El resultado de la consulta XPath como una cadena
  2. xpathwithurl
    • Obtener contenido de una URL y consultarlo mediante expresiones XPath
    • Entradas:
      • url (cadena): La URL para obtener el contenido XML/HTML
      • query (cadena): La consulta XPath a ejecutar
      • mimeType (opcional, cadena): el tipo MIME (por ejemplo, texto/xml, aplicación/xml, texto/html, aplicación/xhtml+xml)
    • Devuelve: El resultado de la consulta XPath como una cadena

Instalación

Instalación mediante herrería

Para instalar mcp-xpath para Claude Desktop automáticamente a través de Smithery :

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

Configuración

Uso con Claude Desktop

Agregue lo siguiente a su claude_desktop_config.json :

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

Reemplace /path/to/mcp-xpath con la ruta real a su repositorio.

Ejemplos

Consultar contenido 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" });

Consultar contenido 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" });

Consultar el contenido de la URL

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

Desarrollo

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

Licencia

Este servidor MCP cuenta con la licencia MIT. Esto significa que puede usar, modificar y distribuir el software libremente, sujeto a los términos y condiciones de la licencia MIT. Para más detalles, consulte el archivo de LICENCIA en el repositorio del proyecto.

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

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Servidor MCP para ejecutar consultas XPath en contenido XML

  1. Herramientas
    1. Instalación
      1. Instalación mediante herrería
    2. Configuración
      1. Uso con Claude Desktop
    3. Ejemplos
      1. Consultar contenido XML
      2. Consultar contenido HTML
      3. Consultar el contenido de la URL
    4. Desarrollo
      1. Licencia

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          An MCP server for fetching and transforming web content into various formats.
          Last updated -
          4
          4
          Python
          MIT License
          • Apple
        • A
          security
          A
          license
          A
          quality
          MCP Server enabling integration with Scrapezy to retrieve structured data from websites.
          Last updated -
          1
          12
          1
          JavaScript
          MIT License
          • Apple
        • A
          security
          F
          license
          A
          quality
          Built as a Model Context Protocol (MCP) server that provides advanced web search, content extraction, web crawling, and scraping capabilities using the Firecrawl API.
          Last updated -
          4
          1
          Python
          • Apple
          • Linux

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

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