> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# n8n Automation

> Use StackOne MCP in n8n workflows with the MCP Client Tool node for automated operations.

## Overview

[n8n](https://n8n.io/) provides MCP support through its MCP Client Tool node for workflow automation.

## Setup

<Steps>
  <Step title="Get your MCP URL from the dashboard">
    1. Go to **Connectors** in the left nav and open the connector you want to use
    2. Click **Use Connector** in the top right
    3. On the **Use** tab, click **MCP Server** under "Use with Agent Client"
    4. Select a linked account from the dropdown
    5. Choose **HTTPS MCP** as the client
    6. Copy the generated URL — it looks like:
       ```
       https://api.stackone.com/mcp?token=<session_token>
       ```

    The token encodes your account identity. No separate API key or account ID header is needed.

    <Tip>
      The token expires after one year. Regenerate it at any time using the refresh button in the MCP tile.
    </Tip>
  </Step>

  <Step title="Add MCP Client Tool in n8n">
    <Frame>
      <img src="https://mintcdn.com/stackone-60/vkUSFuOEDLocaA_J/images/mcp/client_n8n_mcp_tool.png?fit=max&auto=format&n=vkUSFuOEDLocaA_J&q=85&s=423a2d1b1f8ddf41aa0b0e8fde355f52" alt="" width="782" height="826" data-path="images/mcp/client_n8n_mcp_tool.png" />
    </Frame>

    1. Create a new workflow
    2. Click **+** to add a node and search for "MCP Agent"
    3. Under tools, click **+** and search for **MCP Client Tool**
    4. Configure the node:
       * **URL**: Paste the URL from the previous step
       * **Authentication**: None
       * Select the tools you want from the **Tools to include** dropdown
  </Step>

  <Step title="Test the connection">
    Click **Execute Step** to verify the connection and see available tools.
  </Step>
</Steps>

***

## Advanced: Manual API Key Setup

If you prefer to authenticate with your API key and account ID directly instead of a dashboard-generated token:

1. Set the URL to `https://api.stackone.com/mcp?x-account-id=<ACCOUNT_ID>`
2. Set **Authentication** to **Header Auth** (create new credentials if needed):
   * Header name: `Authorization`
   * Value: `Basic <BASE64_STACKONE_API_KEY>` — base64-encode your API key followed by a colon (`your_api_key:`)

See [Authentication & Security](/mcp/auth-security) for details on obtaining your API key and account ID.

***

## Building Workflows

Once configured, use the MCP Client Tool node to execute StackOne actions on the linked account you specified.

## Next Steps

<CardGroup cols={2}>
  <Card title="Dashboard Setup" icon="desktop" href="/mcp/connect-from-dashboard">
    Generate MCP configs from any connector
  </Card>

  <Card title="Authentication Guide" icon="lock" href="/mcp/auth-security">
    Configure authentication and security
  </Card>
</CardGroup>

***

For detailed n8n setup instructions, see the [official n8n documentation](https://docs.n8n.io/).
