Stack.ai MCP connector
OAuth 2.1/DCRAIAutomationDeveloper ToolsConnect 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
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. 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> -
Authorize and make your first call
Section titled “Authorize and make your first call”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.actionsconst connector = 'stackaimcp'const identifier = 'user_123'// Generate an authorization link for the userconst { 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 callconst result = await actions.executeTool({connector,identifier,toolName: 'stackaimcp_list_connections',toolInput: {},})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "stackaimcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Stack.ai MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="stackaimcp_list_connections",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”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
Tool list
Section titled “Tool list”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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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].