Route MCP tool calls through an intelligent gateway with Claude AI

Go to Workflow
0 views
Built by Oneclick AI Squad Oneclick AI Squad
Created on June 05, 2026

Description

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

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

Setup Steps

Import workflow into n8n
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
Populate the Tool Registry sheet with your API endpoints
Set your MCP gateway API key in the validation node
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.

Nodes Used (6)

AI Agent
@n8n/n8n-nodes-langchain.agent
Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic
Code
n8n-nodes-base.code
Google Sheets
n8n-nodes-base.googleSheets
HTTP Request
n8n-nodes-base.httpRequest
Send Email
n8n-nodes-base.emailSend