Configure the CLI and MCP clients
Every client needs the same two values: the server address and, when the server has API keys, a key. Where they go differs per client, and most clients have no key field in their settings screen: the key goes into a configuration file or a command line. Find your client below.Before you start
The address
Write
127.0.0.1, not localhost. A client that resolves localhost to an address the server does not listen on fails with a DNS or connection error.The key
The server reads keys at start, fromYUKTA_API_KEYS_<n>_* variables (the same keys serve REST, the CLI and /mcp):
A client sends the key as
Authorization: Bearer <key> or as X-API-Key: <key>; both are accepted. With no key configured the server accepts loopback callers only, which means any process on the machine.
Verify any client
Callwhoami. It returns the key name, the role, the sessions and what the key may do. authenticated: false or a 401 means the key did not arrive or is wrong. In an assistant: “Call whoami on Yukta.”
yukta-cli
yukta-cli calls the REST API; it has no configuration file. Each setting is a flag or an environment variable, and a flag wins.
--token and --token-file are mutually exclusive. A key on the command line is visible to other users in the process list; prefer the variable or a file.
Set it once for a shell
export lines in ~/.bashrc or ~/.zshrc to keep them.
Keep the key in a file
A server on another machine
Plainhttp to a host that is not loopback is refused with a token, because the key would cross the network in clear text. Put the server behind HTTPS and use an https:// URL. Use --insecure-token only on a network you trust.
Timeouts and retries
Environment-only:
YUKTA_STREAM_IDLE (default 45s, how long a followed stream may be silent) and YUKTA_STREAM_RECONNECTS (default 5). The full list is in the CLI reference.
Errors
Claude Code
Claude Code keeps MCP servers in its own configuration, managed withclaude mcp.
Without a key
With a key
--scope user makes the server available in every project; --scope local (the default) limits it to the current project and --scope project writes .mcp.json into the repository (do not commit a key).
Check, change and remove
The plugin
For the default address and no key,yukta-cli agents install installs the yukta plugin (MCP, skills and a live pane) instead of a bare MCP entry. Use claude mcp add as above for another address or a key.
Errors
Codex
Codex reads MCP servers from~/.codex/config.toml, managed with codex mcp. Its safest key source is an environment variable.
With a key in an environment variable (recommended)
YUKTA_TOKEN each time it starts, so the key is not stored in a file. The variable must be set in the shell that starts Codex.
With a key in the file
Edit~/.codex/config.toml:
Without a key
Check and remove
Errors
Antigravity
Antigravity has no key field in its MCP settings screen. Put the key in the raw configuration file,~/.gemini/config/mcp_config.json.
The configuration
- Antigravity wants
serverUrl, noturl. Withurlthe server is not found. - It does not expand environment variables in this file, so the key is written in plain text. Keep the file private:
chmod 600 ~/.gemini/config/mcp_config.json. - Leave out
headerswhen the server has no keys.
Apply it
Save the file, then refresh the MCP servers in Antigravity or restart it. In the agent panel, the MCP servers list showsyukta and its tools when the connection works.
Let the CLI write it
Errors
Cursor
Cursor reads~/.cursor/mcp.json (all projects) or .cursor/mcp.json in a project.
- Cursor expands
${env:NAME}, so the key can stay in your environment (exportYUKTA_TOKENbefore starting Cursor). Write the key in place of${env:YUKTA_TOKEN}if you prefer. - Check it under Settings, then MCP:
yuktashows a green dot and its tool count. - With the CLI:
yukta-cli agents install --agent cursor --token-env YUKTA_TOKEN.
VS Code Copilot
VS Code reads the usermcp.json (on Linux ~/.config/Code/User/mcp.json; open it with the command MCP: Open User Configuration) or .vscode/mcp.json in a workspace. Its root key is servers, not mcpServers.
typemust behttp.- Start the server from the MCP: List Servers command; tools then appear in Copilot’s agent mode.
- With the CLI:
yukta-cli agents install --agent vscode --token-env YUKTA_TOKEN.
Windsurf
Windsurf reads~/.codeium/windsurf/mcp_config.json. Like Antigravity it wants serverUrl.
${env:NAME}is expanded, so the key can stay in your environment.- Refresh the servers from the MCP panel after saving.
- With the CLI:
yukta-cli agents install --agent windsurf --token-env YUKTA_TOKEN.
OpenCode
OpenCode reads~/.config/opencode/opencode.json (or opencode.jsonc). Its root key is mcp, and a remote server has "type": "remote".
- OpenCode spells an environment reference
{env:NAME}, without the$. - With the CLI:
yukta-cli agents install --agent opencode --token-env YUKTA_TOKEN. A file with comments (.jsonc) that the CLI cannot parse is left alone, and it prints the entry to add by hand.
Any other MCP client
A client needs a URL and, with keys, one header:
The names differ by client:
url, serverUrl or httpUrl for the address, and type: "http" or "remote" for the transport. Use the ones your client documents for a streamable HTTP server. Test the endpoint without the client:
200 means the key works. 401 means the key is missing or wrong, which is the same error a client reports as Unauthorized.
Let the CLI do it
yukta-cli agents install finds the agents on your machine and writes the entries above for each, plus the Yukta skills.
--token-env VARwrites a reference to the variable for the clients that expand one (Cursor, VS Code, Windsurf, OpenCode, Codex, Claude Code). Antigravity cannot read the key from an environment variable, so with--token-envalone it fails and asks for--tokenor--token-file; the key is then written to its file.- It changes only the
yuktaentry, keeps the first original of each file as<file>.yukta-bak, and records what it did souninstallcan undo it. Files it creates are private (mode0600).