Stack.ai MCP connector
OAuth 2.1/DCR AIAutomationDeveloper 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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].