Skip to content

feat: add optional You.com search integration - #218

Open
mouse-value-add wants to merge 1 commit into
kerlenton:mainfrom
mouse-value-add:feat/youcom-search-integration
Open

feat: add optional You.com search integration#218
mouse-value-add wants to merge 1 commit into
kerlenton:mainfrom
mouse-value-add:feat/youcom-search-integration

Conversation

@mouse-value-add

Copy link
Copy Markdown

Summary

This PR adds optional You.com web search integration to mcpsnoop, enhancing the MCP debugging workflow by allowing developers to search for error explanations, protocol specifications, and tool documentation directly from the TUI.

What Changed

Core Integration:

  • Added internal/youcom/search.go - You.com API client with search functionality
  • Modified TUI to support web search via keyboard shortcut w and commands :search / :web
  • Added search overlay display consistent with other mcpsnoop panels
  • Graceful error handling when API key is missing or requests fail

Configuration Options:

  • Environment variable: YOUCOM_API_KEY
  • Command flag: --youcom-api-key
  • Config file: youcom-api-key = "key" in .mcpsnoop.toml

User Interface:

  • Press w to open search prompt
  • Commands :search <query> and :web <query>
  • Results display in scrollable overlay
  • Added to help text and hint bar
  • Async search with 10s timeout (doesn't block TUI)

Why This is Useful

When debugging MCP sessions, developers often need to:

  • Research error codes and messages they encounter
  • Look up MCP protocol specifications
  • Find tool documentation or examples
  • Understand server capabilities and behaviors

This integration eliminates context switching - you can search directly from the debugging session without leaving mcpsnoop.

Implementation Notes

  • Completely Optional: mcpsnoop works normally without any API key
  • Clean Architecture: Search client is dependency-injected, easily testable
  • Consistent UX: Follows existing mcpsnoop overlay patterns (capabilities, summary, etc.)
  • Privacy-Conscious: Only search queries sent to You.com, no session data
  • Error Recovery: Clear messaging when search unavailable or fails

Validation

  • All existing functionality preserved (when no API key provided)
  • Search works with valid API key (manual testing with You.com API)
  • Configuration loading works (env var, flag, config file precedence)
  • Help text updated appropriately
  • Code follows existing mcpsnoop patterns and conventions

Resolves: Optional web search capability for enhanced MCP debugging workflow

Tracking: youdotcom-oss/integration-tracking#178

- Add optional web search capability via You.com API
- Keyboard shortcut 'w' opens search prompt
- Command support: :search <query> and :web <query>
- Environment variable (YOUCOM_API_KEY) and flag support
- Configuration file support in .mcpsnoop.toml
- Search results display in overlay consistent with other TUI panels
- Graceful fallback when API key not configured
- Async search with 10s timeout, doesn't block TUI
- Added help text and documentation

Enhances MCP debugging workflow by allowing developers to research
errors, specifications, and tool documentation directly from the TUI
without leaving their debugging session.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant