Build apps

Connect your coding tool

Give your coding agent scoped access to your Diakrin apps over MCP.

Deployment
BYOC and self-hosted

Diakrin’s console and its MCP connection share the same organization and app permissions. Your coding agent works only within the access granted to your identity, and every call is checked again on the server.

How a coding agent connectsYour coding tool keeps a personal Diakrin connection token in its local secret environment. Each MCP call goes to Diakrin, which checks your current role and app access. The agent reaches apps you own or that are shared with you, and is blocked from other organizations.YOUR COMPUTERCoding toolDIAKRIN_MCP_TOKENlocal secret, never in chat or gitMCP callDIAKRINChecks every callyour current roleyour app accessyour organizationYour appsShared with youOther org's appsActs as you — never more.
One personal connection reaches every app you can access. It follows changes to your access immediately and cannot reach another organization.

Works with your coding tool

Begin with the guided brief

Open your app's page from Apps. It shows your app as it takes shape: a first look, the steps to your private preview, and Open your app once the preview is ready. If your coding agent stopped before it finished, choose Copy the prompt and paste it there. The prompt includes the exact app, sample-data guidance and required approvals.

The brief appears only when your current app access permits building. Viewing access does not grant building permission. If your tool needs a connection, select Connect your coding agent and follow the one-time settings below.

Connect on a self-hosted installation Self-hosted only

With the Diakrin plugin that IT built for your installation, your AI tool is already pointed at it: the first time your agent uses Diakrin, your browser asks you to Allow it. Without the plugin, add your installation's MCP address (your Diakrin address followed by /mcp) in your tool:

sh
claude mcp add --transport http diakrin https://diakrin.example.com/mcp      # Claude Code
codex mcp add diakrin --url https://diakrin.example.com/mcp && codex mcp login diakrin   # Codex

Claude Code and Codex sign in through your browser. For OpenCode, add the same address to opencode.json as a remote MCP server whose Authorization header reads Bearer {env:DIAKRIN_MCP_TOKEN}. OpenCode does not sign in through the browser: create that connection token in the console under Settings → AI assistants: open Connecting a script or a tool without sign-in? and select Create connection token, and put it in OpenCode's local secret environment as DIAKRIN_MCP_TOKEN. Keep it out of chat, project files and source control. The token acts as you and does not expire; revoke it in Settings → AI assistants when you no longer need it.

On installations whose apps are private without sign-in, your first app is the private synthetic workspace: a fixed screen with example data only, never real company records. Its code belongs to the template, so your agent saves it and gets you its private Preview rather than designing screens. Its state shows on the app page in the console.

Create your connection BYOC only

You need one connection, not one per app. It acts as you: it reaches every app you can access, apps shared with you later and apps you create through it.

  1. Sign in to the console and select the correct organization.
  2. Open Settings → AI assistants, open Connecting a script or a tool without sign-in? and select Create connection token.
  3. Copy the token into the coding tool’s local secret environment as DIAKRIN_MCP_TOKEN. Keep it out of chat, project files and source control.
  4. Copy the exact MCP configuration shown by the console into your tool’s settings. Use the endpoint it supplies for your environment.
  5. Connect from your tool and confirm that it lists the apps you have access to.

The console displays Codex configuration in this form. Replace the example endpoint with the console-supplied value; the example is not a connection test.

toml
[mcp_servers.diakrin]
url = "https://api.diakrin.com/mcp"
bearer_token_env_var = "DIAKRIN_MCP_TOKEN"

For OpenCode, add the same endpoint to opencode.json as a remote MCP server. OpenCode substitutes {env:DIAKRIN_MCP_TOKEN} from its environment, so the token never appears in the file. Claude Code and Codex (and the Diakrin plugin for Claude Code, Cursor and Codex) sign in through your browser instead, so they need no connection token.

json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "diakrin": {
      "type": "remote",
      "url": "https://api.diakrin.com/mcp",
      "enabled": true,
      "headers": { "Authorization": "Bearer {env:DIAKRIN_MCP_TOKEN}" },
      "oauth": false
    }
  }
}

What the connection can and cannot do

It canIt cannot
Reach every app you can access, including apps shared with you laterDo anything your current role and app access do not allow
Create apps when your company lets you create themReach another organization
Request builds, previews and data access for reviewApprove its own requests or delete apps

Every call is checked against your current role and app access, so changes to your access apply immediately.

Start with an app

Ask your tool to select the exact Diakrin app ID, read its requirements, inspect available capabilities and identify missing prerequisites. For example: “Connect to the Team request tracker app and explain its approved capabilities before building.”

Verify the agent’s changes in the console and reload the app. A configured URL or token alone does not establish a working client connection.

For app-specific business questions, the agent uses app.intent.start, app.intent.read and app.intent.answer. These sessions are bound to the selected app and your identity, and cannot be read through another app. The MCP tool reference lists every tool by task.

Other tools and plugins

To work from a terminal, or to give your agent a command-line tool, see Install and use the Diakrin CLI.

Other MCP-capable tools need support for the server’s Streamable HTTP transport and secure bearer-token configuration. Use the same console-supplied endpoint and a secret store or environment variable supported by the tool.

Native plugin installation and interactive OAuth linking depend on the tool and the deployed Diakrin configuration. If your tool cannot configure the current bearer connection, ask your onboarding contact for the supported setup; do not paste a company SSO session token into an MCP configuration.

See Troubleshooting and help if your tool reports revoked access or cannot find an app.

When the app is ready to ship

Saving source, building, previewing and promoting a release are covered in Preview, approve and deploy. To decide who can open the finished app, see Choose who can open an app.

Next stepInstall and use the Diakrin CLI →