Skip to main content

Overview

n8n provides MCP support through its MCP Client Tool node for workflow automation.

Prerequisites

  • A StackOne project you are a member of.
  • A connector profile in the project for each provider the client should reach, with the actions you want exposed enabled.
  • (Optional) A linked account for each provider. Accounts can also be linked during the consent flow.

Setup

1

Add MCP Client Tool in n8n

  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. Set URL to https://mcp.stackone.com/mcp
  5. Set the transport to HTTP Streamable. StackOne does not serve SSE, so an SSE endpoint will not connect
2

Authorize

Set Authentication to OAuth2 and complete the flow in the browser. n8n stores the result as a reusable credential.Sign in, pick the project and the linked accounts the connector should reach, then Authorize.
If your n8n version doesn’t offer OAuth2 on this node, use a session token URL instead, see below.
3

Test the connection

Click Execute Step to verify the connection and see available tools, then pick what the workflow needs from Tools to include.
An OAuth grant belongs to the person who approved it, and n8n workflows usually run unattended long after that. A session token URL is often the better fit for a scheduled workflow, since it carries its own credential and doesn’t depend on one person’s grant.
A session token URL carries its own credential, so it covers the cases OAuth can’t: a shared server, a scheduled job, or anywhere nobody is present to approve a consent screen.Generate one from Connectors, open a connector, then Use in Agent. Pick a linked account, set the expiry (one year by default), and copy the URL:
One URL covers one linked account, and anyone holding it has that access until it expires, so treat it like a password. See Choosing a connection method for the comparison with OAuth.There is no consent screen to set Advanced Tool Search on, so add the tool-mode query parameter instead:
In the MCP Client Tool node, paste the token URL and set Authentication to None. One node then covers one linked account.
To authenticate with your API key and account ID directly:
  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-encoding your API key followed by a colon (your_api_key:)
See Authentication & 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 accounts you granted. For detailed setup instructions, see n8n’s MCP Client Tool documentation.

Optimize and secure

With your agent connected, use StackOne’s platform features to optimize performance and secure every call.

Advanced Tool Search

Reduce context and save tokens.

Deep Query

Search synced records for a fraction of the tokens.

Defender

Block prompt injections before they reach your agent.