π¦
Web Tools MCP Server Fastapi
No description available
0 installs
Trust: 30 β Low
Devtools
Ask AI about Web Tools MCP Server Fastapi
Powered by Claude Β· Grounded in docs
I know everything about Web Tools MCP Server Fastapi. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
π Web Tools MCP Server
A FastAPI + MCP (Model Context Protocol) server exposing web search & scraping tools via SSE transport. Deploy to Railway and connect to Claude.ai or any MCP-compatible client.
π οΈ Tools Available
| Tool | Description |
|---|---|
web_search | Search the web via DuckDuckGo (no API key needed) |
search_news | Find recent news articles on any topic |
scrape_url | Extract clean text content from any webpage |
extract_links | Get all hyperlinks from a page (with optional keyword filter) |
get_page_summary | Structured summary: title, description, headings outline |
π Project Structure
mcp-server/
βββ main.py # FastAPI app + MCP server setup
βββ tools/
β βββ search.py # web_search, search_news
β βββ scraper.py # scrape_url, extract_links, get_page_summary
βββ requirements.txt
βββ railway.toml # Railway deployment config
βββ Procfile
βββ README.md
π Local Development
# 1. Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# 2. Install dependencies
pip install -r requirements.txt
# 3. Run the server
uvicorn main:app --reload --port 8000
# 4. Open in browser
# http://localhost:8000 β Info
# http://localhost:8000/health β Health check
# http://localhost:8000/sse β MCP SSE endpoint
βοΈ Deploy to Railway
Option A: GitHub (recommended)
- Push this project to a GitHub repo
- Go to railway.app β New Project β Deploy from GitHub
- Select your repo β Railway auto-detects Python and deploys
- Go to Settings β Networking β Generate Domain
- Your MCP URL will be:
https://your-app.railway.app/sse
Option B: Railway CLI
npm install -g @railway/cli
railway login
railway init
railway up
π Connect to Claude.ai
- Open claude.ai β Click your profile β Settings
- Go to Integrations (or MCP Servers)
- Click Add MCP Server
- Enter your Railway URL:
https://your-app.railway.app/sse - Save β Claude will now have access to all 5 tools!
π Connect to Any MCP Client
Any MCP client that supports SSE transport can connect. Example config:
{
"mcpServers": {
"web-tools": {
"url": "https://your-app.railway.app/sse",
"transport": "sse"
}
}
}
π‘ API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/ | GET | Server info + available tools |
/health | GET | Health check |
/sse | GET | MCP SSE transport endpoint |
β‘ Why SSE for Claude.ai?
- Claude.ai remote MCP integrations use SSE transport
- SSE = server pushes events to client over a persistent HTTP connection
- Works through firewalls and proxies (unlike WebSockets)
- Railway supports long-lived connections β
