amazon-q-developer-cli icon indicating copy to clipboard operation
amazon-q-developer-cli copied to clipboard

bug: My tool was not getting listed, Getting "Servers still loading"

Open charcharan opened this issue 7 months ago • 14 comments

Checks

Operating system

WIndows

Expected behaviour

My tool should get listed,

I configured mcp.json as { "mcpServers": { "ConfusingCalculator": { "command": "uv", "args": ["run", "/mnt/c/WorkFolder/Sample/MCP/weather/weather.py"], "transport": "stdio" } } }

And the server logs

DEBUG:mcp.server.lowlevel.server:Initializing server 'ConfusingCalculator' DEBUG:mcp.server.lowlevel.server:Registering handler for ListToolsRequest DEBUG:mcp.server.lowlevel.server:Registering handler for CallToolRequest DEBUG:mcp.server.lowlevel.server:Registering handler for ListResourcesRequest DEBUG:mcp.server.lowlevel.server:Registering handler for ReadResourceRequest DEBUG:mcp.server.lowlevel.server:Registering handler for PromptListRequest DEBUG:mcp.server.lowlevel.server:Registering handler for GetPromptRequest DEBUG:mcp.server.lowlevel.server:Registering handler for ListResourceTemplatesRequest INFO:__main__:Initializing MCP server... DEBUG:asyncio:Using selector: EpollSelector DEBUG:__main__:Registered tools: [Tool(name='add', description='Multiply two numbers together.', inputSchema={'properties': {'a': {'title': 'A', 'type': 'integer'}, 'b': {'title': 'B', 'type': 'integer'}}, 'required': ['a', 'b'], 'title': 'addArguments', 'type': 'object'}, annotations=None)] INFO:__main__:Starting MCP server with stdio transport... INFO:__main__:MCP server started successfully DEBUG:asyncio:Using selector: EpollSelector

Image

q version was

Image

Actual behaviour

My tool should get listed

Steps to reproduce

No response

charcharan avatar Jun 03 '25 13:06 charcharan

I configured Ubuntu subsystem, using wsl2

charcharan avatar Jun 03 '25 13:06 charcharan

I have the same issue with MCP servers loaded using uvx on MacOS 15.5. In addition CPU usage skyrockets to 300% indefinitely

raschiapedane avatar Jun 03 '25 14:06 raschiapedane

I'm having the same issue. MCP servers are configured either globally at ~/.aws/amazonq/mcp.json or within the workspace. Running q chat should show that it is initializing the MCP servers, and wait until these have finished loading before continuing. When you initially run q chat it says to run ctrl+c to bypass waiting for these to load, but it looks like it is skipping these by default even if you don't enter that:

