Connettere Gemini CLI a Performance Hub
In questa pagina
Istruzioni aggiornate al 26 novembre 2026 (AEST). Il supporto MCP del produttore cambia frequentemente, verifica con le fonti collegate se qualcosa appare diverso.
Gemini CLI archivia i server MCP in settings.json e può aggiungere un server Streamable HTTP remoto con gemini mcp add.
Dettagli del server
https://app.performancehub.co/mcp
Aggiungere con la CLI
export PH_MCP_API_KEY='<YOUR_TOKEN>'
gemini mcp add --scope user --transport http \
--header "Authorization: Bearer ${PH_MCP_API_KEY}" \
performance-hub https://app.performancehub.co/mcp
--transport httpseleziona Streamable HTTP.--scope userscrive in~/.gemini/settings.json(tutti i progetti). L'ambito predefinito è il progetto (.gemini/settings.json).
Intestazione alternativa:
gemini mcp add --scope user --transport http \
--header "x-mcp-api-key: ${PH_MCP_API_KEY}" \
performance-hub https://app.performancehub.co/mcp
Struttura di settings.json
{
"mcpServers": {
"performance-hub": {
"httpUrl": "https://app.performancehub.co/mcp",
"headers": {
"Authorization": "Bearer $PH_MCP_API_KEY"
}
}
}
}
Gemini CLI sceglie il trasporto in base alla chiave: httpUrl per Streamable HTTP, url per SSE legacy, command per stdio. Usa httpUrl per Performance Hub.
Opzione OAuth
Per i server che pubblicizzano OAuth, puoi omettere le intestazioni e lasciare che Gemini CLI rilevi e completi il flusso al primo utilizzo.
Verifica
gemini mcp list
Avvia Gemini CLI e chiedi di elencare gli strumenti di Performance Hub disponibili per il tuo account.
Fonti
- Gemini CLI - Server MCP: https://geminicli.com/docs/tools/mcp-server/
- Documentazione sorgente di Gemini CLI: https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md
- Performance Hub MCP: https://app.performancehub.co/mcp