From 22d87d8d013771ab25a2650b72692fc54ca01087 Mon Sep 17 00:00:00 2001 From: Yuri Yaryshev Date: Wed, 18 Nov 2026 08:27:42 +0300 Subject: [PATCH] =?UTF-8?q?MCP:=20=D0=B8=D0=BC=D1=8F=20=D1=81=D0=B5=D1=80?= =?UTF-8?q?=D0=B2=D0=B5=D1=80=D0=B0=20accounting=5Fautomation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- packages/accounting_automation/src/mcp.int.test.ts | 2 +- packages/accounting_automation/src/mcp.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/accounting_automation/src/mcp.int.test.ts b/packages/accounting_automation/src/mcp.int.test.ts index 8bc77f8..c64bad5 100644 --- a/packages/accounting_automation/src/mcp.int.test.ts +++ b/packages/accounting_automation/src/mcp.int.test.ts @@ -241,7 +241,7 @@ d("MCP бухгалтерии (временная БД)", () => { it("initialize, notifications/initialized, ping, tools/list", async () => { const i = await post(bearer(TOKEN_A), rpc("initialize", { protocolVersion: "2025-03-26" })); expect(i.statusCode).toBe(200); - expect(i.json().result.serverInfo.name).toBe("khb-accounting"); + expect(i.json().result.serverInfo.name).toBe("accounting_automation"); expect((await post(bearer(TOKEN_A), { jsonrpc: "2.0", method: "notifications/initialized" })).statusCode).toBe(202); expect(((await post(bearer(TOKEN_A), rpc("ping"))).json()).result).toEqual({}); const l = (await post(bearer(TOKEN_A), rpc("tools/list"))).json(); diff --git a/packages/accounting_automation/src/mcp.ts b/packages/accounting_automation/src/mcp.ts index d8589d7..1472fbb 100644 --- a/packages/accounting_automation/src/mcp.ts +++ b/packages/accounting_automation/src/mcp.ts @@ -399,7 +399,7 @@ export async function handleMcpMessage(tools: ReviewTools, personId: string, msg switch (method) { case "initialize": { const asked = (msg.params as Json | undefined)?.protocolVersion; - return { jsonrpc: "2.0", id, result: { protocolVersion: typeof asked === "string" ? asked : "2025-03-26", capabilities: { tools: {} }, serverInfo: { name: "khb-accounting", version: "0.1.0" } } }; + return { jsonrpc: "2.0", id, result: { protocolVersion: typeof asked === "string" ? asked : "2025-03-26", capabilities: { tools: {} }, serverInfo: { name: "accounting_automation", version: "0.1.0" } } }; } case "ping": return { jsonrpc: "2.0", id, result: {} };