FabricFabricHarness
Building

Connector catalog

Sandbox, MCP, knowledge-base, data, Azure, and Databricks connector options.

Fabric Harness connectors are intentionally modular. The core SDK owns the stable agent/session/tool/sandbox contracts; provider packages and project-local adapters own provider SDKs, credentials, lifecycle, and live compatibility.

There are three connector forms:

FormUse whenExample
Package helperFabric already ships a dependency-free helper or REST client.daytonaSandbox, databricksSqlTool, foundryAgentTool
Recipe via fh addProvider SDK shape or project conventions need local code.fh add daytona --print
Direct SDK primitiveNo connector file is needed.fumadocsSource, connectMcpServer

Quickstart for any provider

If no pre-built adapter exists, use fh add <url> --category <kind> and pipe to your coding agent:

fh add https://e2b.dev --category sandbox | claude
fh add https://api.notion.com --category data | cursor-agent
fh add https://docs.linear.app --category mcp | codex

The CLI emits the canonical category spec (sandbox.md, mcp.md, or data.md shipped with @fabric-harness/sdk) along with a "build me a connector for this URL" header. The agent reads the provider's docs, follows the spec literally, and writes a single TypeScript file at ./connectors/<provider>.ts. No PR to fabric-harness needed — the file lives in your project.

When fabric-harness ships a first-party recipe for the provider, prefer the named slug:

fh add daytona | claude
fh add linear-mcp | claude

Auto-PR mode

fh add daytona --pr opens a draft GitHub PR with a stub connector file (committed to a connector/<provider> branch) and the canonical spec embedded in the PR body. You (or your coding agent) push commits that flesh out the stub. Requires the gh CLI and a configured remote.

fh add daytona --pr
fh add https://your-provider.example.com --category sandbox --pr --pr-branch=connector/your-provider

Validating connectors

