Ship production-ready MCP Servers in Minutes.
Build and deploy your servers in no time, and manage them all in one place. No separate CI/CD pipelines, no fragile deployments.
Try out our Demo MCP Server
https://sandbox.mcp-express.com/demo/mcp
add-numbers.ts
import { defineTool } from "@mcpexpress/core";
import { z } from "zod";
const InputSchema = z.object({
a: z.number().describe("The first number"),
b: z.number().describe("The second number"),
});
const OutputSchema = z.object({ sum: z.number() });
const add = ({ a, b }: z.infer<typeof InputSchema>) => ({
sum: a + b,
});
export const addNumbers = defineTool({
name: "add_numbers",
title: "Add numbers",
description: "Add two numbers together and return their sum.",
input: InputSchema,
output: OutputSchema,
annotations: { readOnlyHint: true, openWorldHint: false },
execute: (args) => add(args),
});