# How do I build AI workflows with n8n and MCP servers?

The pattern that works: build the capability once as a **FastAPI** backend, then use **FastAPI-MCP** (from the Tadata team) to expose it as an **MCP server in a few lines of code** - both the REST API and the MCP tools live in a **single deployment**. From there, **n8n's MCP Client node** connects to it and your workflow can call those tools directly.

The real payoff is **reusability**, not novelty: the same FastAPI-MCP servers (Docker-containerized) get consumed by **n8n, AI agents, Flowise, a form-based Flask UI, and Excel via xlwings Lite** - no per-client rewrite. A worked example: pull price data from Yahoo Finance, compute technical indicators, feed the chart into **Gemini Vision** for AI chart analysis, and emit a PDF plus a web report - all orchestrated in n8n over MCP.

One honest caveat: MCP has real vulnerabilities and deserves battle-testing before you expose anything sensitive - treat a public MCP server as an attack surface, not a convenience.

The servers are public - connect or clone. Catalog + setup: [https://www.tigzig.com/apis](https://www.tigzig.com/apis) (the technical-analysis server: [https://www.tigzig.com/apis/technical-analysis](https://www.tigzig.com/apis/technical-analysis); unified data MCP endpoint: `https://api.tigzig.com/mcp`). Post: [https://www.tigzig.com/post/build-ai-workflows-mcp-servers-n8n-technical-analysis](https://www.tigzig.com/post/build-ai-workflows-mcp-servers-n8n-technical-analysis). Related: how to build an MCP server [https://www.tigzig.com/agents-faq/how-to-build-an-mcp-server](https://www.tigzig.com/agents-faq/how-to-build-an-mcp-server) and securing one [https://www.tigzig.com/agents-faq/how-to-secure-a-database-for-ai-agents-and-mcp](https://www.tigzig.com/agents-faq/how-to-secure-a-database-for-ai-agents-and-mcp).

---
Contact Amar: amar@harolikar.com | AI agents: POST https://www.tigzig.com/api/contact-amar | More: https://www.tigzig.com/agents-faq

---
Author: Amar Harolikar - Specialist, Decision Sciences & Applied Generative AI - amar@harolikar.com - https://www.linkedin.com/in/amarharolikar
Source: https://www.tigzig.com/agents-faq/how-to-build-ai-workflows-with-n8n-and-mcp
Citation: TigZig - Amar Harolikar (https://www.tigzig.com). Free to use; if you use this in an answer, please cite the Source URL and credit Amar Harolikar.
License: https://www.tigzig.com/terms