❯ q chat
⠸ 0 of 1 mcp servers initialized. ctrl-c to start chatting now
❯ q chat
⚠ 0 of 1 mcp servers initialized. Servers still loading:
 - awslabscfn_mcp_server

    ⢠⣶⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⣿⣶⣦⡀⠀
 ⠀⠀⠀⣾⡿⢻⣿⡆⠀⠀⠀⢀⣄⡄⢀⣠⣤⣤⡀⢀⣠⣤⣤⡀⠀⠀⢀⣠⣤⣤⣤⣄⠀⠀⢀⣤⣤⣤⣤⣤⣤⡀⠀⠀⣀⣤⣤⣤⣀⠀⠀⠀⢠⣤⡀⣀⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⢠⣿⣿⠋⠀⠀⠀⠙⣿⣿⡆
 ⠀⠀⣼⣿⠇⠀⣿⣿⡄⠀⠀⢸⣿⣿⠛⠉⠻⣿⣿⠛⠉⠛⣿⣿⠀⠀⠘⠛⠉⠉⠻⣿⣧⠀⠈⠛⠛⠛⣻⣿⡿⠀⢀⣾⣿⠛⠉⠻⣿⣷⡀⠀⢸⣿⡟⠛⠉⢻⣿⣷⠀⠀⠀⠀⠀⠀⣼⣿⡏⠀⠀⠀⠀⠀⢸⣿⣿
 ⠀⢰⣿⣿⣤⣤⣼⣿⣷⠀⠀⢸⣿⣿⠀⠀⠀⣿⣿⠀⠀⠀⣿⣿⠀⠀⢀⣴⣶⣶⣶⣿⣿⠀⠀⠀⣠⣾⡿⠋⠀⠀⢸⣿⣿⠀⠀⠀⣿⣿⡇⠀⢸⣿⡇⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⢹⣿⣇⠀⠀⠀⠀⠀⢸⣿⡿
 ⢀⣿⣿⠋⠉⠉⠉⢻⣿⣇⠀⢸⣿⣿⠀⠀⠀⣿⣿⠀⠀⠀⣿⣿⠀⠀⣿⣿⡀⠀⣠⣿⣿⠀⢀⣴⣿⣋⣀⣀⣀⡀⠘⣿⣿⣄⣀⣠⣿⣿⠃⠀⢸⣿⡇⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠈⢿⣿⣦⣀⣀⣀⣴⣿⡿⠃
 ⠚⠛⠋⠀⠀⠀⠀⠘⠛⠛⠀⠘⠛⠛⠀⠀⠀⠛⠛⠀⠀⠀⠛⠛⠀⠀⠙⠻⠿⠟⠋⠛⠛⠀⠘⠛⠛⠛⠛⠛⠛⠃⠀⠈⠛⠿⠿⠿⠛⠁⠀⠀⠘⠛⠃⠀⠀⠘⠛⠛⠀⠀⠀⠀⠀⠀⠀⠀⠙⠛⠿⢿⣿⣿⣋⠀⠀
 ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠿⢿⡧

╭─────────────────────────────── Did you know? ────────────────────────────────╮
│                                                                              │
│         Use /model to select the model to use for this conversation          │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

/help all commands  •  ctrl + j new lines  •  ctrl + s fuzzy search
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🤖 You are chatting with claude-3.7-sonnet

My concern with the startup message is that it isn't clear if Q would be using any of the defined MCP servers or when they were actually "available" which can lead users to assume that it would be just using the LLM directly without any MCP servers. Not sure how recent of a recent change this was, but in some videos of people using Q CLI from about a month ago, by default it was waiting for all of the servers to be ready before proceeding.

I'd honestly prefer an option that takes longer to load but gives some sort of validation success message that the MCP servers are actually ready to use, as part of the initial start of the chat session. Even if it was with something like q chat --wait to wait until all servers have definitely been loaded before it continues. Related to this, is there a way to output which MCP server it is using for each action it wants to perform? Also, is there a way to enforce which MCP server it should use if you have a number of them in your global config? Should you just make workspace config?

I ran /tools and it showed the MCP servers but I wasn't sure if that was just showing me what was defined in my local mcp.json file or if these were actually loaded and available for use. With the growing sprawl of MCP servers, it would be extremely helpful to have a better way to track what is being loaded or not. In addition to adding a q chat --wait option, something like /mcp-status that you can run within an active q chat session, that would output a list of all MCP servers Q CLI know about (global and workspace) as well as their related statuses.

Output could look like:

q chat
... q loading normal stuff blah blah
/mcp-status
Global Config:
- awslabs.cfn-mcp-server:
  - Name: awslabs_cfn-mcp-server
  - Source: wherever the server is sourced from
  - Status: INIT
Workspace Config:
- awslabs.terraform-mcp-server:
  - Name: awslabs_terraform-mcp-server
  - Source: wherever the server is sourced from
  - Status: READY
- awslabs.my-very-cool-mcp-server:
  - Name: awslabs_terraform-mcp-server
  - Source: wherever the server is sourced from
  - Status: ERROR

novekm avatar Jun 06 '25 15:06 novekm

