Set Up MCP Server with Claude Code
This guide covers how to set up the Palette MCP server with Claude Code. You can install the server through the Palette Agent Toolkit plugin, which bundles the MCP server configuration and four diagnostic skills in a single install, or configure the server manually as a container. We recommend the plugin install for most Claude Code users.
Prerequisites
-
Claude Code installed on your workstation. Refer to the Claude Quickstart page for more information.
-
A Palette account.
-
A Palette API key. Refer to the Create API Key guide for more information.
-
If you plan to configure the MCP server manually, a container engine, such as Docker or Podman.
Set Up with the Palette Agent Toolkit Plugin
The Palette Agent Toolkit plugin bundles the MCP server configuration and four diagnostic skills (diagnose-cluster,
diagnose-edge, health-overview, and access-review).
-
Start Claude Code in a terminal. Ensure that you authenticate with Claude by following the prompts.
claude -
Add the Palette Agent Toolkit marketplace.
/plugin marketplace add spectrocloud/palette-agent-toolkit -
Install the Palette plugin from the marketplace.
/plugin install palette@palette-agent-toolkit -
Configure your Palette connection. Open the plugin menu, select the palette plugin, and choose Configure options.
/pluginSet the following options.
Option Notes Palette host Required. Your tenant URL, for example example.spectrocloud.com.Palette API key Required unless you use an auth token. Create one under User Menu > My API Keys. Palette auth token JWT alternative to an API key. Provide an API key or an auth token, not both. Custom CA file path Optional. Path to a CA bundle for a self-hosted Palette behind a private CA. You must set the Palette host and either the Palette API key or the Palette auth token. Claude Code stores the API key and auth token in your operating system credential store, such as the macOS Keychain, Windows Credential Manager, or Linux Secret Service. Where no credential store is available, Claude Code falls back to
~/.claude/.credentials.jsonwith0600permissions. You do not need to export shell variables or create a.envfile.To provision the plugin without prompts, such as in a CI pipeline, pass the options as repeatable
--configflags at install time instead. Replace the placeholders with your own values.claude plugin install palette@palette-agent-toolkit \
--config host=<palette-api-endpoint> --config api_key=<palette-api-key> -
Verify the plugin is active and the MCP server is connected.
claude mcp list
You can now use the Palette MCP server with Claude Code.
Set Up Manually
Use this path if you prefer to configure the container image directly instead of installing the plugin.
-
Open a terminal session on your local machine.
-
(Optional) To save the secrets you need to configure the Palette MCP server in a file rather than pass them directly as variables, create an
.env-mcpfile. The file approach is more secure and manageable.-
Issue the following command to create the
.env-mcpfile in your home directory under the.palettefolder.mkdir -p ~/.palette
touch ~/.palette/.env-mcp -
Populate the
.env-mcpfile with the following required values. Refer to the Server Configuration section for further details on the MCP server configuration values.cat << EOF > ~/.palette/.env-mcp
PALETTE_HOST=<palette-api-endpoint>
PALETTE_API_KEY=<palette-api-key>
EOF
chmod 600 ~/.palette/.env-mcpinfoBy default, the server operates at the tenant scope. Every call sees results across every project that your credentials can access. To scope a request to a single project, mention the project by name or UID in your prompt instead of setting an environment variable; the assistant passes it as that call's
project_uidargument.
-
-
Issue the following command to create a folder to store kubeconfig files.
Replace
<local-path>with any folder on your machine.mkdir -p /<local-path>/kubeconfig
-
Execute the following command to add the Palette MCP server to Claude Code, replacing the placeholders with your values. Ensure that you provide full filepaths for the
kubeconfigfolder and.env-mcpfile, if you have configured one.If you want to use Podman, replace the command
dockerwithpodman.- .env-mcp File
- Environment Variables
claude mcp add --transport stdio palette -- \
docker run --rm -i --pull always \
--mount type=bind,source=/<local-path>/kubeconfig,target=/tmp/kubeconfig \
--env-file /<local-path>/.palette/.env-mcp \
public.ecr.aws/palette-ai/palette-mcp-server:latestReplace the environment variable values in the snippet below with your own values.
claude mcp add --transport stdio palette -- \
docker run --rm -i --pull always \
--mount type=bind,source=/<local-path>/kubeconfig,target=/tmp/kubeconfig \
-e PALETTE_HOST=<palette-api-endpoint> \
-e PALETTE_API_KEY=<palette-api-key> \
public.ecr.aws/palette-ai/palette-mcp-server:latestinfoTo enable write tools, such as create, update, and delete, append
--allow-writeafter the image name. By default, the server starts in read-only mode.warningThe Palette MCP server automatically removes the kubeconfig files from the mounted
/tmp/kubeconfigfolder when the container stops.A kubeconfig contains cluster credentials. When you retrieve one with
read_cluster_kubeconfig, passwrite_path(requires--allow-write) to have the server save it locally with0600permissions, and treat the saved file as sensitive. -
Issue the following command to ensure that the MCP server was set up successfully.
claude mcp listExample Outputpalette: docker run --rm -i --pull always --mount type=bind,source=/Users/test-user/kubeconfig,target=/tmp/kubeconfig
--env-file /Users/test-user/.palette/.env-mcp public.ecr.aws/palette-ai/palette-mcp-server:latest - ✓ Connected -
Start Claude Code. Ensure that you authenticate with Claude by following the prompts.
claude -
We recommend adding an Agent Skill to enable Claude to use kubeconfig files retrieved with
read_cluster_kubeconfigto access clusters.Issue the following command to create the
CLAUDE.mdfile on your machine if it does not exist.touch ~/.claude/CLAUDE.mdOpen the file in your preferred editor and paste the following snippet into it. Replace the
<local-path>placeholder with a directory where you want to store kubeconfig files.# Palette MCP Server
The Palette MCP server is a tool that you can use to interact with the Palette platform and its API. The MCP server is active as a container or a native binary and is accessible via the MCP protocol. A few things to keep in mind:
- When you retrieve a cluster kubeconfig with the `read_cluster_kubeconfig` tool, save the file to a local directory on your machine located at `<local-path>/kubeconfig`.
Set the KUBECONFIG environment variable to the local filesystem path or use the `kubectl` command with the `--kubeconfig` flag, but ensure the path is correct.
You can now use the Palette MCP server with Claude Code.
Validation
-
Start Claude Code in a terminal. Ensure that you authenticate with Claude by following the prompts.
claudeExample OutputWelcome to Claude Code
› -
Send a query about your Palette environment to check if your MCP server is connected to Palette.
For example, you can ask "How many clusters do I have in Palette?" to learn more about your Palette clusters.
Example Output⏺ palette - read_clusters (MCP)(filters: { states: ["Running"] })
⏺ You have 1 active cluster in Palette.
┌──────────────────┬───────┬─────────┬─────────┬──────────────┐
│ Name │ Cloud │ State │ Health │ Location │
├──────────────────┼───────┼─────────┼─────────┼──────────────┤
│ aws-cluster-test │ AWS │ Running │ Healthy │ Virginia, US │
└──────────────────┴───────┴─────────┴─────────┴──────────────┘
It was created on 2026-03-17 and is owned by test-user. It has 2 machine pools (1 control plane node + 1 worker node).
Next Steps
Refer to the Palette MCP Server Operations page for further examples on how to leverage the functionality of the MCP server.