Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Stack.ai MCP connector

OAuth 2.1/DCRAIAutomationDeveloper Tools

Connect to Stack AI MCP. Build, run, and manage AI workflow projects, search knowledge bases, list integration providers, and inspect execution traces...

Stack.ai MCP connector

  1. Terminal window
    npm install @scalekit-sdk/node

    Full SDK reference: Node.js | Python

  2. Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. quickstart.ts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENV_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'stackaimcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Stack.ai MCP:', link)
    process.stdout.write('Press Enter after authorizing...')
    await new Promise(r => process.stdin.once('data', r))
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'stackaimcp_list_connections',
    toolInput: {},
    })
    console.log(result)

Connect this agent connector to let your agent:

  • Whoami records — Return the authenticated user’s profile, active organization, plan, and paginated list of all organizations
  • Workflow validate — Run pre-flight validation checks on a project draft and return paginated errors and warnings with stable codes and fix hints
  • Org switch — Set the active organization for the current session, routing all subsequent org-scoped tools to that org
  • Search kb — Search a Stack AI knowledge base and return the top matching chunks ranked by relevance
  • Run project — Execute a published Stack AI project by supplying a key-value inputs map that matches the flow’s declared input schema
  • List triggers, providers actions, projects — List the cron, polling, and webhook triggers configured on a specific project

Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.

stackaimcp_create_project#Create a new Stack AI project from a natural-language description by generating its nodes and edges with AI assistance.1 param

Create a new Stack AI project from a natural-language description by generating its nodes and edges with AI assistance.

NameTypeRequiredDescription
descriptionstringrequiredHigh-level description of what the project should do.
stackaimcp_edit_project#Edit an existing Stack AI project using a natural-language description or a structured patch of node and edge operations.4 params

Edit an existing Stack AI project using a natural-language description or a structured patch of node and edge operations.

NameTypeRequiredDescription
flow_idstringrequiredNo description.
descriptionstringoptionalNo description.
direct_patchstringoptionalNo description.
publishstringoptionalNo description.
stackaimcp_get_project#Retrieve a project's node and edge graph as a paginated, self-contained subgraph with connectivity preserved across pages.4 params

Retrieve a project's node and edge graph as a paginated, self-contained subgraph with connectivity preserved across pages.

NameTypeRequiredDescription
flow_idstringrequiredProject ID (from ``list_projects``).
cursorstringoptionalOpaque pagination token from a prior response's ``pagination.next_cursor``. Pass ``null`` to fetch the first page.
include_flow_jsonstringoptionalWhen true, also include the raw upstream ``flow`` object verbatim. Off by default to avoid duplicating graph data. Refused with a structured ``flow_too_large`` error (carrying ``next_action`` and node/edge counts) when ``nodes + edges`` exceeds the server's ``max_inline_flow_elements`` cap; in that case page through the flow using ``next_cursor`` instead.
page_sizestringoptionalMaximum nodes per page. Defaults to 50, clamped to [1, 200].
stackaimcp_get_project_corrections#Re-validate a project draft and return paginated correction entries for params cleaned up during creation or editing.3 params

Re-validate a project draft and return paginated correction entries for params cleaned up during creation or editing.

NameTypeRequiredDescription
flow_idstringrequiredProject (flow) ID to re-validate.
cursorstringoptionalOpaque pagination cursor from a prior response.
page_sizestringoptionalMaximum corrections per page (clamped to 200).
stackaimcp_get_run#Fetch the per-node execution trace for a project run, filtered by severity and optionally expanded with inputs and outputs.7 params

Fetch the per-node execution trace for a project run, filtered by severity and optionally expanded with inputs and outputs.

NameTypeRequiredDescription
project_idstringrequiredProject (flow) ID the run belongs to.
run_idstringrequiredRun ID to fetch.
cursorstringoptionalOpaque pagination cursor from a previous response's ``pagination.next_cursor``.
include_outputstringoptionalWhen true, include every node-in-page's inputs/outputs. Use ``node_ids`` for finer grain.
node_idsstringoptionalOptional list of node ids whose ``inputs`` / ``outputs`` should be populated. Up to 50 ids per call. Ids not in the current page are surfaced in the summary.
page_sizestringoptionalMaximum nodes per page (clamped to 200).
severity_filterstringoptionalWhich nodes to return: ``"failed_or_slow"`` (default), ``"failed"``, ``"slow"``, or ``"all"``.
stackaimcp_list_connections#List the OAuth and API-key connections the authenticated user has configured in Stack AI.3 params

List the OAuth and API-key connections the authenticated user has configured in Stack AI.

