Paste an error to match it against the wiki. / 粘贴报错后自动匹配。
Error text / 报错原文
DISCONNECTEDServer is not connected or has errorsmcp-oauth-tokens.json
What it means
Gemini CLI registered an MCP server, but the server is not usable for tool calls.
Most common causes
- OAuth token in ~/.gemini/mcp-oauth-tokens.json is stale
- Server command cannot start from the CLI environment
- Dynamic OAuth discovery failed
- Server crashed after initialization
Fastest fix
- List MCP server status and identify the disconnected entry
- Run the server command directly
- Reauthenticate the affected MCP server
- Check whether the command path is absolute
Safe fix
- Pin local server package versions
- Store OAuth tokens only in the CLI-managed token store
- Use least-privilege scopes
- Keep MCP logs out of public issues if they contain secrets
What not to do
- Do not edit OAuth token JSON by hand unless backing it up first
- Do not expose tokens in screenshots
- Do not add global servers you do not need
How to confirm the fix
Run the smallest reproducible command first, then retry the agent task only after authentication, quota, and tool discovery are stable.
gemini mcp list node --version ls ~/.gemini
Related errors
- MCP servers failed to connect - Claude Code →
- Error calling initialize: EOF - Antigravity MCP →
- 401 / 403 PERMISSION_DENIED - Gemini CLI authentication errors →
- 429 Too Many Requests / quota exceeded - Gemini CLI →
- MCP server slow to connect - GitHub Copilot coding agent →
- MCP server crashed unexpectedly →