# Ai Optimizer

> Ai Optimizer is an open-source MCP server. MCP server that cuts AI coding agent token usage via framework-aware context optimization. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Repository:** https://github.com/shivam-app-developers/ai-optimizer
- **MCP Registry name:** io.github.shivam-app-developers/ai-optimizer
- **Listing updated:** 2026-11-13

## About

MCP server that cuts AI coding agent token usage via framework-aware context optimization

## Install

### Claude Code (Terminal)

```sh
claude mcp add ai-optimizer --env AI_OPTIMIZER_LICENSE='<AI_OPTIMIZER_LICENSE>' -- npx -y @ai-optimizer/core
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "ai-optimizer": {
      "command": "npx",
      "args": [
        "-y",
        "@ai-optimizer/core"
      ],
      "env": {
        "AI_OPTIMIZER_LICENSE": "<AI_OPTIMIZER_LICENSE>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "ai-optimizer": {
      "command": "npx",
      "args": [
        "-y",
        "@ai-optimizer/core"
      ],
      "env": {
        "AI_OPTIMIZER_LICENSE": "<AI_OPTIMIZER_LICENSE>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "ai-optimizer": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@ai-optimizer/core"
      ],
      "env": {
        "AI_OPTIMIZER_LICENSE": "<AI_OPTIMIZER_LICENSE>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "ai-optimizer": {
      "command": "npx",
      "args": [
        "-y",
        "@ai-optimizer/core"
      ],
      "env": {
        "AI_OPTIMIZER_LICENSE": "<AI_OPTIMIZER_LICENSE>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "ai-optimizer": {
      "command": "npx",
      "args": [
        "-y",
        "@ai-optimizer/core"
      ],
      "env": {
        "AI_OPTIMIZER_LICENSE": "<AI_OPTIMIZER_LICENSE>"
      }
    }
  }
}
```

## FAQ

### Is Ai Optimizer free?

Yes. Ai Optimizer is open source, so you can use and self-host it for free.

### How do I add Ai Optimizer to Claude Code?

Run this command in your terminal: claude mcp add ai-optimizer --env AI_OPTIMIZER_LICENSE='<AI_OPTIMIZER_LICENSE>' -- npx -y @ai-optimizer/core

## Where this comes from

- Description: from the official MCP Registry entry.
- Install steps: from the official MCP Registry entry.

---
Source: https://ai-powered.com/mcp/ai-optimizer
