loading…
Search for a command to run...
loading…
Extracts clean text content and metadata from website URLs using Beautiful Soup through a standardized interface for AI agents. It supports both Bearer token au
Extracts clean text content and metadata from website URLs using Beautiful Soup through a standardized interface for AI agents. It supports both Bearer token authentication and a blockchain-based pay-per-use protocol for flexible access.
This is an MCP (Model Context Protocol) server that provides with authentication via Bearer tokens access to the Website Scraper MCP API. It enables AI agents and LLMs to interact with Website Scraper MCP through standardized tools.
This server provides the following tools:
example_tool: Placeholder tool (to be implemented)Note: Replace example_tool with actual Website Scraper MCP API tools based on the documentation.
Clone this repository:
git clone https://github.com/Traia-IO/website-scraper-mcp-mcp-server.git
cd website-scraper-mcp-mcp-server
Set your API key:
export WEB_SCRAPPING_API_KEY="your-api-key-here"
Run with Docker:
./run_local_docker.sh
.env file with your configuration:
WEB_SCRAPPING_API_KEY=your-api-key-here
SERVER_ADDRESS=0x1234567890123456789012345678901234567890
MCP_OPERATOR_PRIVATE_KEY=0x1234567890abcdef... MCP_OPERATOR_ADDRESS=0x9876543210fedcba...
D402_TESTING_MODE=false PORT=8000
2. Start the server:
```bash
docker-compose up
Install dependencies using uv:
uv pip install -e .
Run the server:
WEB_SCRAPPING_API_KEY="your-api-key-here" uv run python -m server
## Usage
### Health Check
Test if the server is running:
```bash
python mcp_health_check.py
from traia_iatp.mcp.traia_mcp_adapter import create_mcp_adapter_with_auth
# Connect with authentication
with create_mcp_adapter_with_auth(
url="http://localhost:8000/mcp/",
api_key="your-api-key"
) as tools:
# Use the tools
for tool in tools:
print(f"Available tool: {tool.name}")
# Example usage
result = await tool.example_tool(query="test")
print(result)
This server supports two modes of operation:
Clients with their own Website Scraper MCP API key can use the server for free:
# Request with client's API key
curl -X POST http://localhost:8000/mcp \
-H "Authorization: Bearer CLIENT_WEB_SCRAPPING_API_KEY" \
-H "Content-Type: application/json" \
-d '{"method":"tools/call","params":{"name":"example_tool","arguments":{"query":"test"}}}'
Flow:
Clients without an API key can pay-per-use via HTTP 402 protocol:
# Request with payment proof (x402/d402 protocol)
curl -X POST http://localhost:8000/mcp \
-H "X-PAYMENT: <base64_encoded_x402_payment>" \
-H "Content-Type: application/json" \
-d '{"method":"tools/call","params":{"name":"example_tool","arguments":{"query":"test"}}}'
Flow:
This server uses the traia_iatp.d402 module for payment verification:
DEFAULT_PRICE_USD)# Required
WEB_SCRAPPING_API_KEY=your_internal_website-scraper-mcp_api_key # Server's API key (for payment mode)
SERVER_ADDRESS=0x1234567890123456789012345678901234567890 # Server's payment address
# Required for Settlement (Production)
MCP_OPERATOR_PRIVATE_KEY=0x1234... # Private key for signing settlement attestations
MCP_OPERATOR_ADDRESS=0x5678... # Operator's public address (for verification)
# Optional
D402_FACILITATOR_URL=https://facilitator.d402.net # Facilitator service URL
D402_FACILITATOR_API_KEY=your_key # For private facilitator
D402_TESTING_MODE=false # Set to 'true' for local testing without settlement
Operator Keys:
Note on Per-Endpoint Configuration: Each endpoint's payment requirements (token address, network, price) are embedded in the tool code. They come from the endpoint configuration when the server is generated.
Client Decision:
Server Response:
Business Model:
python mcp_health_check.pyTo add new tools, edit server.py and:
@mcp.tool() decorated functionsdeployment_params.json with the tool names in the capabilities arrayThe deployment_params.json file contains the deployment configuration for this MCP server:
{
"github_url": "https://github.com/Traia-IO/website-scraper-mcp-mcp-server",
"mcp_server": {
"name": "website-scraper-mcp-mcp",
"description": "Website content scraper using beautiful soup - extract clean text content from any website url with metadata support and custom headers",
"server_type": "streamable-http",
"requires_api_key": true,
"api_key_header": "Authorization",
"capabilities": [
// List all implemented tool names here
"example_tool"
]
},
"deployment_method": "cloud_run",
"gcp_project_id": "traia-mcp-servers",
"gcp_region": "us-central1",
"tags": ["website scraper mcp", "api"],
"ref": "main"
}
Important: Always update the capabilities array when you add or remove tools!
This server is designed to be deployed on Google Cloud Run. The deployment will:
/mcp endpoint for client connectionsPORT: Server port (default: 8000)STAGE: Environment stage (default: MAINNET, options: MAINNET, TESTNET)LOG_LEVEL: Logging level (default: INFO)WEB_SCRAPPING_API_KEY: Your Website Scraper MCP API key (required)docker logs <container-id>Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"website-scraper-mcp-server": {
"command": "npx",
"args": []
}
}
}