Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Stack.ai MCP connector

OAuth 2.1/DCR AIAutomationDeveloper 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.

Name Type Required Description
description string required High-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.

Name Type Required Description
flow_id string required No description.
description string optional No description.
direct_patch string optional No description.
publish string optional No 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.

Name Type Required Description
flow_id string required Project ID (from ``list_projects``).
cursor string optional Opaque pagination token from a prior response's ``pagination.next_cursor``. Pass ``null`` to fetch the first page.
include_flow_json string optional When 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_size string optional Maximum 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.

Name Type Required Description
flow_id string required Project (flow) ID to re-validate.
cursor string optional Opaque pagination cursor from a prior response.
page_size string optional Maximum 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.

Name Type Required Description
project_id string required Project (flow) ID the run belongs to.
run_id string required Run ID to fetch.
cursor string optional Opaque pagination cursor from a previous response's ``pagination.next_cursor``.
include_output string optional When true, include every node-in-page's inputs/outputs. Use ``node_ids`` for finer grain.
node_ids string optional Optional 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_size string optional Maximum nodes per page (clamped to 200).
severity_filter string optional Which 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.

Name Type Required Description
cursor string optional Opaque pagination cursor from a previous response's ``pagination.next_cursor``.
page_size string optional Maximum connections per page (clamped to 200).
provider_id string optional Optional 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.

Name Type Required Description
cursor string optional Pagination cursor from a previous response.
page_size string optional Maximum results per page (clamped to 200).
verbose string optional When 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.

Name Type Required Description
cursor string optional Opaque pagination cursor from a previous response. Pass ``null`` to fetch the first page.
owned_only string optional When true, only return projects the user owns.
page_size string optional Maximum 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.

Name Type Required Description
actions string optional optional list of action / trigger ids to drill into; only valid with a single ``provider_id`` string.
provider_id string optional ``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.

Name Type Required Description
project_id string required Project (flow) ID to inspect.
verbose string optional When 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.

Name Type Required Description
flow_id string required No description.
inputs object required No description.
verbose string optional No description.
version string optional No 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.

Name Type Required Description
kb_id string required Knowledge base ID to search.
query string required Natural-language search query (must be non-empty).
expand_chunk_ids string optional Optional 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_strategy string optional Retrieval mode: ``"semantic"`` (embedding similarity, default), ``"keyword"`` (BM25), or ``"hybrid"`` (rerank of both).
top_k string optional Maximum 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.

Name Type Required Description
org_id string required The 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.

Name Type Required Description
flow_id string required Project (flow) ID to validate. The validator always reads the draft, not the published version.
cursor string optional Opaque pagination cursor from a prior response.
page_size string optional Maximum findings per page (clamped to 200).
severity_filter string optional ``"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.

Name Type Required Description
cursor string optional Opaque pagination cursor from a previous response's ``pagination.next_cursor``. Pass null to start.
page_size string optional Maximum orgs per page. Defaults to 50, clamped to [1, 200].