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 in Apps and go to Build it with your AI tool. If your tool is already connected, copy the starter brief and paste it there. The brief 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 AI tool and follow the one-time settings below.

Connect on a self-hosted installation Self-hosted only

Sign in with the CLI first (see Install and use the Diakrin CLI), then print the connection command for your tool:

sh
diakrin mcp config --client claude

Run the line it prints. Use --client codex for Codex. The first time your agent uses Diakrin, your browser asks you to Allow it.

For OpenCode, diakrin mcp config --client opencode prints an opencode.json block instead of a command. Add it to your opencode.json. OpenCode does not sign in through the browser: the block reads a connection token from DIAKRIN_MCP_TOKEN. Create that token in the console under Settings → AI tools with 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 tools when you no longer need it.

To check that the tool reaches the right installation as you, run diakrin doctor --online. It shows the saved address and your signed-in session and names one next step when something is wrong. It never prints a token.

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 tools 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. On BYOC, copy this block as shown: diakrin auth pair creates no installation profile, so diakrin mcp config prints this block only on a self-hosted installation you signed in to with diakrin auth login.

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 →