Simple MCP Tool Server
A simple MCP server that provides a tool for fetching website content using SSE transport.
Simple MCP Tool Server
A simple MCP server that exposes a website fetching tool using SSE transport.
Requirements
- Python 3.10 or higher (tested on Python 3.13)
Installation
# Create a virtual environment
python3 -m venv venv
# Activate the virtual environment
source venv/bin/activate
# Install the package and dependencies
pip install -r requirements.txt
MCP Python SDK Documentation
The MCP Python SDK documentation has been split into smaller files and organized in the docs/ directory. This structure makes it easier for AI agents to navigate and understand the SDK. The documentation covers:
- Core concepts (servers, resources, tools, etc.)
- Running MCP servers in different modes
- Examples and advanced usage
- And more!
Usage
The package provides a command-line interface (CLI) with several commands to manage the MCP server:
Starting the server
Start the server on the default port (7000) or specify a custom port:
# Using default port (7000)
python -m mcp_simple_tool start
# Using custom port
python -m mcp_simple_tool start --port 8000
Managing the server
# Check if server is running
python -m mcp_simple_tool check [--port PORT]
# Stop the server
python -m mcp_simple_tool stop [--port PORT]
# Restart the server (stop and start)
python -m mcp_simple_tool restart [--port PORT]
The restart command will:
- Stop any existing server on the specified port
- Start a new server in the background
- Wait until the server is responsive
- Log output to server.log
CLI quick reference
| Command | Purpose |
|---|---|
start | Start the server |
stop | Stop the server |
check | Health-check |
restart | Stop & start |
Server Tools
The server exposes the following tools:
-
fetch: Remote HTTP fetcher – give an absolute URL; returns page text.
url: The URL of the website to fetch (required)
-
search_docs: Semantic search across SDK documentation; returns top-k excerpts.
query: Search phrase or question (required)k: Number of top matches to return (optional, default = 3)
-
get_content: Get the full local file for any match returned by
search_docs.file: Path relative to docs (required)
Development Setup
For development, install additional tools:
pip install -e .
pip install -r requirements.txt
Use the Makefile for common tasks:
# Format code
make fmt
# Run linters
make lint
# Run tests
make test
The test suite has a built-in 20-second timeout for all tests to prevent hanging, especially with SSE endpoints. For individual tests, a more strict timeout can be specified using the @pytest.mark.timeout(seconds) decorator.
Semantic Search Index
For the search_docs tool, you can manually build or rebuild the vector index:
# Build or rebuild the semantic search index
python scripts/build_doc_index.py
The index is built automatically on first tool use if it doesn't exist.
Project Architecture
mcp_simple_tool/
__init__.py # Package initialization
__main__.py # Entry point when run as module
cli.py # Command-line interface
server/ # Server implementation
__init__.py # Server package initialization
app.py # ASGI application setup
config.py # Configuration settings
handlers.py # Tool implementations
http.py # HTTP utilities
semantic_search/ # Semantic search functionality
__init__.py # Package initialization
indexing.py # Build and persist vector store
search.py # Load index and query helpers
Using with Cursor
This MCP server can be used with Cursor as a client. For setup:
- Run the server in a terminal:
source venv/bin/activate
python -m mcp_simple_tool start
# or use the restart command
python -m mcp_simple_tool restart
- Configure Cursor by creating a
.cursor/mcp.jsonfile:
{
"mcpServers": {
"website-fetcher-sse": {
"url": "http://localhost:7000/sse"
}
}
}
- Mention the server in your prompts when using Cursor
Servidores relacionados
Bright Data
patrocinadorDiscover, extract, and interact with the web - one interface powering automated access across the public internet.
Daft.ie MCP Server
Search and retrieve rental property details from Daft.ie via web scraping.
SERP Scraper MCP
Extract structured Google & Bing results — organic, ads, featured snippets, PAA, related searches. Keyword research and rank checking. Free alternative to SerpApi. No API keys required.
Xiaohongshu Search & Comment
An automated tool to search notes, retrieve content, and post comments on Xiaohongshu (RedBook) using Playwright.
Rapidproxy
Over 70M+ premium IPs via Rapidproxy - Enjoy easy data extraction, avoiding CAPTCHAs, IP blocks with 220+ locations targeting, non-expiring traffic.
visa-jobs-mcp
Identify US visa-sponsoring opportunities on LinkedIn and access the right contacts to accelerate your outreach.
Trends MCP
Real-time trend data from Google (Search, Images, News, Shopping), YouTube, TikTok, Reddit, Amazon, Wikipedia, X (Twitter), LinkedIn, Spotify, GitHub, Steam, npm, App Store, news sentiment and web traffic via one MCP connection. Free API key, 20 requests/day, no credit card required.
AI Shopping Assistant
A conversational AI shopping assistant for web-based product discovery and decision-making.
Haunt API
AI-powered web data extraction MCP server — extract structured JSON from any website with natural language prompts.
Patchright Lite MCP Server
A server that wraps the Patchright SDK to provide stealth browser automation for AI models.
urlDNA
Dynamically scan and analyze potentially malicious URLs using the urlDNA.io