Functions are versioned and tested programs that set up what your jobs need, from installing Node to configuring AWS credentials. You and your coding agent can find and configure them from the CircleCI CLI or MCP server.
With functions you can:
- Pin each function to a version like a normal package, and upgrade to the latest versions with
circleci function update - Catch version and input mistakes before your pipeline runs, with errors that tell you what’s wrong
- Get dependency caching built in, with no separate save and restore steps
Getting started
- With your coding agent: Ask your agent to set up CircleCI with functions. It can use the CircleCI CLI or connect through the CircleCI MCP server to find the right function, configure it, and validate your config before you push.
- With the CLI: Install the CircleCI CLI (v1.3.0 or later), then run
circleci function listto browse the catalog andcircleci function add setup-nodeto add one to your config. - In your config: Declare the function in a
functions:block at the top of your config, then call it by name in any job:
version: 2.1
functions:
setup-node: github.com/circleci-functions/setup-node@v0.4.0
jobs:
test:
docker:
- image: cimg/base:stable
steps:
- checkout
- setup-node:
with:
node-version: "22"
- run: npm ci && npm test
Functions are free on every plan, and your orbs remain fully supported. Learn more in the functions docs or browse the functions catalog.
This is a beta feature, so we’d love your feedback on what’s useful, what’s missing, and how we can make it better. Share your thoughts here.