# StormForge MCP server

> Configure the StormForge CLI MCP server and connect an AI agent to StormForge

---

LLMS index: [llms.txt](/llms.txt)

---

The StormForge CLI includes an MCP server for connecting AI agents to StormForge.

This page covers configuration and basic usage, using Claude as an example.

## Prerequisites

Make sure the [StormForge CLI is installed][install-cli] and you are logged in:
```shell
stormforge login
```

## Configure your AI agent

_This example uses Claude, but the configuration pattern applies to other MCP-compatible agents such as ChatGPT and Gemini._

Add the following to your agent's MCP configuration. For Claude, that can be `~/.claude.json`:
```json
{
  "mcpServers": {
    "stormforge": {
      "command": "stormforge",
      "args": ["mcp"]
    }
  }
}
```

<div class="alert alert-info" role="alert"><div class="h4 alert-heading" role="heading">StormForge CLI installation location</div>


If you installed the StormForge CLI in a custom location, you may need to provide an absolute path to the `stormforge` binary.
</div>


### Claude Code

If you are using Claude Code, you can add the StormForge MCP server directly from the command line:
```shell
claude mcp add stormforge -- stormforge mcp
```

## Example usage

Once connected, you can ask your agent questions about your workloads.

Example prompt:
```text
What are the top 3 most overprovisioned workloads across my clusters?
```

Example response:
```text
The top 3 are:

  ┌──────┬──────────────┬───────────────┬───────────┬─────────────────┐
  │ Rank │   Workload   │   Namespace   │  Cluster  │ Monthly Savings │
  ├──────┼──────────────┼───────────────┼───────────┼─────────────────┤
  │ 1    │ <workload-1> │ <namespace-1> │ <cluster> │ $38.08          │
  ├──────┼──────────────┼───────────────┼───────────┼─────────────────┤
  │ 2    │ <workload-2> │ <namespace-2> │ <cluster> │ $21.98          │
  ├──────┼──────────────┼───────────────┼───────────┼─────────────────┤
  │ 3    │ <workload-3> │ <namespace-2> │ <cluster> │ $16.92          │
  └──────┴──────────────┴───────────────┴───────────┴─────────────────┘

  All three are on <cluster>. Notable details:
  - <workload-1>: CPU can be cut from 1000m → 25m (97% reduction)
  - <workload-2>: Memory can be cut from 1Gi → 32Mi (97% reduction)
  - <workload-3>: Both CPU (1000m → 224m) and memory (1Gi → 364Mi) are significantly oversized
```

Your agent can use the following StormForge MCP tools:
- `list_clusters`
- `list_namespaces`
- `list_workloads`
- `list_workloads_minimal`
- `list_recommendations`

## Related topics

- [Claude Code MCP configuration documentation][claude-mcp]

[claude-mcp]: https://code.claude.com/docs/en/mcp
[install-cli]: /docs/stormforge-cli/#install