fh doctor --connectors walks connectors/ and .fabricharness/connectors/ and flags files that are missing exports, lack the @fabric-harness/* import, or are otherwise malformed:

fh doctor --connectors
# ✓ connector:daytona.ts: ./connectors/daytona.ts
# ✗ connector:broken.ts: missing @fabric-harness/* import
# ✓ connectors: 1/2 healthy

Install packages

Core connector helpers:

npm install @fabric-harness/sdk @fabric-harness/connectors

Cloud-specific packages:

npm install @fabric-harness/azure
npm install @fabric-harness/databricks

Provider SDKs stay in your app, not in @fabric-harness/sdk:

npm install @daytona/sdk
npm install @e2b/code-interpreter

Sandbox connectors

Sandbox connectors adapt remote execution providers to Fabric's SandboxEnv contract: file operations, shell execution, cwd scoping, cleanup, and optional snapshots.

ConnectorPackage helperRecipeLive gateNotes
DaytonadaytonaSandbox() / daytonaSandboxFactory() from @fabric-harness/connectorsfh add daytona --printFABRIC_DAYTONA_TEST=1Structural wrapper around an initialized Daytona sandbox.
E2Be2bSandbox()fh add e2b --printFABRIC_E2B_TEST=1Structural wrapper around E2B command/file APIs.
ModalmodalSandbox()fh add modal --printFABRIC_MODAL_TEST=1Modal deployments vary; live test accepts a user-provided adapter module.
Vercel SandboxUse remoteSandbox() recipefh add vercel --printfutureProject-local adapter until SDK compatibility is certified.
Custom providerremoteSandbox() / remoteSandboxEnv()fh add <url> --category sandbox --printprovider-specificKeep provider SDK and credentials in project code.

Daytona example

import { Daytona } from '@daytona/sdk';
import { daytonaSandbox } from '@fabric-harness/connectors';

const client = new Daytona({ apiKey: process.env.DAYTONA_API_KEY });
const remote = await client.create();

const fabric = await init({
  sandbox: daytonaSandbox(remote, { cleanup: true }),
});

Validate any sandbox adapter

import { validateSandboxAdapter } from '@fabric-harness/connectors';

await validateSandboxAdapter(env);

The validator runs a smoke contract: mkdir, writeFile, readFile, exec, and rm.

See Sandbox connectors for the full adapter guide.

MCP connectors

MCP connectors expose remote tools to agents. Use connectMcpServer(name, options) from @fabric-harness/sdk (or /strict if you prefer).

ConnectorRecipePattern
GitHub MCPfh add github-mcp --printHosted MCP with bearer token.
Mintlify MCPfh add mintlify-mcp --printStreamable HTTP MCP endpoint for a docs site when available.
Linear MCPfh add linear-mcp --printHosted MCP with API token.
Slack MCPfh add slack-mcp --printHosted or self-hosted bridge.
Custom MCPfh add <url> --category mcp --printReads provider docs and generates a connector.

Example:

import { connectMcpServer } from '@fabric-harness/sdk';

const github = await connectMcpServer('github', {
  url: 'https://mcp.github.com/mcp',
  transport: 'streamable-http',
  headers: { Authorization: `Bearer ${process.env.GITHUB_TOKEN}` },
});

try {
  const session = await (await init({ tools: github.tools })).session();
  await session.prompt('Find open issues tagged bug.');
} finally {
  await github.close();
}

Knowledge-base connectors

Knowledge-base connectors mount docs/content into a sandbox as files. Agents then use read, grep, and glob instead of a retrieval pipeline.

SourceHelperRecipeNotes
Local Markdown/MDXlocalDirectorySource()noneGeneral local docs.
FumadocsfumadocsSource()fh add fumadocs --printStrips frontmatter by default.
Mintlify local checkoutmintlifySource()noneIncludes docs.json nav.
HTTP docshttpFilesystemSource()noneFetch URLs into files.
Cloudflare R2r2FilesystemSource() from @fabric-harness/sdk/cloudflaredocs exampleWorker/R2 deployments.
S3-compatibles3FilesystemSource() from @fabric-harness/connectorsnoneStructural object-store client.
Azure BlobazureBlobFilesystemSource() from @fabric-harness/connectorsnoneStructural blob client.

Example:

import { agent, fumadocsSource, withFilesystemSources } from '@fabric-harness/sdk';

export default agent<{ question: string }>({
  run: async ({ init, input }) => {
  const sandbox = withFilesystemSources('virtual', [{
    mountAt: '/workspace/docs',
    source: fumadocsSource('./apps/docs/content/docs'),
  }]);
  const session = await (await init({ sandbox })).session();
  return await session.prompt(`Answer using /workspace/docs: ${input.question}`);
},
});

Data connectors

Data connectors should expose narrow tools, not raw credentials or arbitrary network access.

ConnectorPackage/helperRecipeNotes
Postgresproject-local ToolDef/commandfh add postgres --printPrefer read-only credentials and row/time limits.
Notionhosted MCP or REST commandfh add notion --printHosted MCP when available; REST adapter otherwise.
Databricks SQLdatabricksSqlTool()see DatabricksSQL Warehouse statements.
Databricks JobsdatabricksRunJobTool()see DatabricksTrigger existing jobs.
Unity CatalogunityCatalogTablesTool()see DatabricksRead catalog/table metadata.
MLflowdatabricksMlflowLogMetricTool() / databricksMlflowLogParamTool()see DatabricksWrite run telemetry.

Azure and Foundry connectors

Azure helpers live in @fabric-harness/azure:

HelperPurpose
AzureOpenAIModelProviderAzure OpenAI model calls.
createAzureBlobArtifactStore()Blob-backed artifacts.
createAzureKeyVaultSecretResolver()Runtime secret resolution.
FoundryAgentServiceClientFoundry Agent Service REST client.
foundryAgentTool()Invoke a Foundry agent from a Fabric agent.
foundryAgentLifecycleTools()Create/update/delete Foundry agents as gated tools.
azureContainerAppsJobTool()Start existing Container Apps Jobs.
azureAksRunCommandTool()AKS Run Command.
azureContainerInstanceExecTool()ACI exec-session creation.

See Azure and Foundry Hosted Agents.

fh add

List recipes:

fh add

Print one:

fh add daytona --print
fh add github-mcp --print
fh add postgres --print

Generate from provider docs:

fh add https://example.com/provider/docs --category sandbox --print

Categories:

CategoryOutput shape
sandboxSandboxEnv / SandboxFactory
mcpconnectMcpServer() wrapper
kbFilesystemSource
dataToolDef, Command, or MCP wrapper

Live tests

Connector live tests are opt-in. See Live tests for the full matrix.

FABRIC_DAYTONA_TEST=1 DAYTONA_API_KEY=... pnpm --filter @fabric-harness/connectors test
FABRIC_AZURE_FOUNDRY_TEST=1 AZURE_FOUNDRY_PROJECT_ENDPOINT=... AZURE_TOKEN=... pnpm --filter @fabric-harness/azure test
FABRIC_DATABRICKS_TEST=1 DATABRICKS_HOST=... DATABRICKS_TOKEN=... pnpm --filter @fabric-harness/databricks test

Security checklist

  • Keep provider credentials in env, managed identity, Key Vault, or secret manager.
  • Never put tokens in prompts, payloads, session history, artifacts, or build manifests.
  • Prefer read-only credentials for data tools.
  • Treat sandbox execution, cloud control-plane actions, and data writes as execute/write effects.
  • Gate destructive actions with Fabric policy approvals.
  • Add unit tests with fake provider objects and live tests behind env gates.