mirror of
https://github.com/hansjone/dsh-search-mcp.git
synced 2026-10-11 23:20:46 +08:00
Skip MCP era probe for Bailian-compatible connect.
Omit Client versionNegotiation so the SDK stays on legacy initialize; Bailian answers the 2026 server/discover probe with HTTP 500 and never reaches search. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
4b4a1e4460
commit
ada788a236
3 changed files with 11 additions and 5 deletions
|
|
@ -32,9 +32,12 @@ export async function callMcpSearch(server, key, args, signal) {
|
|||
}
|
||||
|
||||
let runtime;
|
||||
// Do not opt into MCP 2026 era negotiation. SDK default is legacy (plain
|
||||
// 2025 initialize, no server/discover probe). Bailian/DashScope answers
|
||||
// that probe with HTTP 500 and connect fails before any search call.
|
||||
const client = new Client(
|
||||
{ name: 'dsh-search-mcp', version: '0.2.41' },
|
||||
{ capabilities: {}, versionNegotiation: { mode: 'auto' } },
|
||||
{ name: 'dsh-search-mcp', version: '0.2.42' },
|
||||
{ capabilities: {} },
|
||||
);
|
||||
try {
|
||||
runtime = server.transport === 'stdio'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue