MCP: у каждого коннектора KH Build своя иконка и название (serverInfo.icons/title)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { createPublicKey, createVerify, timingSafeEqual, type JsonWebKey } from "node:crypto";
|
||||
import type { FastifyInstance } from "fastify";
|
||||
import type { Pool } from "khb_common";
|
||||
|
||||
/** Иконка коннектора (MCP serverInfo.icons): у каждого MCP KH Build свой цвет и знак, чтобы не путать их в списке коннекторов. */
|
||||
const MCP_ICON = "data:image/svg+xml," + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="14" fill="#7a3fd1"/><text x="32" y="43" font-size="30" font-weight="700" text-anchor="middle" fill="#fff" font-family="Arial">AI</text></svg>');
|
||||
const MCP_ICONS = [{ src: MCP_ICON, mimeType: "image/svg+xml", sizes: ["any"] }];
|
||||
import { chunkOf, fullTextStore, type FullTextStore } from "./fulltext.js";
|
||||
|
||||
/**
|
||||
@@ -191,7 +195,7 @@ export async function handleMcpRequest(req: RpcReq, tools: McpTool[], serverName
|
||||
return ok({
|
||||
protocolVersion: typeof req.params?.protocolVersion === "string" ? req.params.protocolVersion : "2025-03-26",
|
||||
capabilities: { tools: {} },
|
||||
serverInfo: { name: serverName, version: "1.0.0" },
|
||||
serverInfo: { name: serverName, title: "KH Build: агенты (mcp_for_agents)", version: "1.0.0", icons: MCP_ICONS },
|
||||
instructions: "Чтение данных сервиса агентов без ограничений по размеру: read_full_text (полный текст по ref из пометки ОБРЕЗАНО), read_slack_message, agent_issues.",
|
||||
});
|
||||
case "ping":
|
||||
|
||||
Reference in New Issue
Block a user