gemini-cli - 💡(How to fix) Fix mcp bug (mobile-mcp) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#25228Fetched 2026-04-13 05:45:41
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Error Message

│ Error: ENAMETOOLONG: name too long, lstat '/home/vatsal1/example.com". │

RAW_BUFFERClick to expand / collapse

What happened?

Trying to do setup " gemini mcp add mobile-mcp npx -y @mobilenext/mobile-mcp@latest" ; and after i start the gemini cli , it shows this,

Xcode command line tools │ │ Android Platform Tools │ │ node.js v22+ │ │ MCP supported foundational models or agents, like Claude MCP, OpenAI Agent SDK, Copilot Studio │ │ Simulators, Emulators, and Real Devices │ │ When launched, Mobile MCP can connect to: │ │ │ │ iOS Simulators on macOS' │ │ Stack trace: │ │ Error: ENAMETOOLONG: name too long, lstat '/home/vatsal1/example.com". │ │ More prompt examples can be found here. │ │ │ │ Prerequisites │ │ What you will need to connect MCP with your agent and mobile devices: │ │ │ │ Xcode command line tools ▄│ │ Android Platform Tools █│ │ node.js v22+ █│ │ MCP supported foundational models or agents, like Claude MCP, OpenAI Agent SDK, Copilot Studio █│ │ Simulators, Emulators, and Real Devices █│ │ When launched, Mobile MCP can connect to: █│ │ █│ │ iOS Simulators on macOS' █│ │ at Module.realpathSync (node:fs:2791:29) █│ │ at robustRealpath (file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/chunk-JS5WSGB2.js:41537:16) █│ │ at resolveToRealPath (file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/chunk-JS5WSGB2.js:41528:10) █│ │ at checkPermissions (file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/chunk-MODIYMRW.js:74042:30) █│ │ at file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:49073:37 █│ │ at file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:37593:7 █│ │ at Object.handleSubmit (file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:35127:9) █│ │ at file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:37642:20 █│ │ at file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/interactiveCli-25PTL36A.js:38175:13 █│ │ at file:///home/vatsal1/.npm-global/lib/node_modules/@google/gemini-cli/bundle/chunk-MODIYMRW.js:64327:15

What did you expect to happen?

just normal chat conversation to happen

Client information

  • CLI Version: 0.37.1
  • Git Commit: 3b2d4f100
  • Session ID: fc78ec2f-5d54-464a-a1ca-238d2e0dde86
  • Operating System: linux v22.22.2
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 291.7 MB
  • Terminal Name: VTE(8000)
  • Terminal Background: #e6f2f8
  • Kitty Keyboard Protocol: Unsupported

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

The error ENAMETOOLONG: name too long suggests that the issue might be related to a file path being too long, which is causing the gemini mcp add mobile-mcp setup to fail.

Guidance

  • The error message indicates a problem with the file path /home/vatsal1/example.com, which might be too long for the system to handle. Consider shortening the path or using a symbolic link to reduce the path length.
  • Check the file system and directory structure to ensure that there are no excessively long file names or paths that could be causing the issue.
  • Verify that the gemini mcp add mobile-mcp command is being run in the correct directory and that the necessary dependencies are installed and configured correctly.
  • Consider checking the documentation for the gemini mcp command to see if there are any specific requirements or restrictions on file paths or directory structures.

Example

No specific code example is available for this issue, as it appears to be related to a file system or configuration problem rather than a code-specific issue.

Notes

The exact cause of the issue is unclear, but it appears to be related to a file system or configuration problem. Further investigation and debugging may be necessary to determine the root cause and develop a complete solution.

Recommendation

Apply a workaround by shortening the file path or using a symbolic link to reduce the path length, as this is the most likely cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

gemini-cli - 💡(How to fix) Fix mcp bug (mobile-mcp) [1 comments, 2 participants]