Update, it looks like with /tools it will display if the servers are loading or not:

> /tools

Tool              Permission
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔Built-in:
- execute_bash    * trust read-only commands
- fs_read         * trusted
- fs_write        * not trusted
- report_issue    * trusted
- use_aws         * trust read-only commands

Servers still loading
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ - awslabsgit_repo_research_mcp_server
 - awslabsaws_location_mcp_server
 - awslabsterraform_mcp_server
 - awslabsfrontend_mcp_server
 - awslabsnova_canvas_mcp_server
 - awslabslambda_mcp_server
 - awslabsvalkey_mcp_server
 - awslabscdk_mcp_server
 - awslabscore_mcp_server
 - awslabsaws_documentation_mcp_server
 - awslabsmemcached_mcp_server
 - awslabscost_analysis_mcp_server
 - awslabscloudformation
 - awslabsbedrock_kb_retrieval_mcp_server

The issue is this is not granular enough to show the status of each server. For now this helps a bit, but still could be improved upon by adding something similar to what I proposed

novekm avatar Jun 06 '25 16:06 novekm

Another update, running /mcp shows the list of MCP servers that are loaded vs still loading. From what I now understand: /mcp - shows list of MCP servers and if they have been loaded or are still loading /tools - shows the list of tools for all MCP servers that have been loaded, and which servers are still loading

Perhaps the issue is that the initial message q cli presents is not too clear? It goes straight to the chat even if users don't enter ctrl-c as the output mentions:

Existing output

❯ q chat
⠸ 0 of 1 mcp servers initialized. ctrl-c to start chatting now
⚠ 0 of 1 mcp servers initialized. Servers still loading:
 - awslabscfn_mcp_server
 
   ⢠⣶⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⣿⣶⣦⡀⠀
⠀⠀⠀⣾⡿⢻⣿⡆⠀⠀⠀⢀⣄⡄⢀⣠⣤⣤⡀⢀⣠⣤⣤⡀⠀⠀⢀⣠⣤⣤⣤⣄⠀⠀⢀⣤⣤⣤⣤⣤⣤⡀⠀⠀⣀⣤⣤⣤⣀⠀⠀⠀⢠⣤⡀⣀⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⢠⣿⣿⠋⠀⠀⠀⠙⣿⣿⡆
⠀⠀⣼⣿⠇⠀⣿⣿⡄⠀⠀⢸⣿⣿⠛⠉⠻⣿⣿⠛⠉⠛⣿⣿⠀⠀⠘⠛⠉⠉⠻⣿⣧⠀⠈⠛⠛⠛⣻⣿⡿⠀⢀⣾⣿⠛⠉⠻⣿⣷⡀⠀⢸⣿⡟⠛⠉⢻⣿⣷⠀⠀⠀⠀⠀⠀⣼⣿⡏⠀⠀⠀⠀⠀⢸⣿⣿
⠀⢰⣿⣿⣤⣤⣼⣿⣷⠀⠀⢸⣿⣿⠀⠀⠀⣿⣿⠀⠀⠀⣿⣿⠀⠀⢀⣴⣶⣶⣶⣿⣿⠀⠀⠀⣠⣾⡿⠋⠀⠀⢸⣿⣿⠀⠀⠀⣿⣿⡇⠀⢸⣿⡇⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⢹⣿⣇⠀⠀⠀⠀⠀⢸⣿⡿
⢀⣿⣿⠋⠉⠉⠉⢻⣿⣇⠀⢸⣿⣿⠀⠀⠀⣿⣿⠀⠀⠀⣿⣿⠀⠀⣿⣿⡀⠀⣠⣿⣿⠀⢀⣴⣿⣋⣀⣀⣀⡀⠘⣿⣿⣄⣀⣠⣿⣿⠃⠀⢸⣿⡇⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠈⢿⣿⣦⣀⣀⣀⣴⣿⡿⠃
⠚⠛⠋⠀⠀⠀⠀⠘⠛⠛⠀⠘⠛⠛⠀⠀⠀⠛⠛⠀⠀⠀⠛⠛⠀⠀⠙⠻⠿⠟⠋⠛⠛⠀⠘⠛⠛⠛⠛⠛⠛⠃⠀⠈⠛⠿⠿⠿⠛⠁⠀⠀⠘⠛⠃⠀⠀⠘⠛⠛⠀⠀⠀⠀⠀⠀⠀⠀⠙⠛⠿⢿⣿⣿⣋⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠿⢿⡧

