A Model Context Protocol (MCP) server for retrieving and analyzing XSD (XML Schema Definition) files.
This MCP server provides tools for retrieving XSD files from URLs or local paths, validating them, and analyzing their elements. Integrates with any LLM model.
The server provides the following MCP tools:
- retrieve_xsd - Retrieve an XSD file from a URL or file path
- validate_xsd - Validate if the retrieved content is a valid XSD
- list_xsd_elements - List elements defined in an XSD
- get_mcp_server_info - Get MCP server information including name and version (v1.2.0+)
npm install
npm run buildTo run the server:
npm startThe server communicates via stdio and can be integrated with any MCP-compatible client.
Retrieves an XSD file from a URL or local path.
Parameters:
source(string, required): URL or file path to the XSD filesave_path(string, optional): Local path where to save the retrieved XSD file
Validates if the provided content is a valid XSD.
Parameters:
xsd_content(string, required): XSD content to validate
Lists elements defined in an XSD.
Parameters:
xsd_content(string, required): XSD content to analyze
Get MCP server information including name and version.
Parameters:
- None
- Enhanced XML/XSD parsing with improved regex patterns for better accuracy
- Better error handling with graceful degradation for malformed content
- New
get_mcp_server_infotool to retrieve server name and version - Improved namespace extraction with proper prefix and URI handling
- Enhanced element attribute extraction for both self-closing and container elements
- Better deduplication logic for elements with the same name
- Added comprehensive test suite with 9 new tests for XML parsing
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.