Build apps
Connect your coding tool
Give your coding agent scoped access to your Diakrin apps over MCP.
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.
Works with your coding tool
opencode.json.Terminal and CLIThe diakrin command for terminals and agents.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:
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 # CodexClaude 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.
- Sign in to the console and select the correct organization.
- Open Settings → AI assistants, open Connecting a script or a tool without sign-in? and select Create connection token.
- 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. - Copy the exact MCP configuration shown by the console into your tool’s settings. Use the endpoint it supplies for your environment.
- 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.
[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.
{
"$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 can | It cannot |
|---|---|
| Reach every app you can access, including apps shared with you later | Do anything your current role and app access do not allow |
| Create apps when your company lets you create them | Reach another organization |
| Request builds, previews and data access for review | Approve 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.