Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create. If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:

Bug description E.g.

{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${GITLAB_PERSONAL_ACCESS_TOKEN}",
        "GITLAB_API_URL": "${GITLAB_API_URL}"
      }
    }
  },
  "redis": {
    "command": "npx",
    "args": [
      "-y",
      "@modelcontextprotocol/server-redis",
      "redis://redis:6379"
    ]
  }
}

Environment Spring-AI version: 1.0.0

Expected behavior All mcp servers must be registered on server startup

Cause: Apparently in McpStdioClientProperties.java there's this deserialization happening which is causing the problem due to the use of TypeReference. I believe a custom implementation of JsonDeserializer>> should be there and should be registered with with object mapper.

When I keep only one server in the json file. It works properly.

Comment From: 9uanhuo

redis configuration is in the wrong position, move redis under mcpServers

Comment From: aypandey

Ah my mistake ! Thanks for clarification.