SEO MCP Tools
Provides tools to extract the first or all sitemap URLs from a website's robots.txt file.
README
SEO MCP Tools
A Model Context Protocol (MCP) server that provides SEO tools for analyzing robots.txt files. This server implements a set of specialized tools that help extract and analyze sitemap information from robots.txt files across the web.
Features
The SEO MCP Tools server provides two primary tools:
- Get First Sitemap URL: Extract the first sitemap URL from a robots.txt file.
- Get All Sitemap URLs: Extract all sitemap URLs from a robots.txt file.
Requirements
- Python 3.8+
- FastMCP
- advertools
- requests
- pandas
Installation
-
Clone this repository:
git clone https://github.com/yourusername/seo-mcp-tools.git cd seo-mcp-tools -
Install the required dependencies:
pip install fastmcp advertools requests pandas
Usage
Running the Server
Start the MCP server with:
python mcp_server.py
Alternatively, use the FastMCP development tools for an interactive testing environment:
fastmcp dev mcp_server.py
MCP Tool Calls
Get First Sitemap URL
from mcp_client import MCP_Client # Assuming you're using an MCP client
client = MCP_Client("http://localhost:8000")
# Extract the first sitemap URL from a robots.txt file
first_sitemap = client.call("get_sitemap_url_from_robots_txt", {
"robots_txt_url": "https://example.com/robots.txt"
})
print(f"First sitemap URL: {first_sitemap}")
Get All Sitemap URLs
# Extract all sitemap URLs from a robots.txt file
all_sitemaps = client.call("get_all_sitemap_urls_from_robots_txt", {
"robots_txt_url": "https://example.com/robots.txt"
})
print(f"All sitemap URLs: {all_sitemaps}")
Claude Desktop Integration
-
Create a minimal MCP configuration file:
{ "version": "v1", "endpoints": [{ "name": "SEO Tools", "transport": { "type": "stdio", "command": { "path": "/path/to/python", "args": ["/path/to/mcp_server.py"] } }, "input_format": "json", "output_format": "json" }] } -
Install in Claude Desktop:
fastmcp install mcp_server.py
For development/testing mode, use: fastmcp dev mcp_server.py
Testing
Run the tests to verify server functionality:
pytests
The test suite includes validation against real websites' robots.txt files to ensure the tools work correctly with various robots.txt structures.
How It Works
The server uses direct HTTP requests to fetch robots.txt files from URLs, then applies regular expression patterns to extract relevant directives. This approach ensures reliable parsing of robots.txt files from various websites, regardless of formatting differences.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.