langflow icon indicating copy to clipboard operation
langflow copied to clipboard

MCP Tools - Error updating tool list

Open HiltonRosenfeld opened this issue 1 year ago • 13 comments

Bug Description

When I use the MCP Tools component in a flow, the list of available tools does not work. I can select the MCP server that I want to use (in this case, it is a Langflow MCP Server), but after selecting the MCP Server the Tools control displays an error message "Error on MCP Server"

Image

Reproduction

Steps:

  1. Install a new instance of Langflow uv pip install langflow
  2. Create a new Project named MCP Server (to host the MCP Server)
  3. Create a new flow named echo in the project 'MCP Server'
  4. Drop a Chat Input and Chat Output into the flow. Wire them up to echo the input
  5. Copy the JSON config for this MCP Server from the MCP Server tab in the MCP Server project
  6. Generate an API Key
  7. Navigate to Langflow Settings -> MCP Servers
  8. Create a new MCP Server, paste in the JSON config and the API key
  9. Navigate to the Starter Project folder
  10. Create a new flow
  11. Drop the MCP Tools component
  12. Select the MCP Server that was created in step 8.

Expected behavior

The MCP Tools component should enumerate the available tools on the MCP server.

Who can help?

No response

Operating System

MacOS 15.5

Langflow Version

1.5.0.post1

Python Version

3.12

Screenshot

No response

Flow File

Echo.json MCP Client.json

HiltonRosenfeld avatar Jul 18 '25 02:07 HiltonRosenfeld

This is the error message on the terminal where I am running Langflow:

[07/18/25 12:57:11] INFO 2025-07-18 12:57:11 - INFO - util - Successfully loaded 1 tools from MCP server util.py:1255 'lf_mcp_server'
[07/18/25 12:57:15] ERROR 2025-07-18 12:57:14 - ERROR - - Error updating tool list: 400: Super user :257 hasn't been created

fastapi.exceptions.HTTPException: 400: Super user hasn't been created

                         ╭─────────────── Traceback (most recent call last)  ────────╮             
                         │ in update_tool_list:206                                                            │             
                         │                                                                                    │             
                         │ /Users/hiltonrosenfield/Development/DataStax/Langflow/.venv/lib/python3.12/site-pa │             
                         │ ckages/langflow/services/auth/utils.py:314 in create_user_longterm_token           │             
                         │                                                                                    │             
                         │   311 │   username = settings_service.auth_settings.SUPERUSER                      │             
                         │   312 │   super_user = await get_user_by_username(db, username)                    │             
                         │   313 │   if not super_user:                                                       │             
                         │ ❱ 314 │   │   raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail= │             
                         │       hasn't been created")                                                        │             
                         │   315 │   access_token_expires_longterm = timedelta(days=365)                      │             
                         │   316 │   access_token = create_token(                                             │             
                         │   317 │   │   data={"sub": str(super_user.id), "type": "access"},                  │             
                        ╰─────────────────────────╯             
                         HTTPException: 400: Super user hasn't been created         

HiltonRosenfeld avatar Jul 18 '25 02:07 HiltonRosenfeld

I am also facing the same issue when upgrading my langflow-ide chart in kubernetes cluster with 1.5.0 image. please help

dushyants avatar Jul 18 '25 04:07 dushyants

I am facing the same issue. Under tool mode it says "error loading actions"

PeterHuo201 avatar Jul 18 '25 13:07 PeterHuo201

Please fix this!

daniel-quiroga avatar Jul 18 '25 13:07 daniel-quiroga

Same issue as well.

fbeawels avatar Jul 18 '25 13:07 fbeawels

Please fix this!

smarthomeblack avatar Jul 18 '25 21:07 smarthomeblack

Please fix this!

shell-nlp avatar Jul 19 '25 11:07 shell-nlp

please fix!!

cpb-cbb avatar Jul 24 '25 04:07 cpb-cbb

Please fix this!

FILM6912 avatar Jul 27 '25 09:07 FILM6912

use "langflow" as your superuser name can solve this ques , but other account which is not "langflow" still can not run

cpb-cbb avatar Jul 28 '25 01:07 cpb-cbb

+1

haihh05 avatar Jul 29 '25 16:07 haihh05

@edwinjosechittilappilly Has a fix for this and will be released in v1.6

jordanrfrazier avatar Sep 09 '25 13:09 jordanrfrazier

Can confirm that this is now fixed.

HiltonRosenfeld avatar Oct 07 '25 02:10 HiltonRosenfeld