Skip to content

bug: MCP Inspector not connecting to weather tool #72

Closed

Description

@msteinder

Describe the bug

After importing weather tool and selecting "Connect with MCP Inspector", the inspector window opens. When I click "Connect" this error show up: Error Connecting to MCP Inspector Proxy - Check Console logs. There are no errors in mcp-inspector pod logs.

Steps To Reproduce

As above.

Expected Behavior

Inspector should be connecting and giving me the page to list tools.

Additional Context

No response

Activity

  1. pdettori commented on Jul 17, 2025

    @pdettori
    Member

    Is the installer the latest from main? I discovered that mcp inspector uses two different ports, one for the ui and one for the proxy. When connecting to a Mcp server, the UI delegates all to the proxy, so request like list tools etc, go to the proxy port. I had this issue when I was not exposing the proxy port in the container, in a service and in the HTTPRoute. This was addressed later last week so you may still have a previous version of deployment for inspector? Check if you see a match in what you have deployed with https://github.com/kagenti/kagenti/blob/main/kagenti/installer/app/resources/mcp-inspector.yaml or more simply make sure to pull latest main and re-run the installer to apply any delta (if any)

  2. msteinder commented on Jul 17, 2025

    @msteinder
    MemberAuthor

    I have a fresh install. Newborn today.

  3. pdettori commented on Jul 17, 2025

    @pdettori
    Member

    Ok - you may not see a log because the ui simply redirects to the proxy and if there is no connection to proxy it will show that error … needs some debugging to ensure connectivity for proxy from outside cluster (httproute -> service -> proxy port)

  4. cwiklik commented on Jul 18, 2025

    @cwiklik
    Contributor

    In Chrome Dev tools I see:

    Image
  5. cwiklik commented on Jul 25, 2025

    @cwiklik
    Contributor

    @pdettori when you set up the mcp-inspector did you port-forward or did something special? Hai found an issue in mcp-inspector github which matches what I see: modelcontextprotocol/inspector#484

    With port-forward the mcp-inspector works fine:
    kubectl -n kagenti-system port-forward deployments/mcp-inspector 6274:6274 6277:6277

    So this is a workaround until better solution is found.

  6. pdettori commented on Jul 26, 2025

    @pdettori
    Member

    I did not use port forward - I was able to make it work with the Istio ingress gateway - a service with 2 ports and 2 http routes - one for the ui and one for the proxy.

  7. cwiklik commented on Jul 27, 2025

    @cwiklik
    Contributor

    I just could not get this to work. I do see both http routes yet the inspector is failing. So this part of the demo is broken. So temporary fix is the port-forward until a fix is made. Users begin to play with kagenti and its better to have a workaround for now.

  8. pdettori commented on Jul 28, 2025

    @pdettori
    Member

    I think I have found the problem - there is a missing env variable in https://github.com/kagenti/kagenti/blob/e7dc3134d938e0733a56041a3ce0df2d7bb41482/kagenti/installer/app/resources/mcp-inspector.yaml#L29

    The env variable ‘ MCP_PROXY_FULL_ADDRESS’ needs to be set to the value of the address specified in the http route for the proxy so that the redirect from the ui works correctly - that value is set in https://github.com/kagenti/kagenti/blob/e7dc3134d938e0733a56041a3ce0df2d7bb41482/kagenti/installer/app/resources/mcp-inspector.yaml#L88

  9. cwiklik commented on Jul 28, 2025

    @cwiklik
    Contributor

    Tried the above but no cigar. I've checked the pod to make sure the new env var is there:

     - env:
          - name: MCP_PROXY_FULL_ADDRESS
            value: mcp-proxy.localtest.me
          - name: DANGEROUSLY_OMIT_AUTH
            value: "true"
          - name: ALLOWED_ORIGINS
            value: http://mcp-inspector.localtest.me:8080,*
          - name: HOST
            value: 0.0.0.0
    

    Same error as before: Failed to load resource: net::ERR_CONNECTION_REFUSED

  10. pdettori commented on Jul 28, 2025

    @pdettori
    Member

    Needs the full address with http:// and port 8080

  11. cwiklik commented on Jul 28, 2025

    @cwiklik
    Contributor
  12. added theissue type on Aug 4, 2025
  13. pdettori commented on Aug 20, 2025

    @pdettori
    Member

    @cwiklik do you still see this problem ? I did a fresh install with the latest kagenti and it works for me

    Image
  14. cwiklik commented on Aug 20, 2025

    @cwiklik
    Contributor

    @pdettori with the latest, I continue to have the same problem if I dont do port-forward

    Image
  15. added
    bug
    on Aug 25, 2025
  16. removed theissue type on Aug 25, 2025
  17. added theissue type on Aug 25, 2025
  18. evaline-ju commented on Sep 15, 2025

    @evaline-ju
    Contributor

    I'm also still observing this with the additions of the suggested env vars (also whether with 0.15.0 or latest 0.16.7 inspector image version). I tried a few small changes like changing the service from clusterIP->nodePort and trying out those ports and replacing parts in the MCP_PROXY_FULL_ADDRESS parts but it seems that did not make a difference. The proxy (6277) still has to be particularly port-forwarded.

  19. pdettori commented on Sep 16, 2025

    @pdettori
    Member

    @evaline-ju thanks for your feedback. I am still mystified by this issue. It works on my Mac (without port forwarding) and I was even able to install kagenti on a RHEL 9 VM, where I can also get inspector to work w/o forwarding. Will try next on OpenShift once the PRs for OCP are ready.

  20. pdettori commented on Oct 3, 2025

    @pdettori
    Member

    I may have finally found the culprit. MCP_PROXY_FULL_ADDRESS is part of the configuration and not an environment variable as I initially thought, so it can only be set in the UI or passed as query parameter. It appears that configurations are persisted in the browser across sessions, so since I set this value once long ago in my UI it has been persisted since then. And it worked for different instances of Kagenti ! Working on a PR which will set this value as query parameter to the mcp inspector URL, which seems to set the value as well in the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions