Skip to content

About

MCP server and skills for formae: connect Claude Code, Codex, OpenCode, Cursor or any MCP client and manage infrastructure through conversation.

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Repository files navigation

formae plugin for AI coding assistants

MCP server and skills for formae (formerly distributed as formae-mcp). Your AI coding assistant can query, change and discover cloud infrastructure through formae, with self-hosted formae or with formae Cloud. Works with Claude Code, Codex, Cursor, OpenCode and any other MCP client.

AI assistants guide · Quick start with an AI assistant · Quick start with formae Cloud · llms.txt

Prerequisites

  • Self-hosted: a running formae agent (formae agent start) and a formae profile pointing at it.
  • formae Cloud: a formae Cloud installation.

After installing, run /formae:setup: it signs in to formae Cloud or sets up a self-hosted profile, then checks the agent is reachable.

The MCP server runs locally on your machine (macOS or Linux). In Claude, that means Claude Code and Cowork sessions on your computer; claude.ai chat loads the skills but cannot start a local MCP server, so the formae tools are not available there.

Installation

Claude Code (via Plugin Marketplace)

Register the marketplace:

/plugin marketplace add platform-engineering-labs/formae-marketplace

Install the plugin:

/plugin install formae@formae-marketplace

Run /reload-plugins (Claude Code v2.1.116+) to apply the install without restarting your session. On older versions, restart Claude Code instead. On first use the plugin downloads a prebuilt MCP server into ~/.formae-ai/opt, plus a formae if you do not already have one — nothing is compiled on your machine.

Verify by asking Claude to run /formae:formae-status.

Claude Code (manual)

If you prefer not to use the marketplace:

  1. Clone the repo:

    git clone https://github.com/platform-engineering-labs/formae-mcp.git ~/.claude/plugins/formae-mcp
  2. Start Claude Code with the plugin directory:

    claude --plugin-dir ~/.claude/plugins/formae-mcp

On first use the plugin downloads a prebuilt MCP server into ~/.formae-ai/opt, plus a formae if you do not already have one; set FORMAE_MCP_DEV=1 to build from source instead.

Codex

See .codex/INSTALL.md for Codex-specific installation instructions.

OpenCode

See .opencode/INSTALL.md for OpenCode-specific installation instructions.

Cursor

See .cursor/INSTALL.md for Cursor-specific installation instructions.

Migration from formae-mcp

The plugin was previously distributed under the name formae-mcp. If you installed it under that name, re-add it under the new name formae:

/plugin install formae@formae-marketplace

Then remove the old entry:

/plugin remove formae-mcp

Run /reload-plugins to apply the change without restarting your session.

Skills

Ask in plain language; the assistant picks the matching skill. You can also call a skill directly. For example requests, see Example workflows; details are in the MCP tools and skills reference.

Skill Use it to
/formae:formae-author Front door for authoring new infrastructure: triages intent, infers plugin dependencies, dispatches to the focused skills below
/formae:formae-project-init Start a new formae project from scratch
/formae:formae-deps Add or remove a plugin schema dependency in an existing project
/formae:formae-stack-design Decide how to group resources into stacks and where to draw boundaries
/formae:formae-apply Deploy infrastructure: apply a forma, reconcile or update a stack
/formae:formae-patch Urgent, targeted change or incident fix without a full reconcile
/formae:formae-destroy Tear down resources, stacks or environments
/formae:formae-rename Rename a managed resource without recreating the cloud object
/formae:formae-discover Find resources in your cloud accounts that formae does not manage
/formae:formae-import Bring discovered resources under formae management
/formae:formae-fix-code-drift Check for changes made outside formae and absorb or revert them
/formae:formae-policy Set, remove or inspect TTL and auto-reconcile policies on a stack
/formae:formae-secrets Generate, rotate and reference credentials such as database passwords and key pairs
/formae:formae-resources Inventory questions: which resources exist, by type, stack, label or management status
/formae:formae-stacks Overview of stacks with resource counts
/formae:formae-targets Configured cloud targets, regions and accounts
/formae:formae-status Running commands, deployment progress, history and failures
/formae:formae-connect Connect a cloud account to your formae Cloud installation
/formae:formae-config Switch, list, save, edit, delete or compare configuration profiles
/formae:formae-plugin-new Create a new formae resource plugin for a cloud service or API
/formae:formae-plugin-add-resource Add a resource type to an existing plugin
/formae:setup Get formae working here: sign in to formae Cloud, or set up a self-hosted profile, then check the agent is reachable
/formae:upgrade Upgrade the local formae when the connected agent is newer (self-hosted)

MCP tools

The skills are built on the plugin's MCP tools for inventory, apply and destroy, discovery and sync, policies, profiles, hub plugin search, and formae Cloud sign-in and cloud account connections. Your assistant lists them once the plugin is installed; see the MCP tools and skills reference in the docs.

Configuration

Profiles, the per-call profile argument and targeting several environments are described in Configuration. The plugin resolves the agent endpoint through formae profile show and needs formae 0.89.0 or newer; the FORMAE_AGENT_URL and FORMAE_AGENT_PORT environment variables are no longer read.

Which formae the plugin runs

There is exactly one formae per machine. On launch the plugin looks for yours (on PATH, then /opt/pel/bin, then /usr/local/bin) and uses it; only when it finds none does it download one into ~/.formae-ai/opt. It never installs a second copy alongside yours. A copy it provisioned under ~/.formae-ai/opt is silently refreshed on launch; an install it did not create is never upgraded by the plugin. /formae:upgrade tells you which case you are in and, for your own install, gives you the command to run.

To point the plugin at a specific build, set FORMAE_BIN to its path; it is used verbatim and treated as your own install. FORMAE_MCP_CHANNEL (stable by default) selects the channel used when the plugin does have to download.

What the plugin runs and connects to

On launch. Your assistant starts scripts/start-mcp.sh, a plain shell script that sources scripts/provision.sh and then runs the MCP server. The scripts:

  • download the prebuilt formae-mcp server into ~/.formae-ai/opt on first launch, and again whenever the plugin version changes;
  • if you have no formae of your own, download formae, pkl and the oidc auth plugin into ~/.formae-ai/opt, and refresh that copy on each launch. If you do have your own formae, they leave it untouched and add the oidc auth plugin under ~/.pel (the package manager also places a formae and pkl in ~/.pel/bin, which the plugin never runs);
  • download every package from hub.platform.engineering through the PEL package manager (pelmgr). If pelmgr is not installed, they fetch its bootstrap script from https://hub.platform.engineering/get/setup.sh and run it, which downloads pelmgr from the same host.

Nothing is installed outside your home directory, and nothing needs sudo.

While running. The MCP server talks to:

  • the formae CLI on your machine, which it runs for profiles, sign-in and inventory;
  • the formae agent named in your formae profile: a self-hosted agent, or your formae Cloud installation at cloud.formae.ai. Forma files, commands and queries you ask for go there;
  • hub.platform.engineering, to search the formae plugin catalog;
  • api.github.com and raw.githubusercontent.com, to fetch examples from the public formae plugin repositories;
  • console.formae.ai, the formae Cloud console. The plugin contacts it only for a bug report you ask for: it looks up where the report will go, and sends the report after you confirm its content. During onboarding it also gives you a link to the console to open yourself.
  • k.platform.engineering, only if usage reporting is turned on in your formae profile (disableUsageReporting set to false). It sends anonymous usage events: a hashed installation ID, the connection mode, the drift preference, the codebase mode and the plugin version, each combination once per session. Set disableUsageReporting to true to stop them.

It does not read credentials from your environment. Sign-in to formae Cloud goes through formae login --hosted, and the credential stays with formae.

License

FSL-1.1-ALv2

About

MCP server and skills for formae: connect Claude Code, Codex, OpenCode, Cursor or any MCP client and manage infrastructure through conversation.

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages