Aria: LangGraph Agent Skills + MCP for N8N Workflows
From the publisher’s feed, collected in the ZeroLabs newsroom.
Source: Author, generated with Google GeminiCombining progressive skill loading with MCP tool execution to build a practical N8N automation workflow agent.IntroductionIn a recent article, I introduced skill based agents in LangGraph and explained how progressive loading can replace large system prompts when building scalable agents.Read it here:Stop Stuffing Your System Prompt: Build Scalable Agent Skills in LangGraphThis project builds on that foundation. In the previous version, skills were a knowledge layer only. The agent could look up how n8n nodes work, which parameters to use, or what tends to fail, but it could not actually modify workflows. It was an advisor, not an operator.Aria changes that. It connects the same skill architecture to actual tool execution through MCP (Model Context Protocol), a standard for exposing tools to language models over HTTP. Now the agent loads domain guidance first, then calls MCP tools to create workflows, modify nodes, or add error handling patterns. Skills and tools come from the same n8n ecosystem, and the same author defines both the domain guidance and the execution surface.Aria (Automation & Reasoning Intelligent Agent) — Source: Image by the author.The full stack is open source:GitHub - pessini/aria: Skills-first LangGraph agent for building and operating n8n workflows via MCP tools, with reusable agent skill packs.This article focuses on how skill loading and tool execution coexist inside one controlled runtime.Skills + MCP in One LoopThat alignment (same author, same ecosystem) reduces translation gaps between what a skill describes and what a tool expects. It also means the agent does not need a separate mapping layer to connect guidance to execution.The runtime now combines four responsibilities:LangGraph → state machineAegra → serving and persistence layerSkills → progressive domain knowledgeModel Context Protocol → structured executionThe loop is compact:User request → agent node → skill load if required → MCP tool call if required → responseThe protocol enforces ordering:Identify relevant skillLoad full instructionsOptionally load a specific reference fileThen call MCP toolsSkills are not preloaded. Each skill pack follows a strict loading pattern: the agent first reads a lightweight catalog of capabilities, then loads the full instructions only if required by the task, and finally retrieves specific reference files only when additional detail is needed. Tool calls through MCP occur only after this sequence completes, inside the same LangGraph reasoning loop.The Skill PacksAria ships with seven skill packs, each covering a different part of the n8n domain. The skill packs and MCP tools are based on the work of @czlonkowski (n8n-skills, n8n-mcp).n8n-code-javascript: JavaScript code node expertise. Built-in functions, common patterns, error handling.n8n-code-python: Python code node expertise. Data access, standard library usage, error patterns.n8n-expression-syntax: The n8n expression language. Syntax reference, common mistakes, examples.n8n-mcp-tools-expert: MCP tools integration. Search, validation, and workflow operation guides.n8n-node-configuration: Node setup patterns. Operation patterns, dependency management.n8n-validation-expert: Error troubleshooting. Error catalog, false positive identification.n8n-workflow-patterns: Workflow architecture. Webhooks, scheduled tasks, HTTP APIs, AI agents, database operations.Each skill pack follows the same structure: a SKILL.md file with YAML frontmatter and markdown instructions, plus optional supporting reference files. Adding a new skill means creating a folder with a SKILL.md. The agent discovers it automatically on startup.The split matters for context management. When the user asks about expression syntax, the agent loads n8n-expression-syntax and nothing else. When they ask about retry patterns on HTTP nodes, it loads n8n-node-configuration. The context window stays focused on what the current task actually needs.A Walkthrough: Adding Error Handling to a WorkflowTo see how skills and MCP tools work together, here is what happens when a user asks: “Add retry and timeout patterns to the HTTP Request nodes in my workflow.”The agent starts with the skill catalog already in its system prompt. Just names and one-line descriptions. From the catalog, it identifies that n8n-node-configuration is relevant.It calls load_skill("n8n-node-configuration") and receives the full SKILL.md content: how HTTP Request nodes work, which settings control retries, what timeout values are reasonable, and what tends to break. It also gets a list of supporting reference files.If the task needs more detail (say, a specific retry backoff pattern) it can call read_skill_file("n8n-node-configuration", "resources/retry-patterns.md") to pull in just that file.Only after loading the relevant guidance does the agent call MCP tools to actually modify the workflow. It knows which parameters to set because the skill told it. It knows which nodes to target because it read the workflow structure through MCP first.Compare this to calling the MCP tools directly without loading skills. The model would have to guess parameter names, reasonable timeout values, and retry configuration from its training data. Sometimes it gets it right. Often it does not, especially for n8n-specific settings that are not well represented in general training corpora.The ordering (guidance first, execution second) is enforced by the system prompt, not by graph topology. The LangGraph graph itself is a simple ReAct loop. The agent decides what to do on each turn. The prompt tells it to load skills before calling tools, and in practice it follows that rule consistently.How MCP Connects to n8nThe MCP server runs as a Docker sidecar (n8n-mcp on port 4244). It exposes n8n's REST API as a set of MCP tools: creating a workflow, reading workflow JSON, updating nodes, executing a workflow.The agent connects to this sidecar using langchain-mcp-adapters over streamable HTTP. On startup, it fetches the list of available tools from the MCP server and registers them alongside the skill tools (load_skill and read_skill_file). From the LLM's perspective, skill tools and MCP tools look the same. They are all just tools it can call.The connection includes health checks and retry logic. If the MCP server is unavailable at startup, the agent degrades gracefully: it starts with an empty tool list and can still use skills as a knowledge layer, but it cannot execute workflow operations until the MCP server comes back.This separation (agent logic in one container, MCP tools in another, n8n in a third) keeps each piece independently replaceable. Swapping to a different MCP server or a different automation platform does not require changes to the agent graph or the skill system.Observability and ReliabilityExecution discipline only works if it is visible.In this project, skill loading and MCP execution are distinct runtime events. You can inspect:When a skill catalog is accessedWhen full instructions are loadedWhen a reference file is retrievedWhen an MCP tool is calledWhen a retry is triggeredWhat structured error summary was returnedSource: Image by the author.Because these phases are separated, debugging becomes mechanical instead of speculative. You can see whether a failure came from missing guidance, incorrect parameters, or an external API error.This makes it possible to:Inspect intermediate reasoningCompare successful and failed runsTrack parameter changes across retriesAnalyze tool usage patterns over timeFor automation workflows, this matters more than prompt quality. Once tools modify state, visibility into the execution path becomes part of system design.The runtime layer, Aegra, serves the LangGraph agent and adds structured tracing. It includes built-in integration with Langfuse, so each reasoning step, tool call, and retry can be captured as a trace.In a typical trace, you would see a timeline like: system prompt loaded (with skill catalog), user message received, load_skill("n8n-node-configuration") called, skill instructions returned, mcp_update_workflow called, tool response received, agent response generated. Each of these is a separate span in Langfuse.When something goes wrong, the trace shows exactly where. If the agent called an MCP tool with wrong parameters, you can check whether it loaded the right skill first. If it loaded the skill but still failed, the skill content itself might need updating. If the MCP tool returned an error, you can see the status code and retry attempts.Because skill loading is a tool call, it shows up in usage analytics alongside MCP tool calls. Over time this tells you which skills are actually used, which are loaded but ignored, and which tasks trigger the most retries. That data feeds back into improving the skill content.Run It LocallyAria runs locally with Docker. The repository includes the agent graph, skill packs, MCP integration, and environment configuration.Prerequisites:Docker and uvAn LLM provider key (OpenAI or Ollama)An n8n API keyClone the repository:git clone https://github.com/pessini/aria.gitcd ariaInstall and start the services:make backend-cli-installmake n8n-upcp backend/.env.example backend/.envEdit backend/.env and set:OPENAI_API_KEYN8N_API_KEYThen start Aegra:make backend-upStart the UI:cp ui/.env.example ui/.envmake ui-docker-upOnce all services are running, you can prompt the agent to:Create workflowsModify nodesAdd retry or timeout patternsReview existing workflow JSONSource: Image by the author.The full setup guide, environment options, and configuration details are in the repository README:GitHub - pessini/aria: Skills-first LangGraph agent for building and operating n8n workflows via MCP tools, with reusable agent skill packs.This article focuses on the architecture. The repository shows the complete implementation.ConclusionThis project is a specific implementation of a general pattern: load domain guidance before executing tools. Skills tell the agent how things work in n8n. MCP tools let it act on that knowledge. The ordering is enforced in the system prompt, and every step is traceable through Langfuse.The practical benefit is predictability. When the agent loads n8n-node-configuration before modifying an HTTP Request node, it uses the right parameters. When it loads n8n-validation-expert before diagnosing an error, it checks known false positives first. The domain knowledge is explicit, versioned, and inspectable, not baked into a system prompt that grows with every new feature.The full implementation is open source. The repo includes the agent graph, all seven skill packs, MCP integration, and Docker configuration for running everything locally.Aria: LangGraph Agent Skills + MCP for N8N Workflows was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.