Connect an AI

Your AI assistant writes the application and keeps it on Git; Gluonify builds and deploys it. With an AI token of Prism, the same assistant can register the repository, start a build, follow it, ask for the promotion to production, read the logs and put the application to sleep, through MCP, with the roles you gave it and nothing more.

How it works

Prism, the customer console, serves an MCP endpoint at https://app.gluonify.io/mcp (JSON-RPC over HTTP, tools only). Each tool runs the same code as the matching screen of Prism, with the same checks: your organisation only, the roles of the token, and the applications you chose. Gauge remains the MCP server of the platform's operators.

Before you start

  • An owner account (org:owner) of your organisation in Prism: only an owner creates, lists and revokes AI tokens.
  • A repository the builder can build, or an application already deployed on the platform.
  • An MCP client that supports Streamable HTTP and a bearer token, such as Claude Code.
  • curl and jq to exchange the token's secret (or any HTTP client).

1. Create an AI token in Prism

In Prism, open Access, then the AI tokens section:

  1. Give the token a name (the assistant or the project it serves).
  2. Tick its roles, grouped by repositories (read, change, set Git tokens), pipelines (read, run, approve promotions), applications (read, sleep and wake, delete, roll back, resize), configuration (read, change), secrets (write only), consumption and contract (read, without prices) and metrics (read). Tick only what the assistant needs.
  3. Keep all the applications of the organisation, or choose some: the token then reaches only those, everywhere.
  4. Choose its duration, from 1 to 90 days, and keep "Destructive actions wait for an owner's approval" ticked.
  5. Create it, copy its secret (gai_…) at once and keep it in your client's secret store: Prism shows it only once and never again.

2. Exchange the secret for an access token

The secret is not sent to the MCP endpoint itself: the client exchanges it for a short access token (about ten minutes), then uses that token. Prism relays the exchange to Charm, so that the client needs Prism's address only:

Exchange (the secret in GLUONIFY_AI_TOKEN, the access token in GLUONIFY_ACCESS_TOKEN)

export GLUONIFY_ACCESS_TOKEN=$(curl -s -X POST https://app.gluonify.io/api/v1/ai/exchange \
  -H 'Content-Type: application/json' \
  -d "{\"refreshToken\":\"$GLUONIFY_AI_TOKEN\"}" | jq -r .access_token)

When the access token expires (401), exchange the secret again. A revoked or expired AI token can no longer be exchanged. The secret is never logged by Prism.

3. Connect your MCP client

Declare Prism as an HTTP MCP server, with the access token in the Authorization header:

MCP client configuration (for example .mcp.json for Claude Code)

{ "mcpServers": { "gluonify": { "type": "http", "url": "https://app.gluonify.io/mcp", "headers": { "Authorization": "Bearer ${GLUONIFY_ACCESS_TOKEN}" } } } }

To check the connection, list the tools by hand: only the tools the token's roles allow are listed.

List the tools

curl -s https://app.gluonify.io/mcp -H "Authorization: Bearer $GLUONIFY_ACCESS_TOKEN" \
  -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

What the assistant can do

  • Repositories: repos_list, repo_get, repo_set (URL, branch, sub-directory), repo_git_token_set (write only, never read back), workflows_standard_copy (copies the standard Build and Promotion workflows into your repository, on a new branch to merge).
  • Pipelines: pipelines_list, pipeline_set (Build or Promotion, Git reference, four eyes), build_start, build_cancel, builds_list, build_logs, executions_list, execution_get, approval_decide (QUA to PRD).
  • Applications: apps_list, app_status, app_logs, app_sleep (frozen or stopped), app_wake, app_sleep_settings, app_delete.

Your application's own MCP tools

A customer application can expose its own MCP tools. The platform relays them to your AI assistant through the MCP endpoint of Prism, as <code>app__&lt;application&gt;__&lt;tool&gt;</code>.

Java (Quarkus)

Add the dependency <code>io.gluonify.plasma:gluonify-plasma-mcp</code>, then annotate a public method of a bean implementing <code>McpToolbox</code> with <code>@McpTool(name, description, write = false)</code>. The arguments are a record.

// pom.xml: io.gluonify.plasma:gluonify-plasma-mcp
@ApplicationScoped
public class OrdersToolbox implements McpToolbox {
    public record OrderQuery(String customer, int limit) {}

    @McpTool(name = "orders_list", description = "List the latest orders of a customer", write = false)
    public List<Order> ordersList(OrderQuery query) {
        return orders.latest(query.customer(), query.limit());
    }
}

Python

Import <code>mcp_tool</code> from <code>gluonify.fastapi</code>, decorate a function, and call <code>create_app(..., mcp=True)</code>.

from gluonify.fastapi import create_app, mcp_tool

@mcp_tool(name="orders_list", description="List the latest orders of a customer", write=False)
def orders_list(customer: str, limit: int = 10) -> list[dict]:
    return latest_orders(customer, limit)

app = create_app(__name__, mcp=True)
  • The builder detects the SDK and deploys the application with MCP enabled.
  • Read tools need the AI permission to read applications. Write tools are proposed to an owner for approval (in production).
  • The application only accepts calls relayed by the platform.
  • Limits: 50 tools, arguments 64 KiB, answer 256 KiB, 10 s per call.
  • The tools appear in the console (application view, "MCP tools") and an owner can refresh them.

The guardrails

An AI token is not a person: Prism bounds it further.

  • Never an owner power: an AI token does not manage access, AI tokens, the audit nor domains, never sees a price, and it works on the MCP endpoint only.
  • Your organisation only, and only the applications you chose: anything else answers as if it did not exist.
  • No self-approval: a token never approves the promotion of an execution it started.
  • A limit of calls per token (60 per minute and 1000 per hour by default); beyond, the client is asked to wait.
  • Approval mode: deleting an application, approving a promotion, setting a Git token, writing or deleting a secret, rolling back or resizing an application becomes a proposal that an owner approves or rejects in Access; once approved, it runs with the token's own roles.

Audit

Every call of an AI token is recorded in Prism's Audit module: which token (its name), which tool, which application and the outcome, never a secret. Tick "AI tokens only" to see them alone. The list of tokens shows when each one was last used.

Good practices

  • One token per assistant and per project, with the fewest roles that do the job, and a short duration.
  • Start with read roles, then add the changes you really want.
  • Keep the approval mode for the destructive actions, and approve promotions yourself.
  • Revoke a token as soon as it is no longer used, or if its secret may have leaked.

Start from gluonify-source

gluonify-source is the starter application for customers: a Quarkus service in which every choice is explained, with a CLAUDE.md that summarises the rules of the platform for an AI assistant. Start your assistant from it, then connect it to Prism to build and deploy what it writes.

And Gauge?

Gauge is the MCP server of the platform's operators, with their own roles and policies. As a customer, you connect your assistant to Prism, which keeps everything within your organisation.

Limits

The approval mode, the proposals and the call counters are kept in memory by each replica of Prism: after a restart a token is back in approval mode. Consumption, contract and quotas are organisation-wide: a token limited to some applications cannot read them. The MCP endpoint answers JSON only (no event stream).