Skip to main content
Glama

HackMD MCP Server

import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import type HackMDAPI from "@hackmd/api"; export function registerTeamsApiTools( server: McpServer, client: HackMDAPI.API, ) { // Tool: List teams server.tool( "list_teams", "List all teams accessible to the user", {}, { title: "Get a list of the teams to which the user has permission", readOnlyHint: true, openWorldHint: true, }, async () => { try { const teams = await client.getTeams(); return { content: [ { type: "text", text: JSON.stringify(teams, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } }, ); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yuna0x0/hackmd-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server