Sitemap MCP Server

by mugoosse

Not rated
GitHub

About

A server for fetching, parsing, analyzing, and visualizing website sitemaps.

Details

Author
mugoosse
Categories
Web Scraping

Setup

Install Sitemap MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/mugoosse/sitemap-mcp-server

Follow the installation instructions in the repository README, then restart your MCP client.

A server for fetching, parsing, analyzing, and visualizing website sitemaps.

Discover website architecture and analyze site structure by fetching, parsing, and visualizing sitemaps from any URL. Uncover hidden pages and extract organized hierarchies without manual exploration.

Includes ready-to-use prompt templates for Claude Desktop that let you analyze websites, check sitemap health, extract URLs, find missing content, and create visualizations with just a URL input.

Get answers to questions about any website leveraging the power of sitemaps.

Click on the "attach" button next to the tools button:

And we get a visualization of the sitemap:

Installing in Claude Desktop, Cursor or Windsurf

Add this entry to yourclaude_desktop_config.json, Cursor settings, etc.:

{ "mcpServers": { "sitemap": { "command": "uvx", "args": ["sitemap-mcp-server"], "env": { "TRANSPORT": "stdio" } } } }

Restart Claude if it's running. For Cursor simply press refresh and/or enable the MCP Server in the settings.

To install sitemap for Claude Desktop automatically viaSmithery:

npx -y @smithery/cli install @mugoosse/sitemap --client claude
npx @modelcontextprotocol/inspector env TRANSPORT=stdio uvx sitemap-mcp-server

Open the MCP Inspector athttp://127.0.0.1:6274, selectstdiotransport, and connect to the MCP server.

# Start the server uvx sitemap-mcp-server # Start the MCP Inspector in a separate terminal npx @modelcontextprotocol/inspector connect http://127.0.0.1:8050

Open the MCP Inspector athttp://127.0.0.1:6274, selectssetransport, and connect to the MCP server.

If you want to use the SSE transport, follow these steps:

{ "mcpServers": { "sitemap": { "transport": "sse", "url": "http://localhost:8050/sse" } } }

For instructions on building and running the project from source, please refer to theDEVELOPERS.mdguide.

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

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

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

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

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

{ "name": "get_sitemap_tree", "arguments": { "url": "https://example.com", "include_pages": true } }
{ "name": "get_sitemap_pages", "arguments": { "url": "https://example.com", "limit": 100, "include_metadata": true, "route": "/blog/" } }
{ "name": "get_sitemap_pages", "arguments": { "url": "https://example.com", "limit": 100, "include_metadata": true, "sitemap_url": "https://example.com/blog-sitemap.xml" } }

The server implements MCP cursor-based pagination to handle large sitemaps efficiently:

{ "name": "get_sitemap_pages", "arguments": { "url": "https://example.com", "limit": 50 } }
{ "base_url": "https://example.com", "pages": [...], // First batch of pages "limit": 50, "nextCursor": "eyJwYWdlIjoxfQ==" }
{ "name": "get_sitemap_pages", "arguments": { "url": "https://example.com", "limit": 50, "cursor": "eyJwYWdlIjoxfQ==" } }

When there are no more results, thenextCursorfield will be absent from the response.

{ "name": "get_sitemap_stats", "arguments": { "url": "https://example.com" } }

The response includes both total statistics and detailed stats for each subsitemap:

{ "total": { "url": "https://example.com", "page_count": 150, "sitemap_count": 3, "sitemap_types": ["WebsiteSitemap", "NewsSitemap"], "priority_stats": { "min": 0.1, "max": 1.0, "avg": 0.65 }, "last_modified_count": 120 }, "subsitemaps": [ { "url": "https://example.com/sitemap.xml", "type": "WebsiteSitemap", "page_count": 100, "priority_stats": { "min": 0.3, "max": 1.0, "avg": 0.7 }, "last_modified_count": 80 }, { "url": "https://example.com/blog/sitemap.xml", "type": "WebsiteSitemap", "page_count": 50, "priority_stats": { "min": 0.1, "max": 0.9, "avg": 0.5 }, "last_modified_count": 40 } ] }

This allows MCP clients to understand which subsitemaps might be of interest for further investigation. You can then use thesitemap_urlparameter inget_sitemap_pagesto filter pages from a specific subsitemap.

{ "name": "parse_sitemap_content", "arguments": { "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"><url><loc>https://example.com/</loc></url></urlset>", "include_pages": true } }

- This MCP Server leverages theultimate-sitemap-parserlibrary
- Built using the
Model Context ProtocolPython SDK

This project is licensed under the MIT License. See theLICENSEfile for details.

Enable AI agents to get structured data from unstructured web with AgentQL.

Web scraping, crawling, and change detection with AI

Official Apify MCP server for AI agents to run Actors, extract website data, and automate web scraping and crawling workflows.

1GB Free Trial, World's Leading Proxy Service Platform, Efficient Data Collection

Discover, extract, and interact with the web - one interface powering automated access across the public internet.

Automate browser interactions in the cloud (e.g. web navigation, data extraction, form filling, and more)

Easy web data access. Simplified retrieval of information from websites and online sources.

Adds powerful web scraping and search capabilities to LLM clients like Cursor and Claude.

Real-time web data, structured for agents

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.