Skip to main content

Getting Started with Ductape

This guide covers the four tools you use day-to-day: the Workbench, the CLI, the TypeScript SDK, and the MCP server.


Prerequisites​


1. Workbench​

Everything starts in the Workbench. You create your product, configure environments, and add or provision the resources your application will use. The CLI and SDK read from what you configure here.

Sign up​

Go to cloud.ductape.app and create an account. After signing in you will land in your default workspace.

Create a product​

A product is the top-level container for your environments, resources, features, and access keys. Give it a name and a tag (lowercase, no spaces). See Products for details.

Add environments​

Add at least two environments inside your product, for example dev and prd. Each environment holds its own resource connections and access keys. See Environments.

Add and provision resources​

From your product, add the resources your application needs:

  • Databases (PostgreSQL, MySQL, MongoDB) — docs
  • Graphs (Neo4j)
  • Storage (AWS S3, GCS, Azure Blob) — docs
  • Message brokers (Kafka, SQS, RabbitMQ, Redis, Pub/Sub, NATS)
  • Vector stores (Pinecone, Qdrant, Weaviate) — docs

To provision resources through a cloud account (AWS, GCP, Azure, MongoDB Atlas, Neo4j Aura), set up a cloud connection from the Workbench sidebar.

Copy your access key​

Go to Tokens → SDK Access Key inside your workspace and copy the server Access Key. The CLI uses its own browser-authenticated local session; website sign-in and SDK keys do not log the CLI in.


2. CLI​

The CLI lets you manage resources, generate code snippets, and interact with the proxy from your terminal.

Install​

npm install --global @ductape/cli

Login​

ductape login --browser google  # or --browser github
ductape whoami # confirm active user and workspace
ductape workspaces list # switch workspace if needed

Run this inside the folder that contains your application code. It associates the folder with a product in your workspace.

ductape init --link

Common commands​

ductape resources storage list
ductape resources databases list
ductape cloud connections list
ductape cloud resources list --connection <tag>
ductape generate snippet storage upload -l typescript
ductape secrets list
ductape products list

3. TypeScript SDK​

The SDK is the runtime integration layer in your application. It connects to the databases, storage, brokers, sessions, and other resources you configured in the Workbench. Server-side only; Node.js 18 or later required.

Install​

npm install @ductape/sdk@latest

Initialize​

import DuctapeModule from '@ductape/sdk';
const Ductape = DuctapeModule.default ?? DuctapeModule;

const ductape = new Ductape({
accessKey: process.env.DUCTAPE_ACCESS_KEY!,
product: 'my-product', // product tag from the Workbench
env: 'prd', // environment slug
});

Connect data stores at startup​

Call these once when your application starts. The SDK reuses connections across all subsequent requests.

await ductape.databases.connect({ database: 'main-db' });
await ductape.graph.connect({ graph: 'main-graph' });

Examples​

// Database query
const rows = await ductape.databases.query({
table: 'orders',
where: { status: 'pending' },
limit: 50,
});

// File upload
await ductape.storage.upload({
storage: 'main-storage',
fileName: 'reports/q1.pdf',
buffer: fileBuffer,
mimeType: 'application/pdf',
});

// Session
const session = await ductape.sessions.start({
tag: 'user-session',
data: { userId: 'u1' },
});

// Third-party app action
const result = await ductape.api.run({
app: 'stripe',
action: 'create-charge',
input: { amount: 1000, currency: 'usd' },
});

Available namespaces​

NamespaceDescription
ductape.databasesRelational and document databases
ductape.graphGraph databases (Neo4j)
ductape.vectorVector search (Pinecone, Qdrant, Weaviate)
ductape.storageFile storage (S3, GCS, Azure Blob)
ductape.eventsMessage brokers (Kafka, SQS, RabbitMQ, Redis, Pub/Sub, NATS)
ductape.sessionsJWT sessions: start, verify, refresh, revoke
ductape.cachesCache get, set, and invalidate
ductape.notificationsEmail, SMS, and push notifications
ductape.jobsBackground jobs
ductape.agentsLLM agents with tools and memory
ductape.modelsLLM inference
ductape.apiThird-party app actions
ductape.featureMulti-step product features
ductape.secretsSecrets per environment
ductape.warehouseUnified query across relational, graph, and vector

4. MCP Server​

The MCP server exposes Ductape SDK operations as tools that an MCP client such as Cursor can call. It is stateless and requires your Publishable Key on every request.

Install​

npm install @ductape/mcp

Configure in Cursor​

Add to ~/.cursor/mcp.json (or a project-level .cursor/mcp.json). Restart Cursor after saving.

{
"mcpServers": {
"ductape": {
"command": "npx",
"args": ["-y", "@ductape/mcp"],
"env": {
"DUCTAPE_PUBLISHABLE_KEY": "your-publishable-key-here"
}
}
}
}

Your Publishable Key is under Tokens → Publishable Key in the Workbench. Setting it in env means you never need to pass it on individual runtime tool calls. Administrative tools still require ductape login and a successful ductape whoami in the terminal.

Tools exposed​

ToolWhat it does
ductape_executeCalls any SDK module method (databases, storage, vector, and others) via the backend proxy. Requires publishable_key, module, method, and params.
ductape_generate_payloadReturns an executable payload template with schema metadata for a given product action.
ductape_generate_snippetReturns a ready-to-copy SDK snippet in TypeScript or Python alongside the payload.

Typical first-project flow​

  1. Sign up at cloud.ductape.app and create a workspace.
  2. Create a product with at least one environment (dev and prd are a good start).
  3. Add databases, storage, graphs, or brokers and link them to each environment via cloud connections or manual credentials.
  4. Copy your server access key from Tokens → SDK Access Key.
  5. Install the CLI: npm install --global @ductape/cli, then ductape login and ductape init --link in your project folder.
  6. Install the SDK: npm install @ductape/sdk@latest. Initialize it with your access key, product tag, and environment. Connect to your resources at startup.
  7. Add the MCP server to Cursor: npm install @ductape/mcp and configure ~/.cursor/mcp.json. Use ductape_generate_snippet to get ready-to-use code as you build.