╭─────────────────────────────── Did you know? ────────────────────────────────╮
│                                                                              │
│         Use /model to select the model to use for this conversation          │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

/help all commands  •  ctrl + j new lines  •  ctrl + s fuzzy search
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🤖 You are chatting with claude-3.7-sonnet

When running q chat, by default it should wait for all of the mcp servers to finish loading unless users enter ctrl-c (as the output currently mentions). If it doesn't do this, it feels like a bug. Alternatively, the output response should be updated to say something more clear such as:

Proposed new output

❯ q chat
⠸ 0 of 1 mcp servers initialized. The following servers will be loaded in the background:
 - awslabscfn_mcp_server
To check the status of these servers, run /mcp

   ⢠⣶⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⣿⣶⣦⡀⠀
⠀⠀⠀⣾⡿⢻⣿⡆⠀⠀⠀⢀⣄⡄⢀⣠⣤⣤⡀⢀⣠⣤⣤⡀⠀⠀⢀⣠⣤⣤⣤⣄⠀⠀⢀⣤⣤⣤⣤⣤⣤⡀⠀⠀⣀⣤⣤⣤⣀⠀⠀⠀⢠⣤⡀⣀⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⢠⣿⣿⠋⠀⠀⠀⠙⣿⣿⡆
⠀⠀⣼⣿⠇⠀⣿⣿⡄⠀⠀⢸⣿⣿⠛⠉⠻⣿⣿⠛⠉⠛⣿⣿⠀⠀⠘⠛⠉⠉⠻⣿⣧⠀⠈⠛⠛⠛⣻⣿⡿⠀⢀⣾⣿⠛⠉⠻⣿⣷⡀⠀⢸⣿⡟⠛⠉⢻⣿⣷⠀⠀⠀⠀⠀⠀⣼⣿⡏⠀⠀⠀⠀⠀⢸⣿⣿
⠀⢰⣿⣿⣤⣤⣼⣿⣷⠀⠀⢸⣿⣿⠀⠀⠀⣿⣿⠀⠀⠀⣿⣿⠀⠀⢀⣴⣶⣶⣶⣿⣿⠀⠀⠀⣠⣾⡿⠋⠀⠀⢸⣿⣿⠀⠀⠀⣿⣿⡇⠀⢸⣿⡇⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⢹⣿⣇⠀⠀⠀⠀⠀⢸⣿⡿
⢀⣿⣿⠋⠉⠉⠉⢻⣿⣇⠀⢸⣿⣿⠀⠀⠀⣿⣿⠀⠀⠀⣿⣿⠀⠀⣿⣿⡀⠀⣠⣿⣿⠀⢀⣴⣿⣋⣀⣀⣀⡀⠘⣿⣿⣄⣀⣠⣿⣿⠃⠀⢸⣿⡇⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠈⢿⣿⣦⣀⣀⣀⣴⣿⡿⠃
⠚⠛⠋⠀⠀⠀⠀⠘⠛⠛⠀⠘⠛⠛⠀⠀⠀⠛⠛⠀⠀⠀⠛⠛⠀⠀⠙⠻⠿⠟⠋⠛⠛⠀⠘⠛⠛⠛⠛⠛⠛⠃⠀⠈⠛⠿⠿⠿⠛⠁⠀⠀⠘⠛⠃⠀⠀⠘⠛⠛⠀⠀⠀⠀⠀⠀⠀⠀⠙⠛⠿⢿⣿⣿⣋⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠿⢿⡧

