Skip to main content
A StackOne connector is a YAML configuration that turns a third-party API into a set of agent-ready actions. By the end of this guide, you’ll have a working connector pushed to your StackOne project — built with the StackOne CLI, an AI assistant, and the connectors-template. You’ll set up your environment, generate an API key, build and test authentication against a provider, then add and validate your first actions.
Custom connectors require Enterprise access — contact support@stackone.com to enable.

Setup

1

Generate a StackOne API key

  1. In the StackOne dashboard, go to Project Settings → API keys.
  2. Click Create API key.
  3. Ensure the following Scopes are enabled (some are not selected by default):
    • connectors:read — download connectors from registry
    • connectors:write — push and delete connectors
    • credentials:read — use linked account credentials with stackone run
  4. Copy the key (format: v1.{region}.xxxxx) and store it somewhere safe — you won’t be able to view it again.
See API Keys for more on scopes.
2

Open a Terminal & Install the StackOne CLI

You’ll run all StackOne CLI commands from a terminal window.
  1. Press Cmd + Space to open Spotlight, type Terminal, and press Enter.
  2. Confirm Node.js 18+ is installed by running:
    If the command isn’t found or the version is below 18, install Node.js from nodejs.org.
  3. Confirm Git is installed:
    If the command isn’t found, install the Xcode Command Line Tools (xcode-select --install) or download Git from git-scm.com.
  4. Install the StackOne CLI globally via npm:
    The -g flag installs the CLI globally so the stackone command is available in any directory.
  5. Verify the install:
3

Set Up Your Working Directory

Create your own private GitHub repository by following the connectors-template setup guide.Clone your new private repo into a my-connector folder and install dependencies:
All subsequent CLI commands run from inside my-connector.
The template ships with agent skills (including /on-boarding), CI/CD workflows, a pre-configured CLAUDE.md, and example connector structures.
You can build connectors without the template, but you’ll skip the bundled agent skills (like /on-boarding), pre-configured CLAUDE.md, and CI/CD workflows.
Create an empty folder, move into it, then pull an existing connector as a reference:
4

Configure the StackOne CLI

From inside your working directory, authenticate the StackOne CLI:
This configures MCP tools for AI-assisted development and stores your access token.
5

Create a StackOne CLI Profile

Create a named profile so deployment commands like stackone push can authenticate without you pasting your API key each time:
You’ll be prompted for a profile label and an API key — paste the StackOne API key you generated in Step 1. Create separate profiles for staging vs. production and reference them later with --profile <profile-label>.

Starting the Build

The connectors-template includes agent skills and a pre-configured CLAUDE.md, so the recommended path is to open your project in an AI coding assistant and start a chat from inside the my-connector directory.
From inside my-connector, launch Claude Code:
The template’s CLAUDE.md and bundled skills (including /on-boarding) load automatically.
Once the chat is open, run the onboarding skill:
This launches an interactive flow that guides you through:
  1. Connector type selection — Agentic Actions (raw provider data) vs Schema-Based (unified output)
  2. Provider details — Name, API version, and pulling any existing connector
  3. Authentication setup — Configuring and validating auth before building actions
  4. Schema definition (for unified connectors) — Defining your target output format
  5. Endpoint research — Discovering available API endpoints and their trade-offs
  6. Action building — Implementing and testing each action
The onboarding flow ensures you complete each step before moving to the next, reducing errors and rework.
Experienced users: Skip onboarding and tell the agent directly what you need:
  • “Build a connector for [Provider] with employee management actions”
  • “Start unified build for [Provider]” (for schema-based connectors)

Build Workflow

The recommended workflow ensures you validate each step before moving to the next:

Step 1: Fork or Pull Existing Connector

Always start by checking if a connector already exists:
If the pull succeeds, you have a foundation to build on. If it fails, create a new connector structure:

Step 2: Build Authentication

Do not proceed until authentication works. All other work depends on valid auth.
Configure authentication in the main connector file:
Create a simple test action (e.g., list_users) and verify auth works before building more actions.

Step 3: Connect Account & Test Auth

Most providers offer sandbox or developer accounts for testing — check the provider’s developer portal for signup, then generate API credentials (API key, OAuth app, etc.). Note any rate limits or restrictions on sandbox accounts. Create test files for local development:
Keep sandbox credentials separate from production. Store them in a credentials.json file that’s gitignored.
Test authentication:

Step 4: Build Actions

With auth working, build out your actions. See Common Step Functions for patterns.

Step 5: Iterate

  1. Validate syntax: stackone validate connectors/provider/
  2. Test actions: stackone run --debug ...
  3. Fix issues and repeat

Common Step Functions

request - Single HTTP Request

Use for GET single resource, POST create, PUT update operations:

paginated_request - Cursor Pagination

Use for list endpoints with cursor-based pagination:
Verify paths with --debug before assuming response structure. Common mistake: using dataKey: users when the actual path is dataKey: data.users.

map_fields - Transform Data (Unified Connectors)

Transform provider response to your schema:
Always use version: "2" for map_fields and typecast steps.

typecast - Apply Type Conversions

Apply after map_fields to ensure correct types:

Cursor Pagination with Dynamic Page Size

For list actions where callers can specify page size, use the dual-condition pattern:

StackOne CLI Examples

For the full command list, see the CLI Reference. The examples below cover the patterns you’ll use most while iterating on your first connector.

Validate as you build

Watch mode re-runs validation on every save:

Test actions with parameters

--params accepts a structured JSON object with these top-level keys, each corresponding to an input’s in: location in the action’s YAML:
  • pathin: path inputs (URL path parameters)
  • queryParamsin: query inputs
  • headerin: headers inputs (note: singular header)
  • bodyin: body inputs
Place every value under the key that matches the input’s in: location:

Push when ready

<profile-label> is the name you set when running stackone init (see the setup section). Create separate profiles for staging vs. production and swap the label as needed.

Debugging

Enable Debug Mode

Add --debug to any stackone run command to surface:
  • The raw HTTP request sent to the provider (URL, method, headers, body)
  • The full response body before any mapping is applied
  • The inputs and outputs of each step in the connector
  • The resolved values of any JSONPath or JEXL expressions

Debug Empty or Incorrect Results

When mapping produces unexpected results:
1

Test raw response first

Temporarily modify your result block to return raw data:
2

Verify response structure

Run with --debug and examine the actual paths:
3

Add fields incrementally

Start with one field in map_fields, verify it works, then add more.
4

Check expression context

For inline fields in map_fields, expressions reference fields directly ($.email), not with step prefix ($.get_employees.email).

Common Issues


Error Mapping

Map provider-specific errors to meaningful responses using error handlers:
For unified connectors, map provider error codes to standard error responses:

Manual Testing Methods

Beyond stackone run, you have additional testing options:

Action Request Tester (Dashboard)

The StackOne dashboard includes an Action Request Tester for testing deployed connectors:
  1. Navigate to your project in the dashboard
  2. Select a linked account
  3. Choose an action and provide parameters
  4. Execute and view results
This tests the deployed connector version against real credentials.

RPC Calls via API

Test actions programmatically using the StackOne API:
Actions only appear in the Request Tester if they’re enabled in your connector profile. If you don’t see an action, edit your connector profile and enable it.

MCP Testing (AI Agents)

If using Claude Code or similar, test actions conversationally:
The AI agent will execute the action and validate results.

Unified Connector Checklist

For schema-based connectors, verify:
  • Target schema documented before building
  • All required fields identified
  • Field types specified (string, number, enum, datetime_string)
  • Enum values defined with mappings
  • fieldConfigs map all schema fields
  • targetFieldKey uses YOUR schema names (not provider names)
  • Nested paths verified against actual response
  • Enum mappings handle all provider values + default case
  • cursor.enabled: true for list actions
  • dataKey path verified with --debug
  • nextKey path verified with --debug
  • result.next returns cursor for next page
  • Tested: first page, next page, last page, empty results
  • map_fields step with version: "2"
  • typecast step with version: "2"
  • Correct dataSource references between steps

Optimizing Agent Performance

The connector building agent starts with baseline capabilities. As you build connectors, you can improve agent performance by creating custom skills that encode your specific use cases and schemas.

The Optimization Workflow

Why Create Custom Skills?

Creating Schema Skills

After building your first few connectors, extract your schema into a reusable skill:
Example schema skill:
Once created, the agent automatically uses this schema for future unified builds — no questions needed.
1

Build 2-3 Connectors

Use the baseline agent to build your first connectors. Note patterns in your requirements.
2

Create Schema Skills

Extract your target schemas into .claude/skills/schemas/. Include field definitions, types, and enum mappings.
3

Document Use-Case Patterns

Create skills that describe your specific integration patterns, endpoint preferences, or data transformation rules.
4

Iterate and Refine

As you build more connectors, update skills based on edge cases and lessons learned.
Skills are stored in .claude/skills/ in the connectors-template repository. The agent reads these automatically when relevant to the current task.

Next Steps

Connector Structure

Detailed YAML structure reference

Expression Language

JSONPath, JEXL, and string interpolation

YAML Reference

Complete property documentation

CI/CD Setup

Automated deployment with GitHub Actions