spring-projects / spring-projects/spring-ai
Multiple tools with the same name
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
使用spring-ai-mcp-client-webflux-spring-boot-starter-1.0.0.M6 maven依赖,创建mcp client启动时报错:Multiple tools with the same name,
即使tools名称未冲突也会报错。
查看源码:
spring-ai-mcp-client-spring-boot-autoconfigure-1.0.0-M6.jar 中
SseHttpClientTransportAutoConfiguration
@ConditionalOnMissingClass("io.modelcontextprotocol.client.transport.public class WebFluxSseClientTransport")
类路径写错了,导致SseHttpClientTransportAutoConfiguration和SseWebFluxTransportAutoConfiguration都会注入
List NamedClientMcpTransport
导致生成两个相同的mcpClients所有tool都会有一份一样的,然后校验tool的时候就会报错。
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with SseHttpClientTransportAutoConfiguration in spring-ai-mcp-client-spring-boot-autoconfigure and compare its conditional class name with SseWebFluxTransportAutoConfiguration. Reproduce startup with the spring-ai-mcp-client-webflux-spring-boot-starter-1.0.0.M6 dependency and verify that only one NamedClientMcpTransport is injected and the duplicate-tool error is gone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100