# Connect Cheaper Inference MCP

Add the Streamable HTTP endpoint at `https://api.cheaperinference.com/mcp`.

## Browser sign-in

In Codex, run:

```sh
codex mcp add cheaper-inference --url https://api.cheaperinference.com/mcp
codex mcp login cheaper-inference
```

In Claude Code, add the server with `claude mcp add --transport http cheaper-inference https://api.cheaperinference.com/mcp`, then select the server in `/mcp` to authenticate. In Cursor and VS Code, add the HTTP endpoint in MCP settings and start authentication from the server entry.

Approve access on the Cheaper Inference page and return to your client. The client’s credential is listed under API keys in the approved workspace. It expires after 30 days and can be revoked there.

## API key mode

For a headless setup, configure a scoped API key through the client’s secret or environment settings. In Codex, use `bearer_token_env_var = "CHEAPER_INFERENCE_API_KEY"` in the server’s configuration. Clear any static credential from the server entry before switching to browser sign-in.

## Set up your application

Open the app in your coding tool and ask it to find the Cheaper Inference MCP integration guide for your SDK, make the smallest provider configuration change, and show the diff. OpenAI-compatible SDKs use `https://api.cheaperinference.com/v1`. Anthropic SDKs that append `/v1` use `https://api.cheaperinference.com`.

Set `CHEAPER_INFERENCE_API_KEY` in your local environment or host secret store. Use the onboarding API key for app requests and review the changes before running a paid request.
