Skip to main content

Vibe coding with Stacktic

Build with AI
Vibe coding with Stacktic

You talk to an AI client, and the client works through the MCP server of your stack. This page covers connecting the client and what to say to it: for a new application, for an application you already have, and for security and validation.

Before you start​

You need a stack that contains the MCP server. The smallest one is the initiator stack. Check these before you connect:

WhatWhyWhere it is set
Gateway → MCP server linkPublishes the MCP server's URLThe link's subdomain
MCP server → identity client linkThe login your AI client goes throughThe identity client
MCP server → cache link, with client_storage onThe connection survives a restart of the MCP serverThe link
MCP server → stack agent linkScans, tests and evidenceThe link
A platform accountThe MCP server changes the design and starts builds through the platform API with itstacktic_api_user and stacktic_api_key on the MCP server
The knowledge repositoryWhat the MCP server knows about the catalogThree lines in the MCP server's configmap attribute (see MCP knowledge repository)

Connect your AI client​

Take the URL

The address is https://<mcp-subdomain>.<your-domain>/mcp. The subdomain is the one on the gateway → MCP server link.

Add it to your client
  • Claude on the web or desktop: add a custom connector with that URL.
  • Claude Code: claude mcp add --transport http stacktic https://<mcp-subdomain>.<your-domain>/mcp
  • Other clients: add a remote MCP server with streamable HTTP transport.
Sign in

Log in as a user of your stack's identity provider.

Ask where you are

A good first message is: "Check this MCP and tell me what is next." The server tests its own credentials and connections, then says which stage your stack is in.

Details and troubleshooting are in Connect a client.

How a conversation goes​

The MCP server takes every stack through the same stages and tells you which one you are in. When you ask what to do next, it answers for that stage.

StageWhat happensWhat it asks you
ConnectIt checks its own credentials, the platform account, the stack agent and the persistent loginNothing, unless something is missing
DesignIt draws your application and what it needs, from the real catalogWhere the code lives, public or internal, login or not, which environments
BuildThe platform generates your stack repositoryIt asks for confirmation before every build
InstallImages are built in the cluster and the manifests appliedIt gives the exact commands for your stack
AutomateArgo CD and Reloader take over deliveryWhich components Argo CD manages, automatic or manual sync
SecureScans, fixes on the design, re-scansIt confirms each fix before applying it
ProveScheduled scans and an audit trail—
OperateBackups, upgrades, users, health—

Some rules hold in every stage:

  • It never builds without your confirmation.
  • Every option it offers comes from the catalog.
  • It asks all its questions in one message, each with a default, so "defaults are fine" is a complete answer.

Clients that show MCP prompts also list the server's built-in ones, such as start_here, deploy_my_app, add_to_my_app, is_my_stack_ok, security_audit, harden_my_stack and validate_my_stack. Plain sentences work in every client.

How to phrase a request​

A request that works well has four parts. Leave out anything you do not know; the server asks for it, with a default.

The shape of a good request
Goal:        <the outcome, in one sentence>
Scope: <the components or applications, by the names on the design page>
Constraints: <plan only | apply after I confirm | do not build>
Facts: <port, framework, repository, environments: only what you know>
DoExampleWhy
Say whether to act or only plan"Show me the plan for adding a cache to orders. Don't change anything yet."The server proposes before every change. Saying "plan only", or "apply after I confirm", saves a round trip
Use the names on your design page"Set replicas on orders to 3."The server finds cells by their label. Names are lowercase letters, digits, dashes and underscores. A component is named after its type (cnpg, keycloak-operator, stack-agent) unless you name it
Say who uses whom"orders uses the invoices bucket." · "The gateway exposes orders publicly."Links have a direction, and the catalog allows one direction for each pair of types
Describe the need, or name the catalog's component"a cache" or "Valkey"Products are mapped to the catalog's equivalent: Redis to Valkey, PostgreSQL to CNPG, object storage to SeaweedFS. For something the catalog does not have, the server says so; it never invents a component
Describe the effect when you do not know the attribute"Make orders autoscale between 2 and 5 replicas."The server reads the component's attributes, picks the right ones and shows you the current values first
Give a whole design in one message, but changes one goal at a time—A design is drawn in one step. A change is easier to check and to roll back on its own
Name the proof you want"Run a penetration test on orders." · "Prove the link from orders to its database."Each kind of check is a different tool. See What confuses the MCP

