-
Notifications
You must be signed in to change notification settings - Fork 767
Description
First, I will provide the code I used for testing.
package io.modelcontextprotocol.client;
import io.modelcontextprotocol.client.transport.HttpClientSseClientTransport;
import io.modelcontextprotocol.spec.McpClientTransport;
import java.time.Duration;
public class ModelScopeMcpTest extends AbstractMcpSyncClientTests {
private static final String MODELSCOPE_MCP_URL = "https://mcp.api-inference.modelscope.net/111111/sse";
// Here is an example URL. To test, you should deploy your own model/service on ModelScope to get a personal endpoint.
@Override
protected McpClientTransport createMcpTransport() {
return HttpClientSseClientTransport.builder(MODELSCOPE_MCP_URL)
.build();
}
@Override
protected Duration getRequestTimeout() {
return Duration.ofSeconds(30);
}
@Override
protected Duration getInitializationTimeout() {
return Duration.ofSeconds(10);
}
}created this file in the directory
java-sdk\mcp-test\src\main\java\io\modelcontextprotocol\client\ModelScopeMcpTest.java.
I will provide the test results in the attachment.
testResult-ModelScopeMcpTest.html
I am quite certain that this MCP server is functional, as I was able to successfully connect to it using Cherry Studio.
Regarding the Baidu API:
https://mcp.map.baidu.com/sse?ak=123456
, the main error is that the ak parameter in the API was not included in the request query, resulting in authentication failure. However, when I tested using the MCP Python SDK, I was easily able to connect to these vendor services (I can provide the Python test code if necessary). My question is: Is there an issue with my testing method, or does the current version not support connecting to these vendors?