
Sitemap MCP Server
Sitemap MCP Server
Tools
get_sitemap_tree
Fetch and parse the sitemap tree from a website URL
get_sitemap_pages
Get all pages from a website's sitemap with optional limits and filtering options. Supports cursor-based pagination.
get_sitemap_stats
Get comprehensive statistics about a website's sitemap structure
parse_sitemap_content
Parse a sitemap directly from its XML or text content
README
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.
<a href="https://glama.ai/mcp/servers/@mugoosse/sitemap-mcp-server"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@mugoosse/sitemap-mcp-server/badge" /> </a>
Demo
Get answers to questions about any website leveraging the power of sitemaps.
<details><summary>Cursor: how many pages does a modelcontextprotocol.io have?</summary>
<br/>
<img width="1541" alt="image" src="https://github.com/user-attachments/assets/f234b35f-ccb2-44c6-8ce5-71a6d2531e43" />
</details>
<details><summary>Claude + prompt: visualize the sitemap in a diagram of windsurf.com</summary>
<br/>
Click on the "attach" button next to the tools button:
Then select visualize_sitemap
:
<img width="558" alt="image" src="https://github.com/user-attachments/assets/2106e720-52c3-48a3-aa64-fd9c0a6ab075" />
Now we enter windsurf.com:
And we get a visualization of teh sitemap:
<img width="1470" alt="image" src="https://github.com/user-attachments/assets/04464315-e619-4df5-8082-a981e6437da9" />
</details>
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.:
{
"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.
Installing via Smithery
To install sitemap for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @mugoosse/sitemap --client claude
MCP Inspector
<details><summary>uv + stdio transport</summary>
npx @modelcontextprotocol/inspector env TRANSPORT=stdio uvx sitemap-mcp-server
Open the MCP Inspector at http://127.0.0.1:6274, select stdio
transport, and connect to the MCP server.
</details>
<details><summary>uv + sse transport</summary>
# 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 at http://127.0.0.1:6274, select sse
transport, and connect to the MCP server.
</details>
SSE Transport
If you want to use the SSE transport, follow these steps:
- Start the server:
uvx sitemap-mcp-server
- Configure your MCP Client, e.g. Cursor:
{
"mcpServers": {
"sitemap": {
"transport": "sse",
"url": "http://localhost:8050/sse"
}
}
}
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
{
"name": "get_sitemap_tree",
"arguments": {
"url": "https://example.com",
"include_pages": true
}
}
Get Pages with Filtering and Pagination
Filter by Route
{
"name": "get_sitemap_pages",
"arguments": {
"url": "https://example.com",
"limit": 100,
"include_metadata": true,
"route": "/blog/"
}
}
Filter by Specific Subsitemap
{
"name": "get_sitemap_pages",
"arguments": {
"url": "https://example.com",
"limit": 100,
"include_metadata": true,
"sitemap_url": "https://example.com/blog-sitemap.xml"
}
}
Cursor-Based Pagination
The server implements MCP cursor-based pagination to handle large sitemaps efficiently:
Initial Request:
{
"name": "get_sitemap_pages",
"arguments": {
"url": "https://example.com",
"limit": 50
}
}
Response with Pagination:
{
"base_url": "https://example.com",
"pages": [...], // First batch of pages
"limit": 50,
"nextCursor": "eyJwYWdlIjoxfQ=="
}
Subsequent Request with Cursor:
{
"name": "get_sitemap_pages",
"arguments": {
"url": "https://example.com",
"limit": 50,
"cursor": "eyJwYWdlIjoxfQ=="
}
}
When there are no more results, the nextCursor
field will be absent from the response.
Get Sitemap Statistics
{
"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 the sitemap_url
parameter in get_sitemap_pages
to filter pages from a specific subsitemap.
Parse Sitemap Content Directly
{
"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
}
}
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.
推荐服务器

Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。