UNPKG

git-mob-mcp-server

Version:
36 lines (35 loc) 1.07 kB
import { ResourceTemplate, } from "@modelcontextprotocol/sdk/server/mcp.js"; import { getHelp } from "../clients/gitMobClient.js"; import { UriTemplate } from "@modelcontextprotocol/sdk/shared/uriTemplate.js"; const name = "git_mob_cli_help"; const template = new ResourceTemplate(new UriTemplate("gitmob://help{?command}"), { list: undefined, complete: { command: () => ["setup", "coauthor", "help"], }, }); const metadata = { description: "General help and usage information for the Git Mob CLI. " + "You can optionally provide a command ('setup', 'coauthor', or 'help') " + "to get detailed help for that specific command.", mimeType: "text/plain", }; const readCallback = async (uri, { command }) => { const { ok, value } = await getHelp(command); return { isError: !ok, contents: [ { uri: uri.href, text: value, }, ], }; }; const resource = { name, template, metadata, readCallback, }; export default resource;