# slm-gate MCP server

> Reduces cloud LLM token costs by using local small language models to distill and shrink tool outputs before they are sent to the provider.

- Repository: https://github.com/zenithfoundry/slm-gate
- Page: https://hostedmcp.org/servers/zenithfoundry/slm-gate
- Transport: stdio
- Stars: 3
- License: MIT

## Install

### Claude Code

```sh
claude mcp add slm-gate -- npx -y @zenithfoundry/slm-gate
```

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

```json
{
  "mcpServers": {
    "slm-gate": {
      "command": "npx",
      "args": [
        "-y",
        "@zenithfoundry/slm-gate"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "slm-gate": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@zenithfoundry/slm-gate"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"slm-gate","type":"stdio","command":"npx","args":["-y","@zenithfoundry/slm-gate"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "slm-gate": {
      "command": "npx",
      "args": [
        "-y",
        "@zenithfoundry/slm-gate"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add slm-gate -- npx -y @zenithfoundry/slm-gate
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.slm-gate]
command = "npx"
args = ["-y", "@zenithfoundry/slm-gate"]
```

### Gemini CLI

```sh
gemini mcp add -s user slm-gate npx -- -y @zenithfoundry/slm-gate
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "slm-gate": {
      "command": "npx",
      "args": [
        "-y",
        "@zenithfoundry/slm-gate"
      ]
    }
  }
}
```

## FAQ

### Does slm-gate answer prompts itself?

No, it never answers a prompt itself; every request still goes to the provider your tool uses with your own login.

### What happens if the local model fails?

If a local model fails or runs out of time, the text it was working on is sent as it was without being shrunk.

### Does it store my conversation text?

No, the local ledger only records token counts, routes, and timings, but never the actual text.