"Defaults are fine" is always a complete answer to the server's questions.

A new application​

The best input is a specification. The next best is a clear description that answers five things:

  • what the application is;
  • what it needs (data, cache, queue, storage);
  • who reaches it;
  • which environments it runs in;
  • how you will know it works.

These are the questions the server would otherwise ask.

With a specification
Here is the specification of my application: <paste it>.
Design a Stacktic stack for it. Use the catalog defaults where I did not say otherwise,
show me the plan before you change anything, and do not build until I say so.
With a description
I am building a FastAPI service for order tracking that listens on port 8000. It needs a
PostgreSQL database, a Redis cache and a bucket for invoices. It needs a public URL with a
login. Environments: dev and staging. Design the stack and show me the plan first.

The server answers with a plan: the components, the links between them, and what each link generates (the variables your code will receive, the secret, the route, the network policy). After you confirm, it writes the design through the platform API. You see it on the design page.

Where the code lives​

It always asks this, with two options:

OptionWhenWhat it sets on the application
The stack's own repository, one folder per application (the default)Most cases. No new credential is neededgit_owner, project and branch from the stack's configuration, git_folder = /apps/<name>, and the stack's token. Each folder needs its own Dockerfile
A separate repositoryAnother team, another release cadence, or code that will outlive the stackgit_owner, project, branch and git_token. Use the stack's token if it can read the repository, so there is one credential to rotate

With the default option, the server can write the application's first code itself. It writes under apps/<name> in the stack repository, Dockerfile included, and commits with the token the platform already holds. No extra link is needed. It can write only under apps/, because everything else in that repository is generated.

It also sets two values that decide whether the application starts at all:

  • port: the port the application listens on.
  • framework_type: decides the names of the variables the application receives, for example DATABASE_URL for Node.js and Python, or SPRING_DATASOURCE_URL for Spring.

Writing the code from the specification​

For spec-driven development of the application code (GitHub spec-kit), set the MCP server's ai_workflow attribute to spec-kit. Then ask:

Set up spec-kit for my application.

The answer gives the exact install commands for each application. Later, ask "Where is the development of the orders app?". It reads the features and tasks from the specs in the application's repository.

An existing application​

Start by choosing how the application enters the stack:

You haveUseNote
Source code you will keep developingAn external_source_code component, built in the cluster from your repositoryThe repository needs a Dockerfile; set dockerfile if it is not at the folder's root
A container image you already build elsewhereAn image_base component with the image as its versionIts links give the same variables as external_source_code; no source code is needed
Describe the application and where its code is

For example: "I have an existing Node.js app in github.com/acme/shop, branch main, listening on port 3000. Today it uses PostgreSQL and Redis. Add it to this stack, wire it to a database and a cache, and give the MCP read access to its code."

Choose where the code stays

Keep it in its own repository: the server sets the repository and a token that can clone it, the stack's token if it has access, otherwise the repository's own. Or move the code into the stack's repository under /apps/<name>, with no new token.

Give the MCP server the code

If the code moved into the stack repository, the server already reaches it there. If it stays in its own repository, draw an MCP server → application link (fastmcp-external_source_code), one per application. The link's write_access attribute decides whether the server may change the code; without it the repository is read-only. Build, then deploy the MCP server again so it picks up the repository.

Migrate the configuration

The application must read its connections from the variables the stack gives it. Ask for the change on a branch and review it before anything is pushed.

Build and install

As for a new application.

Migrating the configuration
Read my app's code and find every place it reads database, cache, queue or storage
settings. Show me how each one maps to the variables this stack gives it, then make the
change on a new branch and show me the diff before you push.

With the link in place, the server can:

  • clone the repository, show its structure, read and search files;
  • find its entry points and dependency files for its framework;
  • show what the application is connected to in the running stack;
  • when write_access is on: create a branch, write files, show the diff, and commit and push.

Until the link exists, the server knows the application only from what you tell it. A client that runs on your own machine, such as Claude Code inside the repository, can read the code directly.

Production

A production stack runs image_base with the exact image that staging built and scanned, not a build from source. Make it a separate system: ask the server to duplicate the staging design, then switch each application to image_base.

Designing and changing the stack​

The server changes the design through the platform API, so its changes appear on the design page. If the design page is open, reload it before you save there.

