You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Performance: Resolve slow startup time (8-12 seconds) for Gemini CLI when using slow MCP servers #4544
When I launch the gemini-cli from my terminal, there is a significant delay of approximately 8 to 12 seconds before the tool becomes responsive and ready for use. This happens every time I start the application.
OS: [ x64 Windows 11, version 24H2]
Terminal: [cmd]
gemini-cli version: [v0.1.13]
2025-07-20.182430.mp4
What did you expect to happen?
I expected the command-line interface to launch almost instantly, or at least with a much shorter delay (e.g., under 2 seconds). A quick startup is typical for most CLI tools and would lead to a more fluid and efficient user experience.
Client information
Details
$ gemini /about
# paste output here
Proposed solution
Proposed feature to solve this:
Stop MCP server init from blocking startup but continue to have it block submission of first prompt sent to Gemini CLI that talks to the model.
Do not have MCP server init block tool calls to recognized tools. Tool calls to unknown tools should ideally wait until the MCP servers are initialized so the full list of MCP tools is known.
When we are waiting after submitting a prompt due to slow MCP server startup, the status message should show "Waiting for MCP servers to load..." rather than a clever phrase.
Do not block UI startup reading folders at startup. Same as for MCP, reading folders should not block typing in the input prompt but the first input prompt should not get sent to the model until all folders are read.
Running the /mcp command should show the current status of mcp server loading if MCP servers are being initialized. Ideally it would show as a dialog that updated as the MCP servers loaded but it would be acceptable if it just showed the current state and surfaced a message in the chat once all tools loaded.
Reacted by Jiun Lee, Alper, Lukas, Jacob Richman, Grisha Egorov, Brazz, Suraj Banakar(बानकर) | スラジ, Kyle Johnsen, ARPO35, Charles Neau and 3 more
Many MCPs that call home. Today I decided to remove half of the lot for the same reason. The worst on mobile (slow) connections. Check for the npx ones that use online servers.
We should not be blocking startup while MCP servers initialize. MCP servers should be initialized in the background. For discussion: should we block issuing prompts in Gemini CLI while MCP servers initialize.
changed the title [-]Performance: Resolve slow startup time (8-12 seconds) for Gemini CLI[/-][+]Performance: Resolve slow startup time (8-12 seconds) for Gemini CLI when using slow MCP servers[/+]on Aug 28, 2025
One question, which is also related to adding support for tool update notifications:
Do we know how tool definitions affect input token caching? Presumably, they might completely invalidate the cache causing the next request to be more expensive once the MCP tools are loaded?
If this is the case, is this something we should try and optimize around or just accept it? Most likely, the context won't be super large by the time the MCP servers do load anyways, so the cost of invalidating the context should hopefully be small. One exception would be if somebody resumes a previous chat that already has lots of context.
Oh, I missed the part about blocking the first prompt until the tools are all loaded. That would resolve the issue around context cache churn (although it's worth chatting about when we go to implement tool list updates).
Just to add some more context to the benchmarks: I have used hyperfine on a macOs Tahoe with wezterm and have measure the following:
hyperfine -i gemini
Benchmark 1: gemini
Time (mean ± σ): 34.091 s ± 94.840 s [User: 2.040 s, System: 0.578 s]
Range (min … max): 3.385 s … 303.987 s 10 runs
for the first measurement, and
❯ hyperfine -i gemini
Benchmark 1: gemini
Time (mean ± σ): 5.260 s ± 5.119 s [User: 2.290 s, System: 0.665 s]
Range (min … max): 3.296 s … 19.799 s 10 runs
Warning: The first benchmarking run for this command was significantly slower than the rest (19.799 s). This could be caused by (filesystem) caches that were not filled until after the first run. You should consider using the '--warmup' option to fill those caches before the actual benchmark. Alternatively, use the '--prepare' option to clear the caches before each timing run.
for the second; notice the warning that the first runs take longer, which is in line with the experience that after starting up gemini a few times, the start-up is much faster. Probably some caching that takes much longer to initialise in the beginning (namely, it is the caching and loading mechanism that needs to be fixed).
No mcp servers are configured, which excludes anything in that direction.
To be clear, this issue was specifically about MCP servers and not general slowness starting up. I believe that's being addressed elsewhere.
could you help and share what other relevant issues we might follow for such a topic? I have seen that the subject has indeed been addressed in some other discussions but it has always been shaken off as related to MCP, when on the other hand the general slow start-up is independent of them and still persists after many releases.
Same here. I have no MCP servers set up either and gemini still takes easily over one minute. Even gemini --help takes the same amount of time. codex and claude start up immediately in the same project and file system.
On my machine gemini has a creepingly slow startup time in WSL Linux Bash, in a native PowerShell the startup time isn't noticeable.
Activity
Manamama commentedon Jul 21, 2025
Many MCPs that call home. Today I decided to remove half of the lot for the same reason. The worst on mobile (slow) connections. Check for the
npxones that use online servers.helalsoft commentedon Aug 17, 2025
No MCP, still this slow.
jacob314 commentedon Aug 27, 2025
We should not be blocking startup while MCP servers initialize. MCP servers should be initialized in the background. For discussion: should we block issuing prompts in Gemini CLI while MCP servers initialize.
NTaylorMullen commentedon Aug 27, 2025
Goal here would be to bootup immediately but upon first prompt block if needed
jacob314 commentedon Aug 28, 2025
Moving this text to the main issue description for clarity.
6 remaining items
[-]Performance: Resolve slow startup time (8-12 seconds) for Gemini CLI[/-][+]Performance: Resolve slow startup time (8-12 seconds) for Gemini CLI when using slow MCP servers[/+]jakemac53 commentedon Aug 29, 2025
One question, which is also related to adding support for tool update notifications:
Do we know how tool definitions affect input token caching? Presumably, they might completely invalidate the cache causing the next request to be more expensive once the MCP tools are loaded?
If this is the case, is this something we should try and optimize around or just accept it? Most likely, the context won't be super large by the time the MCP servers do load anyways, so the cost of invalidating the context should hopefully be small. One exception would be if somebody resumes a previous chat that already has lots of context.
jakemac53 commentedon Aug 29, 2025
Oh, I missed the part about blocking the first prompt until the tools are all loaded. That would resolve the issue around context cache churn (although it's worth chatting about when we go to implement tool list updates).
scidomino commentedon Sep 2, 2025
One difficulty will be not breaking oauth support which currently assumes you're not operating in react.
gennaro-tedesco commentedon Oct 3, 2025
Just to add some more context to the benchmarks: I have used hyperfine on a macOs Tahoe with wezterm and have measure the following:
for the first measurement, and
for the second; notice the warning that the first runs take longer, which is in line with the experience that after starting up
geminia few times, the start-up is much faster. Probably some caching that takes much longer to initialise in the beginning (namely, it is the caching and loading mechanism that needs to be fixed).No mcp servers are configured, which excludes anything in that direction.
scidomino commentedon Oct 3, 2025
To be clear, this issue was specifically about MCP servers and not general slowness starting up. I believe that's being addressed elsewhere.
gennaro-tedesco commentedon Nov 2, 2025
could you help and share what other relevant issues we might follow for such a topic? I have seen that the subject has indeed been addressed in some other discussions but it has always been shaken off as related to MCP, when on the other hand the general slow start-up is independent of them and still persists after many releases.
sascharo commentedon Dec 15, 2025
Same here. I have no MCP servers set up either and
geministill takes easily over one minute. Evengemini --helptakes the same amount of time.codexandclaudestart up immediately in the same project and file system.On my machine
geminihas a creepingly slow startup time in WSL Linux Bash, in a native PowerShell the startup time isn't noticeable.scidomino commentedon Dec 15, 2025
@sascharo please open a new bug for WSL.
sascharo commentedon Dec 16, 2025
#15140
Super1Windcloud commentedon Dec 29, 2025
HumanBot000 commentedon Feb 21, 2026
Same issue, easily a minute startup time