Skip to content
code-config.com

Set up a toolkit's MCPs on first launch

Setting up keys for several MCP servers by hand is tedious. Instead, the first time you launch a toolkit in a terminal coding app such as Claude Code, Code Config asks the agent to do it with you: it checks which servers need a key, finds or asks you for each one, and tests that they answer.

For example, the first launch with Plantpal’s build toolkit opens Claude Code with a note listing the Supabase server as waiting for a key. The agent reads the key from where you keep it, or asks you, then confirms the server works.

Code Config starts the app with a message already in it. You get that message again whenever one of the toolkit’s tool servers still needs a key on this computer.

The message is addressed to the agent in the app you just opened. It names every tool server the toolkit carries, says which ones are ready, and says which ones are waiting for a key. For each server that needs one, it carries the same command every other message about a missing key gives, the one that opens the page where you enter the toolkit’s keys:

Terminal window
csc key page --toolkit <toolkit> --json

Names, IDs, and commands are all the message holds. No key value goes into it.

The agent first looks for a key that is already on this computer: an environment variable, one variable of a .env file, a file, or a command that prints it, such as gh auth token for GitHub. It tells csc where each key is with a small JSON object on standard input, and csc reads the value from there, so the value stays off the command line.

For a key the agent cannot find, it tells you where to get it and gives you a command to run in your own terminal, where it asks for the key without showing it. You can also paste the key under Settings → Keys in the Code Config app.

Once the commands have run, the agent calls each tool server once and tells you which ones answered.

When every key is in place, it tells you to start your coding app again to pick this up. A coding app reads its settings when it starts, so the keys you just set up arrive on the next launch rather than in the session you are sitting in.

Run this in a terminal on the same computer at any point:

Terminal window
csc key get --toolkit <toolkit> --json

It reports every key the toolkit’s tool servers need and whether each one is ready.

In the Code Config app, the button that starts the launch reads Set up and launch with your coding app’s name whenever the launch carries that first message. It reads Launch once every server is ready and you have opened this toolkit on this computer before.

From a terminal, add --prompt setup to the launch:

Terminal window
csc launch --host <host> --toolkit <id> --prompt setup

With --json, the answer reports firstPrompt as true when the launch handed the app a message. The text of the message stays out of that answer.

A first message rides on the command line the coding app is started with, and only a terminal app is started that way. A desktop app, the Claude app or the Codex app, is handed a folder. It takes no message on the way in, so it is not offered a set-up launch: the button says Launch, and the toolkit’s servers are set up from a terminal with csc key set.

Set up MCP credentials covers doing this yourself.

Troubleshooting lists the reasons a server is left out of a launch.