• SYNCED
  • CONFIRMED
  • SECURE
  • HUMAN

How to update environment variables with your AI

Connect Codemagic to your AI client once. From then on, you can manage your CI/CD secrets and API keys just by typing what you need.

Ask AI about this page

Short answer

How can I update my Codemagic environment variables using AI?

Tell your AI client which variable group to target and which keys to add. The agent uses the Codemagic MCP to push these secrets directly into your existing groups. You'll see the changes live in your dashboard immediately.

The outcomes.

Where your changes land.

The AI handles the API calls so you don't have to touch the Codemagic web UI.

SYNCED

Updated variable groups

The AI pushes your new keys to the specific Codemagic group you named. Your pipelines use these new values on their next run.

CONFIRMED

Action verification

Your agent reports back once the variables are added. You get a clear confirmation that the keys are live in the cloud.

SECURE

Protected secrets

The AI handles the transmission of sensitive strings. You avoid leaving API keys in your local terminal history or chat logs.

HUMAN

Manual review needed

You still need to check the Codemagic UI if you want to delete old, unused keys. The AI only adds or updates what you tell it to.

The workflow

What your AI does when you ask to add variables.

The AI translates your plain English request into a specific instruction for Codemagic.

  1. Identify the target

    Your agent looks at your request to find the specific Codemagic variable group name you want to modify.

    add_variables_to_group
  2. Prepare the payload

    The AI organizes your new keys and values into the format required by the Codemagic API.

    add_variables_to_group
  3. Execute the update

    The agent sends the data to Codemagic to insert the new variables into your group.

    add_variables_to_group
  4. Report success

    The AI confirms the operation is complete and tells you the variables are ready for your builds.

    add_variables_to_group

Try it

Copy these to start.

Use these prompts to trigger the Codemagic update process.

Starting points

Replace the group names and key names with your actual Codemagic identifiers.

Codemagic Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_pNfm2lX2WqmSzosnLxFoxsMQehesV2YsKzeaN0sV/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Codemagic capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "codemagic-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_pNfm2lX2WqmSzosnLxFoxsMQehesV2YsKzeaN0sV/mcp"
    }
  }
}
Copy into chat04
  • Add a new variable called STRIPE_API_KEY with the value 'sk_test_4eC39H' to my 'production_secrets' group in Codemagic.

  • Update the 'firebase_config' group in Codemagic by adding the variable 'FIREBASE_APP_ID' set to '1:12345:web:abc'.

  • Add three new environment variables to my 'staging_vars' group in Codemagic for my latest deployment.

  • Can you add the 'SENTRY_DSN' key to my Codemagic variable group named 'app_env'?

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Codemagic once, then ask.

Just link your Codemagic account to Vinkius. Your credentials stay encrypted and you can immediately start managing your CI/CD environment through your favorite AI client.

Connect Codemagic to your AI

FAQ

How this task behaves

  • 01

    Can the AI delete existing variables?

    No. This MCP only has the capability to add or update variables. You must use the Codemagic web interface to delete keys.

  • 02

    Will my secrets be visible in the chat history?

    The AI processes the values, but you should follow your own security protocols regarding what you paste into any chat interface.

  • 03

    Does the AI create new variable groups?

    No. The AI can only add variables to groups that already exist in your Codemagic account.

  • 04

    Can I update multiple variables at once?

    Yes. You can list multiple keys and values in a single prompt and the AI will process them.

  • 05

    Do I need to run a build for the changes to take effect?

    The variables are updated in Codemagic immediately, but your specific CI/CD pipeline will only see them when the next build starts.

  • More questions about Codemagic? The Connector page answers them. See everything the Codemagic Connector can do

Connect Codemagic to Claude, Cursor, ChatGPT & more