Skip to main content

Scaffold a Connector

The metadata scaffold-connector command generates all the boilerplate files for a new connector: JSON Schema, test connection definition, Python source files, and a CONNECTOR_CONTEXT.md that any AI agent can use to implement the connector.

Prerequisites

Set up the development environment first:

Interactive Mode

Run the scaffold tool with no arguments to enter interactive mode:
The tool walks you through a series of prompts:

Non-Interactive Mode

Pass all options as flags for scripted or CI use:
Only --name and --service-type are required. All other flags have sensible defaults.

What Gets Generated

JSON Schema (Single Source of Truth)

This file drives code generation for Python Pydantic models, Java models, TypeScript types, and UI forms. The scaffold generates it with correct $ref patterns for auth, SSL, filters, and capability flags.

Test Connection Definition

Defines the steps for testing a connection (e.g., CheckAccess, GetDatabases). Step names must match the test_fn dictionary in connection.py.

Python Source Files

For SQLAlchemy database connectors, the scaffold generates concrete, nearly-complete templates:
For all other connector types (dashboard, pipeline, messaging, non-SQLAlchemy database, etc.), the scaffold generates skeleton files:
Each skeleton file contains a pointer to the reference connector and CONNECTOR_CONTEXT.md for implementation guidance.

CONNECTOR_CONTEXT.md

This is the key file for AI-assisted development. It contains:
  • Connector profile (name, type, capabilities, auth)
  • Source documentation you provided (API docs, SDK package, endpoints, notes)
  • Complete file list with what to implement in each
  • Reference connector path for copying patterns
  • Registration checklist (exact files and changes needed)
  • Validation checklist

Service Types

Examples

Database with SQLAlchemy

Dashboard with REST API

Pipeline with SDK

Next Steps

After scaffolding, follow the Build with AI guide to implement the connector using your preferred AI tool. Or continue manually with the existing guides:
  1. Define JSON Schema (already done by scaffold)
  2. Develop Ingestion Code
  3. Apply UI Changes