DonArtkins

mcp-sdk-tools

用于构建基于MCP SDK的Griot服务器,提供Zod校验工具、stdio和Streamable HTTP传输,以及GraphQL后端执行能力。

DonArtkins 0 更新于 1个月前
GitHub

安装

npx skillscat add donartkins/griot/mcp-sdk-tools

通过 SkillsCat registry 安装。

技能简介

用于构建基于MCP SDK的Griot服务器,提供Zod校验工具、stdio和Streamable HTTP传输,以及GraphQL后端执行能力。

SKILL.md

MCP SDK Tools Skill

Server

// mcp/src/server.ts
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
export const server = new McpServer({ name: "griot", version: "0.1.0" });

server.tool("get_board", { boardId: z.string() }, async ({ boardId }) => {
  const data = await graphql.query(getBoardQuery, { boardId }, { token: await serviceToken() });
  return { content: [{ type: "text", text: JSON.stringify(data) }] };
});

Transports

  • stdio (local Claude/Cursor/Cline), Streamable HTTP (Docker/Railway + web).
  • Tool I/O validated with Zod; responses are JSON text content.

Rules

  • Tools only through the backend GraphQL with GRIOT_SERVICE_TOKEN.
  • Keep tools as pure functions (graphqlClient, input) -> output for testability.