Block 1 - Google Gemini Chat Model
- Type / Role
- @n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
- Config choices
- Version 1
This workflow is provided as-is. Please review and test before using in production.
This n8n workflow template uses community nodes and is only compatible with the self hosted version of n8n. This workflow demonstrates how to build and expose a sophisticated n8n AI Agent as a sing...
@n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-mcp.mcpclienttool, @n8n/n8n-nodes-langchain.mcptrigger, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.executeworkflowtrigger, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.toolworkflow, n8n-nodes-base.stickynote
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Jez.
Original n8n.io sourceThis n8n workflow template uses community nodes and is only compatible with the self-hosted version of n8n.
This workflow demonstrates how to build and expose a sophisticated n8n AI Agent as a single, callable tool using the Multi-Agent Collaboration Protocol (MCP). It allows external clients or other AI systems to easily query software library documentation via Context7, without needing to manage the underlying tool orchestration or complex conversational logic.
Core Idea: Instead of building complex agentic loops on the client-side (e.g., in Python, a VS Code extension, or another AI development environment), this workflow offloads the entire agent's reasoning and tool-use process to n8n. The client simply sends a natural language query (like "How do I use Flexbox in Tailwind CSS?") to an SSE endpoint, and the n8n agent handles the rest.
Key Features & How It Works:
Context7 MCP Server Trigger node to create an SSE endpoint. This makes the agent accessible to any MCP-compatible client.Tool Workflow node (named call_context7_ai_agent in this example) is connected to the MCP Server Trigger. This node defines the single "tool" that external clients will see and call.call_context7_ai_agent tool invokes a separate sub-workflow which contains the actual AI logic.Context7 Workflow Start node to receive the user's query.Context7 AI Agent node (using Google Gemini in this example) is the brain, equipped with:Simple Memory to retain context for each execution (using {{ $execution.id }} as the session key).context7-resolve-library-id: To convert library names (e.g., 'Next.js') into Context7-specific IDs.context7-get-library-docs: To fetch documentation using the resolved ID, with options for specific topics and token limits.resolve-library-id and get-library-docs tools based on the user's query, handling the multi-step process internally.Benefits of This Approach:
Use Cases:
Setup:
Path in the Context7 MCP Server Trigger node should be unique and secure.This workflow is a great example of how n8n can serve as a powerful backend for building and deploying modular AI agents.
I've made a video to try and explain this a bit too https://www.youtube.com/watch?v=dudvmyp7Pyg
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Documentation Lookup AI Agent using Context7 and Gemini |
|---|---|
| Complexity | advanced |
| Nodes | 18 |
| Categories | Internal Wiki, AI RAG |
| Author | Jez |
| Published | 01 Jun 2025 |
Use the JSON export at /data/workflows/4547/4547.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
This n8n workflow template uses community nodes and is only compatible with the self hosted version of n8n. This workflow demonstrates how to build and expose a sophisticated n8n AI Agent as a sing...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Internal Wiki, AI RAG use case.