Skip to content

feat: add Tavily search as configurable MCP tool in miroflow-agent#145

Open
ParakhJaggi wants to merge 2 commits intoMiroMindAI:mainfrom
tavily-ai:feat/tavily-migration/apps-miroflow-agent-tavily
Open

feat: add Tavily search as configurable MCP tool in miroflow-agent#145
ParakhJaggi wants to merge 2 commits intoMiroMindAI:mainfrom
tavily-ai:feat/tavily-migration/apps-miroflow-agent-tavily

Conversation

@ParakhJaggi
Copy link

Summary

  • Wired tool-tavily-search as a new configurable MCP tool in the miroflow-agent app, alongside the existing tool-google-search and tool-sogou-search providers (additive/parallel strategy).
  • Added TAVILY_API_KEY environment variable loading in settings.py.
  • Added tool-tavily-search block in create_mcp_server_parameters() that spawns miroflow_tools.mcp_servers.tavily_mcp_server with the Tavily API key.
  • Added has_tavily_api_key flag to get_env_info() for observability parity.
  • Documented TAVILY_API_KEY in .env.example.
  • Added tool-tavily-search as a commented-out alternative in default.yaml.

Files changed

  • apps/miroflow-agent/src/config/settings.py — env var, MCP server block, env info entry
  • apps/miroflow-agent/.env.example — new TAVILY_API_KEY entry
  • apps/miroflow-agent/conf/agent/default.yaml — commented-out tool option

Dependency changes

  • None (no new Python packages added; the MCP server module miroflow_tools.mcp_servers.tavily_mcp_server is expected to be provided by a separate unit)

Environment variable changes

  • Added TAVILY_API_KEY reference in settings.py and .env.example

Notes for reviewers

  • This is an additive change — all existing search providers (tool-google-search, tool-sogou-search) and their dependencies are fully preserved.
  • The referenced MCP server module miroflow_tools.mcp_servers.tavily_mcp_server does not yet exist in the repo. It needs to be created separately before tool-tavily-search can be activated.
  • To enable Tavily search, set TAVILY_API_KEY in your .env file and replace tool-google-search with tool-tavily-search in your agent YAML config.

🤖 Generated with Claude Code

Automated Review

  • Passed after 2 attempt(s)
  • Final review: The Tavily migration is correct and complete. The new tavily_mcp_server.py follows the existing FastMCP pattern from serper_mcp_server.py, uses the correct TavilyClient SDK API, and is properly wired into settings.py with env-var validation, dependency declaration in pyproject.toml, and documentation in .env.example. No regressions — all changes are additive. Two minor quality issues exist (client instantiated per-call, no retry logic) but neither blocks functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant