# AI agent for smart search via Brave and Gemini with MCP support in n8n
This automation template implements an AI agent on n8n that processes natural language queries and performs web or local searches via Brave Search. It uses the MCP protocol and SSE for external client communication, with Google Gemini deciding the search type. Ideal for integration into AI assistants, code editors, and systems requiring context-aware search.
## Who it´s for
- Developers integrating AI-powered search into their apps via MCP
- AI assistants needing accurate web and local search results
- Automation systems aiming to minimize context and token usage during search operations
## What the automation does
- Receives user queries via HTTP/SSE in natural language format
- Uses Google Gemini to determine whether to perform a web or local search
- Executes the query using Brave Search tools exposed via Smithery MCP
- Summarizes results into a concise response
- Maintains session-based memory for coherent follow-up interactions
## What´s included
- Ready-to-use n8n workflow
- Logic for routing queries and calling MCP tools
- Integrations with Google Gemini API, Brave Search, and Smithery MCP
- Basic setup and adaptation instructions
## Requirements for setup
- n8n instance with external API access
- Google Gemini API key
- Access to a Smithery MCP Server with Brave Search tools enabled
- Familiarity with LangChain and MCP concepts in n8n
## Benefits and outcomes
- Simplified integration of AI search into third-party applications
- Accurate distinction between local and web queries without user clarification
- Token savings through context minimization and pre-filtering
- Session memory support for consistent dialogue flow
- Compatibility with MCP ecosystems like Roo Code
## Important: template only
Important: you are purchasing a ready-made automation workflow template only. Rollout into your infrastructure, connecting specific accounts and services, 1:1 setup help, custom adjustments for non-standard stacks and any consulting support are provided as a separate paid service at an individual rate. To discuss custom work or 1:1 help, contact via chat
No feedback yet