NameTypeRequiredDescription
cursorstringoptionalOpaque pagination cursor from a previous response's ``pagination.next_cursor``.
page_sizestringoptionalMaximum connections per page (clamped to 200).
provider_idstringoptionalOptional filter, e.g. ``"gmail"``, ``"slack"``. Pass null for all.
stackaimcp_list_knowledge_bases#List knowledge bases available to the authenticated user, with optional verbose metadata.3 params

List knowledge bases available to the authenticated user, with optional verbose metadata.

NameTypeRequiredDescription
cursorstringoptionalPagination cursor from a previous response.
page_sizestringoptionalMaximum results per page (clamped to 200).
verbosestringoptionalWhen true, return the full KB metadata for each row instead of the compact projection.
stackaimcp_list_projects#Fetch a paginated list of projects accessible to the authenticated account.3 params

Fetch a paginated list of projects accessible to the authenticated account.

NameTypeRequiredDescription
cursorstringoptionalOpaque pagination cursor from a previous response. Pass ``null`` to fetch the first page.
owned_onlystringoptionalWhen true, only return projects the user owns.
page_sizestringoptionalMaximum number of projects per page. Defaults to 50, clamped to [1, 200].
stackaimcp_list_providers_actions#List available Stack AI integration providers and their actions, with optional full schemas for specific action IDs.2 params

List available Stack AI integration providers and their actions, with optional full schemas for specific action IDs.

NameTypeRequiredDescription
actionsstringoptionaloptional list of action / trigger ids to drill into; only valid with a single ``provider_id`` string.
provider_idstringoptional``null``, a single id (e.g. ``"gmail"``), or a list (e.g. ``["gmail", "slack"]``).
stackaimcp_list_triggers#List the cron, polling, and webhook triggers configured on a specific project.2 params

List the cron, polling, and webhook triggers configured on a specific project.

NameTypeRequiredDescription
project_idstringrequiredProject (flow) ID to inspect.
verbosestringoptionalWhen true, return the full trigger metadata instead of the compact projection.
stackaimcp_run_project#Execute a published Stack AI project by supplying a key-value inputs map that matches the flow's declared input schema.4 params

Execute a published Stack AI project by supplying a key-value inputs map that matches the flow's declared input schema.

NameTypeRequiredDescription
flow_idstringrequiredNo description.
inputsobjectrequiredNo description.
verbosestringoptionalNo description.
versionstringoptionalNo description.
stackaimcp_search_kb#Search a Stack AI knowledge base and return the top matching chunks ranked by relevance.5 params

Search a Stack AI knowledge base and return the top matching chunks ranked by relevance.

NameTypeRequiredDescription
kb_idstringrequiredKnowledge base ID to search.
querystringrequiredNatural-language search query (must be non-empty).
expand_chunk_idsstringoptionalOptional list of ``chunk_id`` values whose full ``text`` should be populated in the response. Other chunks still come back with preview only. Up to 20 ids per call; ids that don't match any chunk in the current result set are surfaced in the summary.
query_strategystringoptionalRetrieval mode: ``"semantic"`` (embedding similarity, default), ``"keyword"`` (BM25), or ``"hybrid"`` (rerank of both).
top_kstringoptionalMaximum chunks to return. Defaults to 5, clamped to [1, 20] (the upstream cap).
stackaimcp_switch_org#Set the active organization for the current session, routing all subsequent org-scoped tools to that org.1 param

Set the active organization for the current session, routing all subsequent org-scoped tools to that org.

NameTypeRequiredDescription
org_idstringrequiredThe Stack AI organization id to activate. Find valid ids by calling ``whoami``.
stackaimcp_validate_workflow#Run pre-flight validation checks on a project draft and return paginated errors and warnings with stable codes and fix hints.4 params

Run pre-flight validation checks on a project draft and return paginated errors and warnings with stable codes and fix hints.

NameTypeRequiredDescription
flow_idstringrequiredProject (flow) ID to validate. The validator always reads the draft, not the published version.
cursorstringoptionalOpaque pagination cursor from a prior response.
page_sizestringoptionalMaximum findings per page (clamped to 200).
severity_filterstringoptional``"all"`` (default) returns errors AND warnings; ``"errors_only"`` drops warnings so an LLM checking "can I run this?" doesn't have to wade through nice-to-haves.
stackaimcp_whoami#Return the authenticated user's profile, active organization, plan, and paginated list of all organizations.2 params

Return the authenticated user's profile, active organization, plan, and paginated list of all organizations.

NameTypeRequiredDescription
cursorstringoptionalOpaque pagination cursor from a previous response's ``pagination.next_cursor``. Pass null to start.
page_sizestringoptionalMaximum orgs per page. Defaults to 50, clamped to [1, 200].