You sayWhat it does
"What does this stack contain?"Lists the components and links of the design
"Add a RabbitMQ queue to the orders app."Finds the right component and link in the catalog, shows the plan and what the link generates, and writes it after you confirm
"What does the link from my app to the database generate?"Lists the variables, secrets and network rules that link produces
"Lay out the diagram."Arranges the drawing in zones. Only the layout changes
"Validate the design."Checks it against the rules the platform and the templates enforce
"Build it."Asks for confirmation, builds, and reads the build log
"Why did the build fail?"Explains the failure from the log and the platform's message
"How do I install this?"Gives the install route for this stack: Argo CD, the stack agent, or the exact commands
"The catalog cannot do X."Shows the gap and the closest thing the catalog can do, and prepares a request for the platform team

Security: inspect it, then add it​

Security is a loop: measure, fix on the design, build, deploy, measure again. The server proposes each fix with what it affects, and applies it only after you confirm.

You sayWhat runs
"Is my stack secure?" or "Run a security audit."The configuration check first, which names the attribute behind each finding. Then the cluster scans (admission policy, network, Kubernetes hardening, secrets, RBAC), the penetration test of the applications and the gateway, and the link proofs. The result is a score and the gaps by severity
"Run a penetration test on the orders app."A time-boxed test of that application's surface
"Which images have critical vulnerabilities?"The vulnerability overview. It needs a Trivy component in the stack
"What is our PCI DSS position?"The PCI DSS scan and overview. ISO 27001 works the same way
"Harden my stack."The same loop, ending with a re-scan that shows the score went up

The fixes it proposes are changes to the design:

FindingFix
Application pods run with weak settingssecurity_features on the application: pod_security, read_only_fs, seccomp, no_privilege_escalation, no_host_access, no_automount, drop_capabilities
A route accepts too muchOn the gateway → application link: allowed_methods, response_headers, remove_response_headers, ssl_protocols, ssl_ciphers, cors
A weak login realmOn the identity provider: brute-force protection, password rules, email verification
Secrets written into the repositoryAdd the External Secrets component with external_secrets_enabled on. Components that support it then take their credentials from the secret store instead of a secret file in the repository. external_secret_sub set to false keeps one component on the file
No admission policiesA baseline or hardened policy plan for this topology, applied as design changes
No image scanning, runtime detection or code scanningA Trivy component, a Falco component, or SonarQube with a SonarQube → application link that has scan_enabled on. That scan reports after the build; turn on enforce_quality_gate on the same link to analyse the exact commit that is built and, once SonarQube has taken the project over (from the first gated build after the takeover), stop new bugs or vulnerabilities before the image is pushed - existing issues never block

Network policies are not on this list because they are generated from the links on every build, unless the section value microsegmentation_level is none.

Before an image exists, an application's build Job can run up to three gates in this order: a Trivy source gate (build_gate on the application, enforce, report or off: secrets and fixable critical CVEs), an Opengrep SAST gate (sast_gate on the application, the same three values: the platform's rules, the repository's .opengrep/ folder and the sast_rules attribute), and the SonarQube gate (enforce_quality_gate on the SonarQube → application link, on or off; with scan_enabled alone SonarQube scans after the build and only reports). The stack agent's Builds & Gates page shows, per build, which gates exist and what each said.

What to turn on in the stack agent​

The stack agent runs the scans, tests and evidence. These attributes are off by default, except where noted.

AttributeTurn it on to
ui_enabledGet the agent's dashboard at /ui. The platform's Scans menu opens it; it also needs a gateway → stack agent link
scan_scheduleRun scans inside the agent on a schedule, one line per scan type, for example rbac: 30m, pci: 24h full, all: 12h
delta_webhookSend confirmed regressions, as JSON, to a URL you give
evidence_pushCommit every scan run to your stack repository on an evidence branch. It uses the platform's Git credential
cve_decisions_enabledLet people record signed decisions about vulnerabilities, such as an accepted risk. Scanning itself is always on
nucleiNo longer read. Dynamic testing is the nuclei component: its links are the scan contracts and every run is pushed to the agent — see DAST as a design fact
deploy_accessLet the agent deploy from the repository to the cluster. For staging and QA stacks, not production
backup_apply_accessLet the agent run backups and restores. Reading the backup status is always available
backup_inplace_restoreAllow a restore over live data. Needs backup_apply_access
design_stage_componentsList components that are drawn but not live yet. Their links count as accepted in link validation
agent_endpointThe agent's public address. The platform uses it to run the tests of a Test paper (LiveView)
api_keyThe key the platform sends with those tests. Set it to the same value as api_key on the gateway → stack agent link, which is the key the agent checks

