MCP Configuration
Configure MCP (Model Context Protocol) in Atmos — both the Atmos MCP server (for external AI clients to connect to Atmos) and external MCP server connections (for Atmos to connect to external servers like AWS MCP).
Overview
Atmos MCP has two sides:
| Feature | What It Does | Config Key |
|---|---|---|
| MCP Server | Exposes Atmos AI tools to external clients (Claude Desktop, Claude Code, VS Code) | mcp.enabled |
| MCP Server Connections | Connects Atmos to external MCP servers (AWS, GCP, custom) | mcp.servers |
Quick Start
atmos.yaml
MCP Server Configuration
The Atmos MCP server exposes Atmos AI tools via the Model Context Protocol. It must be explicitly enabled separately from AI features, since it opens a communication channel that external clients can connect to.
Settings
mcp.enabled- Enable the Atmos MCP server (default:
false). Must be set totruebeforeatmos mcp startwill work.
The MCP server is disabled by default. Enabling AI features (ai.enabled: true) does not enable MCP. The default stdio transport runs as a local subprocess with no network exposure.
Tool Settings
The MCP server exposes all tools configured in ai.tools. See AI Tools Configuration for the full reference including allowed_tools, blocked_tools, and require_confirmation.
External MCP Server Connections
Connect Atmos to external MCP servers so their tools are available in atmos ai chat, atmos ai ask, and atmos ai exec.
Server Configuration
Each server under mcp.servers follows the standard MCP server format used by Claude Code, Codex CLI, and Gemini CLI. Atmos adds extensions for descriptions, auth, and timeouts.
atmos.yaml
Standard Fields
These fields are compatible with the mcpServers JSON format used by Claude Code, Codex CLI, and Gemini CLI:
command- Required. The command to run the MCP server (e.g.,
uvx,npx, or an absolute path to a binary). args- Arguments passed to the command. Typically the package name and version (e.g.,
awslabs.aws-pricing-mcp-server@latest). env- Environment variables passed to the server subprocess. Supports YAML functions like
!envand!exec.
Atmos Extensions
description- Human-readable description shown in
atmos mcp listandatmos mcp status. identity- Name of an Atmos Auth identity (from the
authsection) to use for credential injection. When set, Atmos authenticates through the identity chain and injectsAWS_SHARED_CREDENTIALS_FILE,AWS_CONFIG_FILE,AWS_PROFILE, andAWS_REGIONinto the subprocess environment. auto_start- Start the server automatically when Atmos starts (default:
false). timeout- Connection timeout as a Go duration string (default:
30s). Examples:10s,1m,5m.
YAML Functions in Env Values
Atmos YAML functions work in env values, processed during config loading:
atmos.yaml
Auth Integration
For production use, configure Atmos Auth to automatically inject AWS credentials:
atmos.yaml
When identity is set, Atmos:
- Authenticates through the identity chain (SSO → role assumption)
- Writes isolated credential files to
~/.aws/atmos/<realm>/ - Injects
AWS_SHARED_CREDENTIALS_FILE,AWS_CONFIG_FILE,AWS_PROFILEinto the subprocess - The MCP server's AWS SDK picks up credentials automatically
Toolchain Integration
Map uv to the aqua registry and install via the Atmos Toolchain:
atmos.yaml
atmos toolchain install astral-sh/uv@0.7.12
CLI Provider MCP Pass-Through
When using a CLI provider (claude-code, codex-cli, gemini-cli), MCP servers are passed directly to the CLI tool instead of being managed by Atmos. Smart routing is skipped — all configured servers are passed and the AI model decides which to use.
| CLI Provider | Config Delivery | Notes |
|---|---|---|
| Claude Code | --mcp-config temp file | Full support |
| Codex CLI | ~/.codex/config.toml (backup/restore) | ATMOS_* env vars injected |
| Gemini CLI | .gemini/settings.json in cwd (backup/restore) | MCP blocked for personal Google accounts |
For CLI providers, ATMOS_PROFILE must be exported in your shell for auth-requiring MCP servers to work:
export ATMOS_PROFILE=managers
atmos ai ask "What did we spend on EC2?"
Smart Routing
When multiple MCP servers are configured, Atmos automatically selects only the servers relevant to your question before starting them. This keeps tool payloads small and responses fast.
atmos.yaml
routing.enabled- Enable automatic server routing (default:
true). When enabled, Atmos sends the question and server descriptions to the AI provider, which returns which servers are relevant. Only those servers are started.
Use --mcp on any AI command to bypass routing and specify servers directly:
atmos ai ask --mcp aws-iam "List all admin roles"
atmos ai ask --mcp aws-iam,aws-cloudtrail "Who accessed the admin role?"
atmos ai chat --mcp aws-billing
Example: AWS MCP Servers
atmos.yaml
Related Commands
📄️ atmos mcp start
Start the Atmos MCP server
📄️ atmos mcp list
List configured external MCP servers
📄️ atmos mcp tools
List tools from an MCP server
📄️ atmos mcp test
Test MCP server connectivity
📄️ atmos mcp status
Show all server statuses
📄️ atmos mcp restart
Restart an MCP server
📄️ atmos mcp export
Export .mcp.json for IDE integration