Skip to content

Local AI development

Connect a local AI coding agent to a running d6e instance and develop/test Plugins and workspace assets — no special deploy step until you are ready to ship.

The core idea: everything the hosted AI agent can do is available as a public HTTP API / MCP. Your laptop gets the same ~96 d6e_* tools the built-in chat uses.

flowchart LR
  agent["Local AI agent<br/>Cursor / Claude Code / Codex"]
  inst["d6e instance<br/>MCP :8081/mcp → Rust /api/v1/* → PostgreSQL"]

  agent -->|"MCP"| inst
  agent -->|"REST"| inst
Text version (ASCII)
┌────────────────────┐ ┌────────────────────────────────────┐
│ Local AI agent │ MCP │ d6e instance │
│ (Cursor / Claude │───────▶│ MCP :8081/mcp → Rust /api/v1/* │
│ Code / Codex) │ REST │ → PostgreSQL │
└────────────────────┘───────▶└────────────────────────────────────┘

This page is a summary. Full steps, differences, and troubleshooting live in the source guide:

Canonical: local-ai-development.md

Before asking an agent to design, answer questions, or implement Plugins / Docker STFs / custom frontends, install the skills. When unsure, install everything.

Terminal window
npx skills add d6e-ai/d6e-plugin-skills --skill '*' -y
npx skills add d6e-ai/d6e-docker-stf-skills --skill '*' -y
npx skills add d6e-ai/d6e-custom-frontend-skills --skill '*' -y

See Installing Agent Skills for details.

  1. Log into the console (${D6E_BASE_URL})
  2. Avatar → API keys (/{locale}/user/api-keys)
  3. Create a key and copy the d6e_… value (shown once)

Smoke test:

Terminal window
curl -s ${D6E_BASE_URL}/api/v1/workspaces \
-H "Authorization: Bearer ${D6E_API_KEY}"

API keys are tied to your user account and inherit workspace membership. Add X-Workspace-ID for workspace-scoped endpoints.

The instance exposes MCP over HTTP (default port 8081, path /mcp).

Cursor.cursor/mcp.json:

{
"mcpServers": {
"d6e": {
"url": "http://<instance-host>:8081/mcp",
"headers": { "Authorization": "Bearer d6e_YOUR_API_KEY" }
}
}
}

After connecting, you can ask the agent to:

  • “List tables in the current workspace”
  • “Run this SQL and summarize the result”
  • “Instant-run this STF”

See MCP tools for the full catalog.

What you want to test Where it runs How
Workspace SQL Remote (real DB) POST .../sql or d6e_sql
JS STF Remote (QuickJS) POST .../stfs/instant-run or d6e_instant_run_stf
Docker STF logic Local docker run stdin/stdout JSON; point api_url at the live instance for integration
SaaS calls Remote POST .../saas-proxy or d6e_call_external_api
Workflows Remote POST .../workflows/{id}/execute or d6e_execute_workflow