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.
Integrations
References GitHub for project repository and asset hosting, though not a core integration
Handles Google News sitemaps, allowing for fetching and analyzing news-specific sitemap data
Creates Mermaid.js diagrams to visualize sitemap structures through the provided sitemap visualization prompts
Sitemap MCP Server
The Sitemap MCP Server provides AI agents and MCP clients with powerful tools for fetching, parsing, analyzing, and visualizing website sitemaps. It handles all standard sitemap formats including XML, Google News, and plain text sitemaps.
Demo
Get answers to questions about any website leveraging the power of sitemaps.
Click on the "attach" button next to the tools button:
Then select visualize_sitemap
:
Now we enter windsurf.com:
And we get a visualization of teh sitemap:
Installation
Make sure uv is installed.
Installing in Claude Desktop, Cursor or Windsurf
Add this entry to your claude_desktop_config.json, Cursor settings, etc.:
Restart Claude if it's running. For Cursor simply press refresh and/or enable the MCP Server in the settings.
Installing via Smithery
To install sitemap for Claude Desktop automatically via Smithery:
MCP Inspector
Open the MCP Inspector at http://127.0.0.1:6274, select stdio
transport, and connect to the MCP server.
Open the MCP Inspector at http://127.0.0.1:6274, select sse
transport, and connect to the MCP server.
SSE Transport
If you want to use the SSE transport, follow these steps:
- Start the server:
- Configure your MCP Client, e.g. Cursor:
Local Development
For instructions on building and running the project from source, please refer to the DEVELOPERS.md guide.
Usage
Tools
The following tools are available via the MCP server:
- get_sitemap_tree - Fetch and parse the sitemap tree from a website URL
- Arguments:
url
(website URL),include_pages
(optional, boolean) - Returns: JSON representation of the sitemap tree structure
- Arguments:
- get_sitemap_pages - Get all pages from a website's sitemap with filtering options
- Arguments:
url
(website URL),limit
(optional),include_metadata
(optional),route
(optional),sitemap_url
(optional),cursor
(optional) - Returns: JSON list of pages with pagination metadata
- Arguments:
- get_sitemap_stats - Get statistics about a website's sitemap
- Arguments:
url
(website URL) - Returns: JSON object with sitemap statistics including page counts, modification dates, and subsitemap details
- Arguments:
- parse_sitemap_content - Parse a sitemap directly from its XML or text content
- Arguments:
content
(sitemap XML content),include_pages
(optional, boolean) - Returns: JSON representation of the parsed sitemap
- Arguments:
Prompts
The server includes ready-to-use prompts that appear as templates in Claude Desktop. After installing the server, you'll see these templates in the "Templates" menu (click the + icon next to the message input):
- Analyze Sitemap: Provides comprehensive structure analysis of a website's sitemap
- Check Sitemap Health: Evaluates SEO and health metrics of a sitemap
- Extract URLs from Sitemap: Extracts and filters specific URLs from a sitemap
- Find Missing Content in Sitemap: Identifies content gaps in a website's sitemap
- Visualize Sitemap Structure: Creates a Mermaid.js diagram visualization of sitemap structure
To use these prompts:
- Click the + icon next to the message input in Claude Desktop
- Select the desired template from the list
- Fill in the website URL when prompted
- Claude will execute the appropriate sitemap analysis
Examples
Fetch a Complete Sitemap
Get Pages with Filtering and Pagination
Filter by Route
Filter by Specific Subsitemap
Cursor-Based Pagination
The server implements MCP cursor-based pagination to handle large sitemaps efficiently:
Initial Request:
Response with Pagination:
Subsequent Request with Cursor:
When there are no more results, the nextCursor
field will be absent from the response.
Get Sitemap Statistics
The response includes both total statistics and detailed stats for each subsitemap:
This allows MCP clients to understand which subsitemaps might be of interest for further investigation. You can then use the sitemap_url
parameter in get_sitemap_pages
to filter pages from a specific subsitemap.
Parse Sitemap Content Directly
Acknowledgements
- This MCP Server leverages the ultimate-sitemap-parser library
- Built using the Model Context Protocol Python SDK
License
This project is licensed under the MIT License. See the LICENSE file for details.
You must be authenticated.
Sitemap MCP Server