Commit Graph

9 Commits

Author SHA1 Message Date
gpt-5-codex 6199f28e9e feat: add streamable-http transport support 2025-10-10 22:56:32 +02:00
Claude4Ξlope d7e617e487 Fix linter issues and update integration test
- Remove unused imports (signal, yaml, os, socket, ConfigLoader)
- Remove unused variable assignments in argument parsers
- Update integration test to send initialize request first
- Fix test to match new server mode behavior

All unit tests pass, integration test needs initialize handshake.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 22:02:31 +02:00
Claude4Ξlope 6df97a9dcf Fix Claude Desktop timeout issue in server mode
The server was hanging on initialize requests because:
1. It was calling browser.initialize() at startup which tried to connect to upstream servers
2. It was using blocking stdin.read(4096) instead of line-based reading

Fixed by:
- Removing premature initialization in server mode (let it happen lazily)
- Switching to readline() for proper line-based JSON-RPC handling
- Adding proper error responses for malformed JSON

This resolves the 60-second timeout error when Claude Desktop tries to connect.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 21:49:32 +02:00
Claude4Ξlope 6025bb1256 Fix daemon start directory creation
- Added parents=True to mkdir call to create parent directories
- Fixes FileNotFoundError when starting daemon in background

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 16:45:21 +02:00
Claude4Ξlope 1bb1d05715 Replace debug output with proper logging framework
- Added comprehensive logging system with configurable levels
  - TRACE: Shows raw JSON-RPC I/O with server names
  - DEBUG: Detailed operational logging
  - INFO/WARNING/ERROR: Standard logging levels

- New command line options:
  - --log-level: Set logging level (TRACE/DEBUG/INFO/WARNING/ERROR)
  - --log-file: Log to file instead of stderr

- Improved error handling and timeouts:
  - Initial server discovery timeout reduced to 3 seconds
  - Servers marked as offline for 30 minutes after failure
  - Better error messages with server context

- All debug output now goes to stderr, keeping stdout clean for JSON

Example usage:
  mcp-browser --log-level TRACE tools-list  # See raw I/O
  mcp-browser --debug --log-file debug.log  # Debug to file

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 16:24:24 +02:00
Claude4Ξlope 4a7d3cdc7f Add daemon mode and improve debug output
- Implement socket-based daemon mode using Unix domain sockets
  - Allows multiple clients to connect to a single MCP Browser instance
  - Supports automatic daemon detection and connection
  - Added --daemon-start, --daemon-stop, --daemon-status commands

- Improve debug output handling
  - All debug output now goes to stderr instead of stdout
  - Added debug_print() and debug_json() utilities
  - Debug messages show before and after server communication

- Fix builtin-only mode handling
  - Properly route tools/list and tools/call when no external server
  - Apply sparse mode filtering to builtin server tools

- Improve JSON-RPC command output
  - Raw jsonrpc command now outputs proper JSON for piping
  - Other commands use human-friendly formatting

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 15:56:05 +02:00
Claude4Ξlope 33ff1c33f5 Add default config system with ~/.claude/mcp-browser/ directory
- Created comprehensive default configuration system
- Config directory at ~/.claude/mcp-browser/ with:
  - config.yaml with example MCP server configurations
  - onboarding.md with detailed usage documentation
  - patterns/ directory for system and custom patterns
  - logs/ and backups/ directories
- Added checksum system to detect unmodified config files
- Enhanced CLI with new options:
  - --list-servers to show available servers
  - --show-config to display configuration
  - --test to test server connections
  - --debug for detailed output
- Improved help text with examples and better documentation
- Updated ConfigLoader to use new config directory structure
- First run automatically creates default configuration

The system now provides a user-friendly experience similar to
claude-composer with proper configuration management.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 14:37:19 +02:00
Claude4Ξlope 27d0f610ba Fix MCP Browser test suite and add Brave Search integration
- Fixed NameError by adding missing Union import in filter.py
- Reorganized all tests into tests/ subdirectory
- Fixed recursive initialization issue in proxy.py
- Added proper test infrastructure with Makefile and setup.py test target
- Created test_config.yaml for test configurations
- Added Brave Search integration test (requires BRAVE_API_KEY)
- Fixed async test fixtures to use @pytest_asyncio.fixture
- Updated tests to handle 3 sparse tools (including onboarding)
- Fixed JSONPath queries to avoid unsupported filter syntax
- Created unit tests that don't require server initialization
- Added test_simple.py for basic functionality tests

All unit tests now pass successfully. Integration tests that require
full server setup are marked as skipped.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 14:11:13 +02:00
Claude4Ξlope 1ef99927b3 Add pip infrastructure and AI development tools
- Enhanced setup.py with AI-friendly documentation generation
- Added 'python setup.py aidocs' command for:
  - Automatic API documentation via pydoc
  - ctags generation for code navigation
  - Project structure documentation
  - API summary generation
- Added CLAUDE.md explaining AI-only development
- Created __main__.py for command-line interface
- Added test_claude_connection.py to verify claude-code integration
- Added py.typed for type checking support

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 12:33:43 +02:00