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를 자동으로 설치하려면:

지엑스피1

# Install dependencies
npm install

# Build the package
npm run build

설정

Claude Desktop과 함께 사용

claude_desktop_config.json 에 다음을 추가하세요.

엔피엑스

{
  "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 파일을 참조하세요.

Install Server
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