Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inspector not loading local variables #83

Open
tech4life87 opened this issue Nov 26, 2024 · 7 comments
Open

Inspector not loading local variables #83

tech4life87 opened this issue Nov 26, 2024 · 7 comments

Comments

@tech4life87
Copy link

I been using inspector since yesterday with no issue. Had an update and now getting this error while not loading variables
@modelcontextprotocol/inspector@0.2.3
node version: 20.12.1

index-k3fLs7fd.js:185 
GET http://localhost:3000/config net::ERR_CONNECTION_REFUSED
(anonymous) @ index-k3fLs7fd.js:185
Ra @ index-k3fLs7fd.js:40
no @ index-k3fLs7fd.js:40
zf @ index-k3fLs7fd.js:40
tr @ index-k3fLs7fd.js:38
Dx @ index-k3fLs7fd.js:40
cr @ index-k3fLs7fd.js:40
_h @ index-k3fLs7fd.js:40
k @ index-k3fLs7fd.js:25
M @ index-k3fLs7fd.js:25
index-k3fLs7fd.js:185 Error fetching default environment: TypeError: Failed to fetch
    at index-k3fLs7fd.js:185:32453
    at Ra (index-k3fLs7fd.js:40:24263)
    at no (index-k3fLs7fd.js:40:42318)
    at zf (index-k3fLs7fd.js:40:36565)
    at tr (index-k3fLs7fd.js:38:3274)
    at Dx (index-k3fLs7fd.js:40:41221)
    at cr (index-k3fLs7fd.js:40:40215)
    at _h (index-k3fLs7fd.js:40:35675)
    at k (index-k3fLs7fd.js:25:1554)
    at MessagePort.M (index-k3fLs7fd.js:25:1919)
@ashwin-ant
Copy link
Member

Can you share the command that you're using to start the inspector?

@tech4life87
Copy link
Author

Can you share the command that you're using to start the inspector?
The default command generated from create-mcp-server command.
npx @modelcontextprotocol/inspector uv --directory /Users/user/s3-mcp-server run s3-mcp-server
as a workaround I am just reverting to previous version with
npx @modelcontextprotocol/inspector@0.2.2 uv --directory /Users/user/s3-mcp-server run s3-mcp-server

@ashwin-ant
Copy link
Member

Are you able to run any of the example servers? Launching with this command works fine for me, for example:

npx @modelcontextprotocol/inspector uvx mcp-server-git

@jacksteamdev
Copy link
Contributor

@ashwin-ant I'm experiencing this issue in some contexts. It depends on where and how I run the command. Unfortunately, I haven't been able to create a minimal reproduction.

The app created by npx @modelcontextprotocol/create-server works out of the box, but the inspector has quit working for a local project I've been working on.

In this screenshot, the inspector is trying to fetch from localhost:3000, but lsof -i :3000 shows no process is running on port 3000:
image

@jspahrsummers
Copy link
Member

Could you try running the inspector by cloning this repository and then using npm run dev? That should give a better trace for any errors that occur.

@jacksteamdev
Copy link
Contributor

This is a spawn error in my case. I still can't reproduce it reliably, but using npm run dev showed that at one point, spawn was throwing an ENOENT for the executable (in my case, bun, which looked like it should have been in the logged PATH).

Changing the command to the result of which bun got things working for me.

It would be nice to expose spawn errors in the inspector.

@ashwin-ant
Copy link
Member

ashwin-ant commented Nov 29, 2024

@jacksteamdev @tech4life87 we just released 0.2.7, which should address the issue. In particular it addresses a regression where the server would crash if there was an argument passed on the command line in the --arg format. If that's the issue you were seeing, can you try running against latest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants