Major refactoring to fix high CPU usage and improve architecture:
## Fixed Issues
- MCP servers were stuck in infinite loops when stdin closed
- Fixed by checking for EOF (empty string) from stdin.read()
- Fixed indentation error in base.py causing syntax errors
## New Architecture
- Split into separate client and daemon binaries:
- `mcp-browser`: Smart client that can use daemon or run standalone
- `mcp-browser-daemon`: Persistent daemon process
- `mcp-browser-legacy`: Old monolithic version (deprecated)
## Client Features
- Auto-detects and uses daemon if available
- Can auto-start daemon if needed
- Falls back to standalone mode
- Supports `--use-daemon` with modes: auto, always, never
- Works as MCP server (stdin/stdout) or CLI tool
## Daemon Features
- Runs as background process with socket server
- Supports multiple concurrent clients
- Can run in foreground with `--foreground`
- Includes systemd service files for production
- Proper signal handling and cleanup
## Usage Examples
```bash
# CLI usage (auto-uses daemon if available)
mcp-browser tools-list
mcp-browser tools-call builtin:patterns::list_patterns '{}'
# Force standalone mode
mcp-browser --use-daemon never tools-list
# Run daemon manually
mcp-browser-daemon --foreground --log-level DEBUG
# Use as MCP server
echo '{"method":"tools/list"}' | mcp-browser --mode server
```
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added proper package discovery for mcp_servers modules
- Created __init__.py files for all mcp_servers subpackages
- Added MANIFEST.in to ensure all files are included in distribution
- Removed mcp-browser-demo entry point from setup.py
- Fixed package_data to include all necessary files
The mcp_servers modules are now properly installed alongside mcp_browser,
allowing built-in servers to work correctly after installation.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>