# Expose workflows as an MCP server for Claude and OpenAI agents: n8n workflow

> Started by someone opening a chat with it, and works across n8n data table. It puts OpenAI behind a retrieval step, so answers are drawn from documents you...

Source: https://millionrounds.com/workflow/expose-workflows-as-an-mcp-server-for-claude-and-openai-agen (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Setup and learning](https://millionrounds.com/workflows?category=Setup+and+learning#library)

# Expose workflows as an MCP server for Claude and OpenAI agents

Started by someone opening a chat with it, and works across n8n data table. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 36 steps, 3 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fexpose-workflows-as-an-mcp-server-for-claude-and-openai-agen)

**36 steps** Large: read it before trusting it with anything live

**3** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 3 Model 9 Logic 18 Service 6

The steps in the order they run, from what starts it.

- 1 **search_workflows** Tool Workflow *Model*
- 2 **add_workflow** Tool Workflow *Model*
- 3 **remove_workflow** Tool Workflow *Model*
- 4 **list_workflows** Tool Workflow *Model*
- 5 **execute_workflow** Tool Workflow *Model*
- 6 **When executed by MCP tool** Execute Workflow trigger *Starts it*
- 7 **When chat message received** Chat trigger *Starts it*
- 8 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 9 **Conversation memory** Memory Buffer Window *Model*
- 10 **n8n workflows MCP client** Mcp Client Tool *Model*
- 11 **n8n workflows MCP server** Mcp trigger *Starts it*
- 12 **Configuration** Set *Logic*
- 13 **Workflow runner agent** Agent *Model*
- 14 **Route by operation** Switch *Logic*
- 15 **Get MCP-tagged workflows** N8n *Service*
- 16 **Get MCP-tagged workflows for add** N8n *Service*
- 17 **Split workflow IDs** Set *Logic*
- 18 **Get available workflows** Data Table *Service*
- 19 **Check workflow is available** Data Table *Service*
- 20 **Format workflow profiles** Set *Logic*
- 21 **Keep only requested workflows** Filter *Logic*
- 22 **One item per workflow ID** Split Out *Logic*
- 23 **Return available pool** Set *Logic*
- 24 **Workflow available?** If *Logic*
- 25 **Return search results** Aggregate *Logic*
- 26 **Requested workflows found?** If *Logic*
- 27 **Remove from available pool** Data Table *Service*
- 28 **Prepare input parameters** Set *Logic*
- 29 **Report execute error** Set *Logic*
- 30 **Format workflow profiles for add** Set *Logic*
- 31 **Report add error** Set *Logic*
- 32 **Confirm workflows removed** Set *Logic*
- 33 **Run the selected workflow** Execute Workflow *Logic*
- 34 **Save to available pool** Data Table *Service*
- 35 **Return execution result** Aggregate *Logic*
- 36 **Confirm workflows added** Set *Logic*

## How it's built

- **Starts on:** Someone opening a chat with it
- **Steps:** 36, with 3 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** n8n data table
- **Model:** OpenAI
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone opening a chat with it.

Does it use AI?

Yes. It calls OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 36 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 36 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fexpose-workflows-as-an-mcp-server-for-claude-and-openai-agen)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[n8n data table](https://millionrounds.com/workflows?service=n8n+data+table#library)
