MCP server with AI agent as a tool context reducer
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Github AI Agent (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (8)
- MCP Server Trigger
@n8n/n8n-nodes-langchain.mcpTrigger - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - MCP Client Tool
@n8n/n8n-nodes-langchain.mcpClientTool - AI Agent
@n8n/n8n-nodes-langchain.agent - Edit Fields (Set)
n8n-nodes-base.set
What it does
Overview Transform your LLM into a powerful GitHub automation specialist with this n8n workflow template. In a world where multiple MCP servers can overwhelm LLMs with context, this streamlined solution provides a dedicated GitHub Agent that handles all GitHub API operations through a single, specialized tool. When you need GitHub operations like creating repositories, managing issues, or handling pull requests, your LLM can make one simple call to the GitHub Agent. This agent specializes exclusively in GitHub MCP server operations, offloading all contextual complexity and providing clean, efficient GitHub automation. ✨ Features - Single MCP Server Trigger - One tool and one parameter to handle all GitHub API interactions - Specialized GitHub Agent - Dedicated AI agent with direct GitHub MCP Server connection - Self-Executing Workflow - "When Executed by Another Workflow" trigger enables seamless workflow chaining - Scalable Architecture - Ready to integrate with unlimited GitHub tools and operations - Context Optimization - Reduces LLM token usage by delegating GitHub complexity to a specialized agent - Flexible Request Processing - Handles any GitHub operation through natural language requests 🎯 Use Cases - Repository Management - Create, clone, and manage repositories programmatically - Issue Tracking - Automate issue creation, updates, and management workflows - Pull Request Automation - Streamline code review and merge processes - GitHub Actions Integration - Trigger and monitor CI/CD workflows - Team Collaboration - Automate notifications and team management tasks - Documentation Updates - Automatically update README files and documentation 🏗️ Workflow Architecture Node Breakdown: 1. MCP Server Trigger - Receives requests with GitHub operation parameters 2. Set GitHub Username - Configures GitHub user context for API calls 3. OpenAI Chat Model - Powers the intelligent GitHub agent with contextual understanding 4. Simple Memory - Maintains conversation context and operation history 5. GitHub AI Agent - Specialized Tools Agent with direct GitHub MCP Server access MCP Server Trigger → Set GitHub Username → GitHub AI Agent ↓ OpenAI Chat Model ← Simple Memory ← GitHub API Operations 📋 Requirements Essential Prerequisites: - ✅ OpenAI API Key - For AI Agent and Chat Model functionality - ✅ GitHub Username Configuration - Edit the "Set GitHub Username" node with your GitHub username for API calls - ✅ n8n Version - Compatible with n8n 2024+ releases - ✅ MCP Server Setup - Existing GitHub MCP server configuration Recommended Setup: - GitHub Personal Access Token with appropriate permissions - Basic understanding of n8n workflow configuration - Familiarity with GitHub API operations 🚀 Setup Instructions Step 1: Import and Configure 1. Import the workflow template into your n8n instance 2. Navigate to the Set GitHub Username node 3. Replace the placeholder with your actual GitHub username Step 2: API Keys Setup 1. Configure your OpenAI API key in the Chat Model node 2. Ensure your GitHub credentials are properly configured in n8n 3. Test the connection to verify API access Step 3: MCP Server Integration 1. Connect your existing GitHub MCP server to the workflow 2. Verify the MCP Server Trigger is properly configured 3. Test with a simple GitHub operation (e.g., "List my repositories") Step 4: Deploy and Test 1. Activate the workflow in your n8n instance 2. Test with various GitHub operations to ensure functionality 3. Monitor execution logs for any configuration issues 🔧 Customization Options Agent Behavior - Modify the Chat Model prompt to adjust agent personality and response style - Configure memory settings to control conversation context retention - Adjust timeout settings for long-running GitHub operations GitHub Operations - Extend supported operations by adding new GitHub API endpoints - Configure repository filters to limit scope of operations - Set up notification preferences for important GitHub events Integration Po