We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/f/mcp-startup-framework'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
add.ts•375 B
import { z } from "zod";
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
export function registerAddTool(server: McpServer) {
server.tool(
"add",
"Add two numbers the way only MCP can",
{
a: z.number(),
b: z.number()
},
async ({ a, b }) => ({
content: [{ type: "text", text: String(a + b) }],
})
);
}