What confuses the MCP​

Words that mean more than one thing​

WordWhat it can mean in StackticSay instead
deployChange the design, build the repository, or apply it to the cluster"add … to the design", "build it", "install it on the cluster"
pushSave & Push (regenerate the files an attribute change affects), commit application code, or mirror scan evidence to Git"push the attribute changes", "commit the code"
testThe tests of a Test paper, the predefined stack tests, link validation, a penetration test, or your application's own tests"run the predefined tests", "prove the links", "run a penetration test"
scanThe configuration check, a cluster scan, the penetration test, the DAST coverage of what the stack exposes, the build gates, or image vulnerabilitiesName the scan. "Pen test" means the penetration test; "DAST" means the coverage of the nuclei contracts
versionThe catalog version of a component type, the software version (an attribute, such as the PostgreSQL version), an image tag, or the Stacktic version of the stack-wide steps"upgrade PostgreSQL to 17" changes the software version. Name a catalog version only if you mean one: older ones offer fewer attributes and links
knowledgeThe Knowledge paper of your design, or the MCP's knowledge repository"Knowledge paper" or "knowledge repository"
environmentAn overlay of one design (dev, staging), or production as a separate system"add a staging environment", "create the production system"
externalA component copied from another system, the External Secrets component, or external_source_code (your own application)Name the one you mean
stack, systemThe same thing; the platform calls it a systemEither

Requests the server redirects​

You askWhat it does insteadWhy
"Create user alice in Nextcloud."Adds alice to the identity client's users attribute, then builds and deploysUsers are declared in the design. An account created inside an application is drift the stack does not know about
"Fix it with kubectl." or "Restart the pod."Changes the design and rebuilds. It uses kubectl only to read pod status, events and logs, and only when kubectl access is enabledThe design is the source of truth; a change made on the cluster is overwritten by the next apply
"Add X" when the catalog has no XShows the closest option (image_base runs any image, external_source_code runs any code, configmap lines carry extra settings) and sends a request to the platform teamIt never invents a component, a version or a link
"Add another database like the first one."Gives the second its own name, user and passwordTwo instances of the same kind may not share credentials; the build rejects it
"Build and deploy everything."Asks for confirmation before the buildA build rewrites the stack repository
"Remember this for next time."Writes it into the repository, for example in the specs and task listsShared project state lives in the repositories, where every session and every tool can see it
Anything about another stackWorks on its own stack, and on another system only when you name it exactlyEach MCP server belongs to one stack and never guesses a system name

Situations that trip it up​

  • The design page is open while the server writes. The page's next save overwrites the server's change. Reload the page first.
  • A catalog change is pending (the yellow Synchronize on the design page). Builds and design writes are refused until the design is synchronized. Ask the server to synchronize it.
  • Two cells share a label, for example an application and its identity client with the same name. The server cannot tell them apart; rename one.
  • It cannot reach the code. Without an application folder in the stack repository or an MCP server → application link, it knows the application only from what you said.
  • There is no stack agent link. Scans, tests and evidence are not available, and the server says so.
  • Secrets in the chat. Everything you type goes to the AI provider. The server takes the stack repository's token from the platform and never needs it in the chat. Set any other token yourself in the inspector's password fields, then tell the server it is set.
  • Long operations. A build, a penetration test and link validation take minutes. Ask for progress instead of starting them again.
  • A client that does not pass the server's instructions to the model. Start with "what is next?". The server answers through its journey tool, which carries the same guidance.
LinkWhat it adds
MCP server → stack agentScans, tests, evidence, health, backups, lifecycle plans
MCP server → application (fastmcp-external_source_code)Reading the application's code; changing it when write_access is on
MCP server → Argo CDSeeing and syncing Argo CD applications (write_access for syncs)
MCP server → cacheA connection that survives restarts (client_storage)
MCP server → a database, broker or search engineThat technology's own tools

The full list is in Tool surface. How the server behaves in each kind of conversation is in Working with the model.