Gemini CLI
{
"mcpServers": {
"smartpdf": {
"httpUrl": "https://mcp.smartpdf.ru/mcp",
"headers": {
"Authorization": "Bearer ${SMARTPDF_API_KEY}"
}
}
}
}- httpUrl is the Streamable HTTP transport; the gemini mcp add command writes the same as url together with "type": "http".
- Gemini CLI connects MCP servers only in trusted folders — allow it on the first run.
- To check, run gemini mcp list: smartpdf ✓ Connected.
The file is ~/.gemini/settings.json (or .gemini/settings.json in the project). httpUrl is the Streamable HTTP transport; if you use url, add "type": "http" — that’s what the gemini mcp add command does. Gemini CLI replaces ${SMARTPDF_API_KEY} with the value of the environment variable.
Gemini CLI connects MCP servers only in trusted folders: grant trust when you first run it in the project folder.
Or with a command:
gemini mcp add --transport http --scope user \
--header "Authorization: Bearer $SMARTPDF_API_KEY" smartpdf https://mcp.smartpdf.ru/mcpIn this case, the key is written to the settings as is.