Skip to main content
Glama

DigitalOcean MCP Server

Official
by digitalocean
DOMcpServer.ts898 B
import { McpServer, ToolCallback, } from "@modelcontextprotocol/sdk/server/mcp.js"; import { ServerOptions } from "@modelcontextprotocol/sdk/server/index.js"; import { ZodRawShape } from "zod"; import { Implementation } from "@modelcontextprotocol/sdk/types.js"; export type ToolArgs<Args extends undefined | ZodRawShape = undefined> = { name: string; description: string; parameters?: Args; cb: ToolCallback<Args>; }; export class DOMcpServer extends McpServer { constructor(serverInfo: Implementation, options?: ServerOptions) { super(serverInfo, options); } public registerTool<Args extends ZodRawShape | undefined = undefined>({ name, description, parameters, cb, }: ToolArgs<Args>) { if (parameters) { this.tool(name, description, parameters, cb); } else { this.tool(name, description, cb as ToolCallback<undefined>); } } }

Latest Blog Posts

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/digitalocean/digitalocean-mcp'

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