# Codex CLI and Gemini CLI

> Add Sinapsi to OpenAI Codex CLI and Google Gemini CLI, for public wikis and private spaces.

Source: https://sinapsi.wiki/docs/codex-gemini/

## OpenAI Codex CLI

Public wikis:

```bash
codex mcp add sinapsi --url https://sinapsi.wiki/mcp/hub/
```

Private spaces — Codex reads the token from an environment variable:

```bash
export SINAPSI_TOKEN="YOUR_TOKEN"   # add this line to ~/.bashrc or ~/.zshrc too
codex mcp add sinapsi --url https://sinapsi.wiki/mcp/ --bearer-token-env-var SINAPSI_TOKEN
```

Check with `/mcp` inside Codex.

## Gemini CLI

```bash
gemini mcp add --transport http sinapsi https://sinapsi.wiki/mcp/ --header "Authorization: Bearer YOUR_TOKEN"
```

In `settings.json` the URL key is `httpUrl`, not `url`. For public wikis use `https://sinapsi.wiki/mcp/hub/` without the header.
