Skip to main content

Route MCP tool calls through an intelligent gateway with Claude AI

Workflow preview

Workflow preview
100%
Route MCP tool calls through an intelligent gateway with Claude AI preview
Open on n8n.io

1. Workflow Overview

This workflow transforms traditional REST APIs into structured, AI accessible MCP (Model Context Protocol) tools. It provides a unified gateway that allows Claude AI to safely, granularly, and audi...

Best for

  • DevOps automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.code, n8n-nodes-base.googlesheets, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatanthropic, n8n-nodes-base.if, n8n-nodes-base.httprequest

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Oneclick AI Squad.

Original n8n.io source

1.1 Workflow description

Title
Route MCP tool calls through an intelligent gateway with Claude AI
Workflow name
Route MCP tool calls through an intelligent gateway with Claude AI

This workflow transforms traditional REST APIs into structured, AI-accessible MCP (Model Context Protocol) tools. It provides a unified gateway that allows Claude AI to safely, granularly, and auditibly interact with any business system — CRM, ERP, databases, SaaS — through a single MCP-compliant interface.

How it works

  1. Receive MCP Tool Request - Webhook ingests tool call from AI agent or MCP client
  2. Validate & Authenticate - Verifies API key, checks JWT token, validates MCP schema
  3. Tool Registry Lookup - Resolves requested tool name to backend API config and permission scope
  4. Claude AI Intent Verification - Confirms tool call parameters are safe, well-formed, and within policy
  5. Rate Limit & Quota Check - Enforces per-client tool call limits before execution
  6. Execute Backend API Call - Routes to the correct business system API with mapped parameters
  7. Normalize & Enrich Response - Standardizes API response into MCP tool result schema
  8. Audit & Log - Writes immutable access log for compliance and observability
  9. Return MCP Tool Result - Delivers structured response back to the AI agent

Setup Steps

  1. Import workflow into n8n
  2. Configure credentials:
  • Anthropic API - Claude AI for intent verification and parameter validation
  • Google Sheets - Tool registry, rate limit tracking, and audit log
  • SMTP - Alert notifications for policy violations
  1. Populate the Tool Registry sheet with your API endpoints
  2. Set your MCP gateway API key in the validation node
  3. Activate the workflow and point your MCP client to the webhook URL

Sample MCP Tool Call Payload

{
 "mcpVersion": "1.0",
 "clientId": "agent-crm-001",
 "apiKey": "mcp-key-xxxx",
 "toolName": "crm.get_customer",
 "parameters": {
 "customerId": "CUST-10042",
 "fields": ["name", "email", "tier"]
 },
 "requestId": "req-abc-123",
 "callerContext": "User asked: show me customer details"
}

Supported Tool Categories

  • CRM Tools — get_customer, update_contact, list_deals
  • ERP Tools — get_inventory, create_order, update_stock
  • Database Tools — query_records, insert_record, update_record
  • Communication Tools — send_email, post_slack, create_ticket
  • Analytics Tools — run_report, fetch_metrics, export_data

Features

  • MCP-compliant schema — works with any MCP-compatible AI agent
  • Granular permission scopes — read/write/admin per tool per client
  • Claude AI intent guard — blocks malformed or policy-violating calls
  • Rate limiting — per-client quota enforcement
  • Full audit trail — every tool call logged for SOC2 / ISO 27001

Explore More Automation: Contact us to design AI-powered lead nurturing, content engagement, and multi-platform reply workflows tailored to your growth strategy.

1.2 Logical Blocks

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.

2. Block-by-Block Analysis

Block 1 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Receive MCP Tool Request

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 7 - Validate Auth and MCP Schema

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Lookup Tool in Registry

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 9 - Resolve Tool Config and Permissions

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Claude AI Intent and Safety Verification

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.6

Block 11 - Claude AI Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatAnthropic - lmChatAnthropic
Config choices
Version 1

Block 12 - Parse Intent Verification Result

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Check Rate Limit and Quota

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 14 - Enforce Rate Limit and Build Execution Context

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Dry Run or Live Execution?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 16 - Execute Backend API Call

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 17 - Build Dry Run Response

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - Normalize Backend Response to MCP Schema

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 19 - Send Security Alert on High Risk Calls

Type / Role
n8n-nodes-base.emailSend - emailSend
Config choices
Version 2.1

Block 20 - Write Immutable Audit Log

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 21 - Update Rate Limit Usage Log

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 22 - Build Final MCP Tool Result

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 23 - Return MCP Tool Result to Caller

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1

Block 24 - Wait For Result

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

3. Summary Table

Workflow Route MCP tool calls through an intelligent gateway with Claude AI
Complexity advanced
Nodes 24
Categories DevOps, AI RAG
Author Oneclick AI Squad
Published 22 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13590/13590.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

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.

Frequently asked questions

What does Route MCP tool calls through an intelligent gateway with Claude AI do?

This workflow transforms traditional REST APIs into structured, AI accessible MCP (Model Context Protocol) tools. It provides a unified gateway that allows Claude AI to safely, granularly, and audi...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

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 DevOps, AI RAG use case.