mcp-xpath
Offers direct Node.js execution capabilities for the MCP server, with configuration options for connecting the XPath functionality to Node.js environments.
Enables execution of XPath queries on XML content, allowing content extraction and transformation from XML documents with support for various MIME types including text/xml and application/xml.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-xpathextract all links from https://example.com using //a/@href"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
XPath MCP Server
MCP Server for executing XPath queries on XML content.
Tools
xpathQuery XML content using XPath expressions
Inputs:
xml(string): The XML content to queryquery(string): The XPath query to executemimeType(optional, string): The MIME type (e.g. text/xml, application/xml, text/html, application/xhtml+xml)
Returns: The result of the XPath query as a string
xpathwithurlFetch content from a URL and query it using XPath expressions
Inputs:
url(string): The URL to fetch XML/HTML content fromquery(string): The XPath query to executemimeType(optional, string): The MIME type (e.g. text/xml, application/xml, text/html, application/xhtml+xml)
Returns: The result of the XPath query as a string
Related MCP server: Cleyrop MCP
Installation
Installing via Smithery
To install mcp-xpath for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @thirdstrandstudio/mcp-xpath --client claude# Install dependencies
npm install
# Build the package
npm run buildSetup
Usage with Claude Desktop
Add the following to your claude_desktop_config.json:
npx
{
"mcpServers": {
"xpath": {
"command": "npx",
"args": [
"@thirdstrandstudio/mcp-xpath"
]
}
}
}Direct Node.js
{
"mcpServers": {
"xpath": {
"command": "node",
"args": [
"/path/to/mcp-xpath/dist/index.js"
]
}
}
}Replace /path/to/mcp-xpath with the actual path to your repository.
Examples
Query XML content
// 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"
});Query HTML content
// 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"
});Query URL content
// Get all links from a webpage
const result = await callTool("xpathwithurl", {
url: "https://example.com",
query: "//a/@href",
mimeType: "text/html"
});Development
# Install dependencies
npm install
# Start the server in development mode
npm startLicense
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- Alicense-qualityCmaintenanceMCP server for Seline Analytics APILast updated1862MIT
- Flicense-qualityCmaintenanceMCP server to interact with Cleyrop work data: browse, search, read file content, and manage files/folders.Last updated
- Flicense-qualityDmaintenanceMCP server that provides tools to read JSON files and query data using jsonPath expressions.Last updated
- Alicense-qualityCmaintenanceMCP server for searching and retrieving pages from Atlassian Confluence.Last updated681MIT
Related MCP Connectors
MCP server for fcc-ecfs
Remote MCP server for XDaLa workflow preparation on XGR.Network.
MCP server for Google search results via SERP API
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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