╭─────────────────────────────── Did you know? ────────────────────────────────╮
│                                                                              │
│         Use /model to select the model to use for this conversation          │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

/help all commands  •  ctrl + j new lines  •  ctrl + s fuzzy search
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🤖 You are chatting with claude-3.7-sonnet

If users would prefer to wait for all of these servers to be initialized/loaded before chatting, they should be able to run something like q chat --wait-for-mcp which should output the status as it loads all of the mcp servers, with some configurable timeout that throws an error if one of the mcp servers couldn't be loaded properly.

So essentially it should start at the MCP initialization as one of the first things, but it should report on the MCP initialization as the last thing before you're able to type. Right now it kinda just starts it, and doesn't give the user any updates, and the current output is misleading. For example, where it is printing Claude 3.7, that should be where it reports back on MCP status (if using it).

novekm avatar Jun 06 '25 16:06 novekm

please let me know if anyone has any update/workaround for this

charcharan avatar Jun 13 '25 04:06 charcharan

If your run /mcp what is returned? If after an extended time your server doesn't load, it could be that your MCP server isn't properly configured in your mcp.json file. I've noticed that it can take a little longer the first time a server is loaded, then subsequently loads are faster since there is caching. Either way I think it would be helpful for the messaging to be more clear.

novekm avatar Jun 13 '25 04:06 novekm

+1 I am facing the same issue. I used q-dveloper with claude sonnet to debug the problem. Even q-developer finally concludes that it probably a bug. When I run /mcp, it still says server is loading, does not matter how much time i give it. If I manually start the server though, it starts pretty much instantly and behaves as expected.

debasish-raychawdhuri avatar Jun 16 '25 14:06 debasish-raychawdhuri

Hi, I also faced this issue and got my mcp server working after cleaning my mcp.json configuration to only include the "command", "args" and "env" under the server name, for example before I had (which encountered Servers still loading): { "mcpServers": { "fetch": { "enabled": true, "timeout": 60, "command": "uvx", "args": [ "mcp-server-fetch" ], "env": { }, "transportType": "stdio" } } }

And when I changed it to:

{ "mcpServers": { "fetch": { "command": "uvx", "args": [ "mcp-server-fetch" ], "env": {} } } }

It worked.

Hope it helps.

nivmorabin avatar Jun 18 '25 21:06 nivmorabin

@nivmorabin , Thanks for the reply, I have tried the same but still i am getting server still loading, can you also share the localtion of your mcp.json file, Thank you

charcharan avatar Jun 30 '25 09:06 charcharan

@charcharan if you're using macOS/Linux it should be at ~/.aws/amazonq/mcp.json

novekm avatar Jun 30 '25 16:06 novekm

I am using Ubuntu by configuring windows subsystem, and path my json was same as mentioned, i cross checked my server was up without issues, still i am getting servers still loading

charcharan avatar Jul 01 '25 04:07 charcharan

My team had similar issues getting our MCP servers to load. It ended up being that the timeout in this config we configured in ~/.aws/amazonq/mcp.json was confusingly treated as millisecond units whereas tools like Cline treat this as seconds.

It wasn't obvious why our mcp servers weren't loading so I think some better diagnostics around this when loading could be more helpful.

{
"mcpServers": {
"fetch": {
"enabled": true,
"timeout": 60, <--- we forgot this was treated as milliseconds, not seconds, after setting to 60000 our mcp servers loaded
"command": "...",
"env": { },
"transportType": "stdio"
}
}
}

camerondurham avatar Jul 02 '25 22:07 camerondurham

You can also increase the init timeout value in the Q settings. Here is an example: q settings mcp.initTimeout 30

sbbhimji avatar Nov 17 '25 15:11 sbbhimji