Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 3 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# WebCat MCP Server - Development Makefile
.PHONY: help install install-dev format lint test test-coverage clean build docker-build docker-run demo health check-all pre-commit setup-dev
.PHONY: help install install-dev format lint test test-coverage clean build docker-build docker-run health check-all pre-commit setup-dev

# Default target
help: ## Show this help message
Expand Down Expand Up @@ -108,11 +108,7 @@ docker-build: ## Build Docker image

docker-run: ## Run Docker container
@echo "🐳 Running Docker container..."
docker run -p 8000:8000 -p 8001:8001 -e WEBCAT_MODE=demo webcat:latest

docker-run-prod: ## Run Docker container in production mode
@echo "🐳 Running Docker container in production mode..."
docker run -p 8000:8000 -e WEBCAT_MODE=mcp webcat:latest
docker run -p 8000:8000 webcat:latest

# Development servers
dev: ## Start MCP server with auto-reload (development mode)
Expand All @@ -123,23 +119,6 @@ dev: ## Start MCP server with auto-reload (development mode)
@echo ""
cd docker && PYTHONPATH=. watchmedo auto-restart --recursive --pattern="*.py" --directory=. -- python mcp_server.py

dev-demo: ## Start demo server with auto-reload (development mode)
@echo "🚀 Starting demo server with auto-reload..."
@echo "🎨 Demo client: http://localhost:8000/client"
@echo "💗 Health check: http://localhost:8000/health"
@echo "📊 Status: http://localhost:8000/status"
@echo "🔄 Auto-reload enabled - edit files to see changes"
@echo ""
cd docker && PYTHONPATH=. watchmedo auto-restart --recursive --pattern="*.py" --directory=. -- python simple_demo.py

demo: ## Start demo server locally (production mode)
@echo "🎨 Starting demo server..."
cd docker && python cli.py --mode demo --port 8000

demo-bg: ## Start demo server in background
@echo "🎨 Starting demo server in background..."
cd docker && nohup python cli.py --mode demo --port 8000 > demo.log 2>&1 &
@echo "Demo server started in background. Check demo.log for logs."

mcp: ## Start MCP server locally (production mode)
@echo "🛠️ Starting MCP server..."
Expand All @@ -148,7 +127,6 @@ mcp: ## Start MCP server locally (production mode)
stop-bg: ## Stop background servers
@echo "🛑 Stopping background servers..."
pkill -f "python cli.py" || true
pkill -f "python simple_demo.py" || true
@echo "Background servers stopped."

# Health and monitoring
Expand All @@ -162,7 +140,7 @@ status: ## Check server status

logs: ## Show recent logs
@echo "📝 Recent logs..."
tail -f docker/demo.log || tail -f /tmp/webcat*.log
tail -f /tmp/webcat*.log

# Cleanup
clean: ## Clean up temporary files and caches
Expand Down
27 changes: 10 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Web search and content extraction for AI models via Model Context Protocol (MCP)**

[![Version](https://img.shields.io/badge/version-2.3.1-blue.svg)](https://github.com/Kode-Rex/webcat)
[![Version](https://img.shields.io/badge/version-2.3.2-blue.svg)](https://github.com/Kode-Rex/webcat)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Docker](https://img.shields.io/badge/docker-multi--platform-blue.svg)](https://hub.docker.com/r/tmfrisinger/webcat)

Expand All @@ -29,23 +29,19 @@ docker run -p 8000:8000 -e WEBCAT_API_KEY=your_token tmfrisinger/webcat:latest
cd docker
python -m pip install -e ".[dev]"

# Start demo server with UI
python simple_demo.py
# Start MCP server with auto-reload
make dev

# Or use make commands
make dev # Start with auto-reload
make dev-demo # Start demo with auto-reload
# Or run directly
python mcp_server.py
```

![WebCat Demo Client](assets/webcat-demo-client.png)

## What is WebCat?

WebCat is an **MCP (Model Context Protocol) server** that provides AI models with:
- 🔍 **Web Search** - Serper API (premium) or DuckDuckGo (free fallback)
- 📄 **Content Extraction** - Clean markdown conversion with Readability + html2text
- 🌐 **SSE Streaming** - Real-time results via Server-Sent Events
- 🎨 **Demo UI** - Interactive testing interface
- 🐳 **Multi-Platform Docker** - Works on Intel, ARM, and Apple Silicon

Built with **FastAPI**, **FastMCP**, and **Readability** for seamless AI integration.
Expand Down Expand Up @@ -89,18 +85,15 @@ echo "SERPER_API_KEY=your_key" > .env

# Development mode with auto-reload
make dev # Start MCP server with auto-reload
make dev-demo # Start demo server with auto-reload

# Production mode
make mcp # Start MCP server
make demo # Start demo server
```

## Available Endpoints

| Endpoint | Description |
|----------|-------------|
| `http://localhost:8000/demo` | 🎨 Interactive demo UI |
| `http://localhost:8000/health` | 💗 Health check |
| `http://localhost:8000/status` | 📊 Server status |
| `http://localhost:8000/mcp` | 🛠️ MCP protocol endpoint |
Expand Down Expand Up @@ -226,7 +219,7 @@ Hooks run automatically on `git commit` to ensure code quality. Install with `ma
```
docker/
├── mcp_server.py # Main MCP server (FastMCP)
├── simple_demo.py # Demo server with interactive UI
├── cli.py # CLI interface for server modes
├── health.py # Health check endpoint
├── api_tools.py # API tooling utilities
├── clients/ # External API clients
Expand Down Expand Up @@ -270,7 +263,7 @@ cd docker

# Manual multi-platform build and push
docker buildx build --platform linux/amd64,linux/arm64 \
-t tmfrisinger/webcat:2.3.1 \
-t tmfrisinger/webcat:2.3.2 \
-t tmfrisinger/webcat:latest \
-f Dockerfile --push .

Expand All @@ -281,8 +274,8 @@ docker buildx imagetools inspect tmfrisinger/webcat:latest
**Automated Releases:**
Push a version tag to trigger automated multi-platform builds via GitHub Actions:
```bash
git tag v2.3.1
git push origin v2.3.1
git tag v2.3.2
git push origin v2.3.2
```

## Limitations
Expand Down Expand Up @@ -317,4 +310,4 @@ MIT License - see [LICENSE](LICENSE) file for details.

---

**Version 2.3.1** | Built with FastMCP, FastAPI, Readability, and html2text
**Version 2.3.2** | Built with FastMCP, FastAPI, Readability, and html2text
90 changes: 0 additions & 90 deletions docker/demo_utils.py

This file was deleted.

57 changes: 0 additions & 57 deletions docker/endpoints/demo_client.py

This file was deleted.

Loading
Loading